Using O_DIRECT (Not using the OS Page Cache)

Currently I am working on implementing a buffer pool (Page Cache) in Rust for a dbms, so I want to manipulate the files on Linux without using the default OS Page Cache, I tried to find a way on how to use O_DIRECT in rust, but couldn't find anything, any thoughts ? (I am ok with writing unsafe rust code or using multiple workarounds)

to set low level flags before opening a file, you need to use the platform (unix, in this case) specific OpenOptionsExt: