Enum Whence

#[repr(i32)]
pub enum Whence

Directive that tells lseek and lseek64 what the offset is relative to.

Variants

SeekSet = libc::SEEK_SET

Specify an offset relative to the start of the file.

SeekCur = libc::SEEK_CUR

Specify an offset relative to the current file location.

SeekEnd = libc::SEEK_END

Specify an offset relative to the end of the file.

SeekData = libc::SEEK_DATA

Specify an offset relative to the next location in the file greater than or equal to offset that contains some data. If offset points to some data, then the file offset is set to offset.

SeekHole = libc::SEEK_HOLE

Specify an offset relative to the next hole in the file greater than or equal to offset. If offset points into the middle of a hole, then the file offset should be set to offset. If there is no hole past offset, then the file offset should be adjusted to the end of the file (i.e., there is an implicit hole at the end of any file).

Trait Implementations

impl Clone for Whence

fn clone(&self) -> Self

impl Copy for Whence

impl Debug for Whence

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

Auto Trait Implementations

impl Freeze for Whence

impl RefUnwindSafe for Whence

impl Send for Whence

impl Sync for Whence

impl Unpin for Whence

impl UnsafeUnpin for Whence

impl UnwindSafe for Whence

Blanket Implementations

impl<T> Any for Whence where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for Whence where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for Whence where T: ?Sized,

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

impl<T> CloneToUninit for Whence where T: Clone,

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

impl<T> From<T> for Whence

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> ToOwned for Whence where T: Clone,

type Owned = T;
fn to_owned(&self) -> T
fn clone_into(&self, target: &mut T)

impl<T, U> Into<U> for Whence where U: From<T>,

fn into(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<U> for Whence where U: Into<T>,

type Error = never;
fn try_from(value: U) -> Result<T, never>

impl<T, U> TryInto<U> for Whence where U: TryFrom<T>,

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