pub struct DirectFileRing { /* private fields */ }Expand description
Non-mmap positioned-I/O ring with page-cache bypass.
Implementations§
Source§impl DirectFileRing
impl DirectFileRing
Sourcepub fn create(
base_path: impl AsRef<Path>,
capacity: usize,
) -> Result<Self, DirectFileError>
pub fn create( base_path: impl AsRef<Path>, capacity: usize, ) -> Result<Self, DirectFileError>
Construct a fresh ring at base_path. Creates three files:
{base}.directfile.data.bin (the slot array, unbuffered),
{base}.directfile.head.bin (head counter, MMF),
{base}.directfile.tail.bin (tail counter, MMF).
Sourcepub fn open(
base_path: impl AsRef<Path>,
expected_capacity: usize,
) -> Result<Self, DirectFileError>
pub fn open( base_path: impl AsRef<Path>, expected_capacity: usize, ) -> Result<Self, DirectFileError>
Open an existing ring at base_path (a second process).
Trait Implementations§
Source§impl Drop for DirectFileRing
impl Drop for DirectFileRing
impl Send for DirectFileRing
impl Sync for DirectFileRing
Auto Trait Implementations§
impl Freeze for DirectFileRing
impl RefUnwindSafe for DirectFileRing
impl Unpin for DirectFileRing
impl UnsafeUnpin for DirectFileRing
impl UnwindSafe for DirectFileRing
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more