pub struct Unbuffered;Expand description
A file opened with no intermediate buffering: its transfers reach the device, so it can claim
WarrantyClass::SharedDevice, and need the device’s sector alignment. Per-write
write-through is honoured only on such a file, which the kernel refuses on a cached one
(error 509, measured 2026-10-07 and kept as a test), so it offers that capability.
Implementations§
Source§impl Unbuffered
impl Unbuffered
Sourcepub const DEFAULT_SECTOR_SIZE: u32 = 4096
pub const DEFAULT_SECTOR_SIZE: u32 = 4096
The sector size an unbuffered file is given until OpenedFile::with_sector_size says
otherwise: the largest in general use, which every smaller one divides, so no device
refuses it. A caller whose device allows less can say so and be offered less alignment to
meet.
Trait Implementations§
Source§impl Buffering for Unbuffered
impl Buffering for Unbuffered
Source§const WARRANTY: WarrantyClass = WarrantyClass::SharedDevice
const WARRANTY: WarrantyClass = WarrantyClass::SharedDevice
The warranty class a file in this mode can claim.
Source§const CAPABILITIES: Capabilities
const CAPABILITIES: Capabilities
What a file in this mode offers beyond the contract’s obligations.
Source§const LOCAL_DEVICE_ONLY: bool = true
const LOCAL_DEVICE_ONLY: bool = true
Whether the claim in
WARRANTY holds only on a device of this machine, so
that a file on a remote one is refused rather than given a class it cannot keep.Source§fn sector_geometry(sector_size: u32) -> Result<Geometry, GeometryError>
fn sector_geometry(sector_size: u32) -> Result<Geometry, GeometryError>
The alignment a raw volume or disk in this mode needs, addressed in sectors of
sector_size
bytes. Its transfers are whole sectors in either mode, so offsets and lengths are aligned to
one; its buffers only when it is unbuffered, as the cache is what lets a cached transfer
start anywhere. Read moreSource§impl Clone for Unbuffered
impl Clone for Unbuffered
impl Copy for Unbuffered
Auto Trait Implementations§
impl Freeze for Unbuffered
impl RefUnwindSafe for Unbuffered
impl Send for Unbuffered
impl Sync for Unbuffered
impl Unpin for Unbuffered
impl UnsafeUnpin for Unbuffered
impl UnwindSafe for Unbuffered
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