Enum SeekFrom

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.

Implementations

impl Clone for SeekFrom

fn clone(self: &Self) -> SeekFrom

impl Copy for SeekFrom

impl Debug for SeekFrom

fn fmt(self: &Self, f: &mut $crate::fmt::Formatter<'_>) -> $crate::fmt::Result

impl Eq for SeekFrom

impl Freeze for SeekFrom

impl PartialEq for SeekFrom

fn eq(self: &Self, other: &SeekFrom) -> bool

impl RefUnwindSafe for SeekFrom

impl Send for SeekFrom

impl StructuralPartialEq for SeekFrom

impl Sync for SeekFrom

impl Unpin for SeekFrom

impl UnwindSafe for SeekFrom

impl<T> Any for SeekFrom

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for SeekFrom

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for SeekFrom

fn borrow_mut(self: &mut Self) -> &mut T

impl<T> CloneToUninit for SeekFrom

unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)

impl<T> From for SeekFrom

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> ToOwned for SeekFrom

fn to_owned(self: &Self) -> T
fn clone_into(self: &Self, target: &mut T)

impl<T, U> Into for SeekFrom

fn into(self: Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom for SeekFrom

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for SeekFrom

fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>