Enum SeekFrom
pub enum SeekFrom
Enumeration of possible methods to seek within an I/O object.
It is used by the Seek trait.
Variants
-
Start(u64) Sets the offset to the provided number of bytes.
-
End(i64) Sets the offset to the size of this object plus the specified number of bytes.
It is possible to seek beyond the end of an object, but it's an error to seek before byte 0.
-
Current(i64) Sets the offset to the current position plus the specified number of bytes.
It is possible to seek beyond the end of an object, but it's an error to seek before byte 0.
Trait Implementations
impl Clone for SeekFrom
fn clone(&self) -> SeekFrom
impl Copy for SeekFrom
impl Debug for SeekFrom
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Eq for SeekFrom
fn assert_fields_are_eq(&self)
impl PartialEq for SeekFrom
fn eq(&self, other: &SeekFrom) -> bool
impl StructuralPartialEq for SeekFrom
impl TrivialClone for SeekFrom
Auto Trait Implementations
impl Freeze for SeekFrom
impl RefUnwindSafe for SeekFrom
impl Send for SeekFrom
impl Sync for SeekFrom
impl Unpin for SeekFrom
impl UnsafeUnpin for SeekFrom
impl UnwindSafe for SeekFrom
Blanket Implementations
impl<T> Any for SeekFrom
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for SeekFrom
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for SeekFrom
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for SeekFrom
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for SeekFrom
fn from(t: T) -> TReturns the argument unchanged.
impl<T> Printable for SeekFrom
where
T: Copy + Debug,
impl<T> SizeHint for SeekFrom
where
T: ?Sized,
fn lower_bound(&self) -> usizefn upper_bound(&self) -> Option<usize>
impl<T> SizedTypeProperties for SeekFrom
impl<T, U> Into<U> for SeekFrom
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for SeekFrom
where
U: Into<T>,
type Error = Infallible;fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto<U> for SeekFrom
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>