pub struct IsoCursor<DATA: Seek> {
pub data: DATA,
pub sector_size: usize,
}Available on crate feature
sync only.Expand description
Represents IsoCursor.
Fields§
§data: DATAThe data field.
sector_size: usizeThe sector_size field.
Implementations§
Source§impl<DATA: Seek> IsoCursor<DATA>
impl<DATA: Seek> IsoCursor<DATA>
Sourcepub fn into_inner(self) -> DATA
pub fn into_inner(self) -> DATA
Consumes the cursor and returns its underlying data source.
Sourcepub fn seek_sector(&mut self, sector: LogicalSector) -> Result<u64>
pub fn seek_sector(&mut self, sector: LogicalSector) -> Result<u64>
Performs the seek_sector operation.
Source§impl<DATA: Write + Seek> IsoCursor<DATA>
impl<DATA: Write + Seek> IsoCursor<DATA>
Sourcepub fn pad_align_sector(&mut self) -> Result<LogicalSector>
pub fn pad_align_sector(&mut self) -> Result<LogicalSector>
Advance to the next sector boundary, zero-filling the gap.
The gap is written rather than skipped with a seek: Write + Seek
targets are not guaranteed to read unwritten regions back as zeros
(reused buffers, block devices with stale data), and readers scan
some padding (e.g. the zero record-length terminator at the end of
a directory’s sector span). Gaps are always smaller than one sector.
Trait Implementations§
Source§impl<DATA: Read + Seek> Read for IsoCursor<DATA>
impl<DATA: Read + Seek> Read for IsoCursor<DATA>
Auto Trait Implementations§
impl<DATA> Freeze for IsoCursor<DATA>where
DATA: Freeze,
impl<DATA> RefUnwindSafe for IsoCursor<DATA>where
DATA: RefUnwindSafe,
impl<DATA> Send for IsoCursor<DATA>where
DATA: Send,
impl<DATA> Sync for IsoCursor<DATA>where
DATA: Sync,
impl<DATA> Unpin for IsoCursor<DATA>where
DATA: Unpin,
impl<DATA> UnsafeUnpin for IsoCursor<DATA>where
DATA: UnsafeUnpin,
impl<DATA> UnwindSafe for IsoCursor<DATA>where
DATA: UnwindSafe,
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