Struct ntfs::types::NtfsPosition
source · pub struct NtfsPosition(_);
Expand description
An absolute nonzero byte position on the NTFS filesystem.
Can be used to seek, but even more often in NtfsError
variants to assist with debugging.
Note that there may be cases when no valid position can be given for the current situation.
For example, this may happen when a reader is on a sparse Data Run or it has been seeked to a
position outside the valid range.
Therefore, this structure internally uses an Option
of a NonZeroU64
to alternatively
store a None
value if no valid position can be given.
Implementations§
source§impl NtfsPosition
impl NtfsPosition
sourcepub const fn value(&self) -> Option<NonZeroU64>
pub const fn value(&self) -> Option<NonZeroU64>
Returns the stored position, or None
if there is no valid position.
Trait Implementations§
source§impl Add<u16> for NtfsPosition
impl Add<u16> for NtfsPosition
source§impl Add<u64> for NtfsPosition
impl Add<u64> for NtfsPosition
source§impl Add<usize> for NtfsPosition
impl Add<usize> for NtfsPosition
source§impl AddAssign<u16> for NtfsPosition
impl AddAssign<u16> for NtfsPosition
source§fn add_assign(&mut self, other: u16)
fn add_assign(&mut self, other: u16)
Performs the
+=
operation. Read moresource§impl AddAssign<u64> for NtfsPosition
impl AddAssign<u64> for NtfsPosition
source§fn add_assign(&mut self, other: u64)
fn add_assign(&mut self, other: u64)
Performs the
+=
operation. Read moresource§impl AddAssign<usize> for NtfsPosition
impl AddAssign<usize> for NtfsPosition
source§fn add_assign(&mut self, other: usize)
fn add_assign(&mut self, other: usize)
Performs the
+=
operation. Read moresource§impl Binary for NtfsPosition
impl Binary for NtfsPosition
source§impl Clone for NtfsPosition
impl Clone for NtfsPosition
source§fn clone(&self) -> NtfsPosition
fn clone(&self) -> NtfsPosition
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 NtfsPosition
impl Debug for NtfsPosition
source§impl Display for NtfsPosition
impl Display for NtfsPosition
source§impl From<NonZeroU64> for NtfsPosition
impl From<NonZeroU64> for NtfsPosition
source§fn from(value: NonZeroU64) -> Self
fn from(value: NonZeroU64) -> Self
Converts to this type from the input type.
source§impl From<Option<NonZeroU64>> for NtfsPosition
impl From<Option<NonZeroU64>> for NtfsPosition
source§fn from(original: Option<NonZeroU64>) -> NtfsPosition
fn from(original: Option<NonZeroU64>) -> NtfsPosition
Converts to this type from the input type.
source§impl LowerHex for NtfsPosition
impl LowerHex for NtfsPosition
source§impl Octal for NtfsPosition
impl Octal for NtfsPosition
source§impl Ord for NtfsPosition
impl Ord for NtfsPosition
source§fn cmp(&self, other: &NtfsPosition) -> Ordering
fn cmp(&self, other: &NtfsPosition) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq<NtfsPosition> for NtfsPosition
impl PartialEq<NtfsPosition> for NtfsPosition
source§fn eq(&self, other: &NtfsPosition) -> bool
fn eq(&self, other: &NtfsPosition) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<NtfsPosition> for NtfsPosition
impl PartialOrd<NtfsPosition> for NtfsPosition
source§fn partial_cmp(&self, other: &NtfsPosition) -> Option<Ordering>
fn partial_cmp(&self, other: &NtfsPosition) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl UpperHex for NtfsPosition
impl UpperHex for NtfsPosition
impl Copy for NtfsPosition
impl Eq for NtfsPosition
impl StructuralEq for NtfsPosition
impl StructuralPartialEq for NtfsPosition
Auto Trait Implementations§
impl RefUnwindSafe for NtfsPosition
impl Send for NtfsPosition
impl Sync for NtfsPosition
impl Unpin for NtfsPosition
impl UnwindSafe for NtfsPosition
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