Struct ntfs::attribute_value::NtfsDataRun
source · pub struct NtfsDataRun { /* private fields */ }
Expand description
A single NTFS Data Run, which is a continuous cluster range of a non-resident value.
A Data Run’s size is a multiple of the cluster size configured for the filesystem. However, a Data Run does not know about the actual size used by data. This information is only available in the corresponding attribute. Keep this in mind when doing reads and seeks on data runs. You may end up on allocated but unused data.
Implementations§
source§impl NtfsDataRun
impl NtfsDataRun
sourcepub fn allocated_size(&self) -> u64
pub fn allocated_size(&self) -> u64
Returns the allocated size of the Data Run, in bytes.
sourcepub fn data_position(&self) -> NtfsPosition
pub fn data_position(&self) -> NtfsPosition
Returns the absolute current data seek position within the filesystem, in bytes.
This may be None
if:
- The current seek position is outside the valid range, or
- The Data Run is a “sparse” Data Run
Trait Implementations§
source§impl Clone for NtfsDataRun
impl Clone for NtfsDataRun
source§fn clone(&self) -> NtfsDataRun
fn clone(&self) -> NtfsDataRun
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for NtfsDataRun
impl Debug for NtfsDataRun
source§impl NtfsReadSeek for NtfsDataRun
impl NtfsReadSeek for NtfsDataRun
source§fn read<T>(&mut self, fs: &mut T, buf: &mut [u8]) -> Result<usize>where
T: Read + Seek,
fn read<T>(&mut self, fs: &mut T, buf: &mut [u8]) -> Result<usize>where T: Read + Seek,
See
std::io::Read::read
.source§fn seek<T>(&mut self, _fs: &mut T, pos: SeekFrom) -> Result<u64>where
T: Read + Seek,
fn seek<T>(&mut self, _fs: &mut T, pos: SeekFrom) -> Result<u64>where T: Read + Seek,
See
std::io::Seek::seek
.source§fn stream_position(&self) -> u64
fn stream_position(&self) -> u64
source§impl PartialEq<NtfsDataRun> for NtfsDataRun
impl PartialEq<NtfsDataRun> for NtfsDataRun
source§fn eq(&self, other: &NtfsDataRun) -> bool
fn eq(&self, other: &NtfsDataRun) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for NtfsDataRun
impl StructuralEq for NtfsDataRun
impl StructuralPartialEq for NtfsDataRun
Auto Trait Implementations§
impl RefUnwindSafe for NtfsDataRun
impl Send for NtfsDataRun
impl Sync for NtfsDataRun
impl Unpin for NtfsDataRun
impl UnwindSafe for NtfsDataRun
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