pub struct Layout {
pub dir: PathBuf,
pub spec: GroupLayout,
/* private fields */
}Fields§
§dir: PathBuf§spec: GroupLayoutImplementations§
Source§impl Layout
impl Layout
pub fn create(dir: &Path, spec: GroupLayout) -> Result<Self>
Sourcepub fn open(dir: &Path, spec: GroupLayout) -> Result<Self>
pub fn open(dir: &Path, spec: GroupLayout) -> Result<Self>
Open an existing layout (panics if a file is missing or undersized).
Sourcepub fn fd(&self, layer: u32) -> RawFd
pub fn fd(&self, layer: u32) -> RawFd
Raw fd for the io_uring / cuFile paths, which are Linux-only.
Sourcepub fn file(&self, layer: u32) -> &File
pub fn file(&self, layer: u32) -> &File
The layer file itself — what the portable positional-I/O backend uses, and the only accessor available on Windows.
pub fn offset(&self, key: GroupKey) -> u64
pub fn group_bytes(&self) -> u64
Auto Trait Implementations§
impl Freeze for Layout
impl RefUnwindSafe for Layout
impl Send for Layout
impl Sync for Layout
impl Unpin for Layout
impl UnwindSafe for Layout
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