Struct binrw::file_ptr::FilePtrArgs

source ·
pub struct FilePtrArgs<Inner> {
    pub offset: u64,
    pub inner: Inner,
}
Expand description

Named arguments for the BinRead::read_options() implementation of FilePtr.

The inner field can be omitted completely if the inner type doesn’t require arguments, in which case a default value will be used.

Fields§

§offset: u64

An absolute offset added to the FilePtr::ptr offset before reading the pointed-to value.

§inner: Inner

The arguments for the inner type.

Implementations§

source§

impl<Inner> FilePtrArgs<Inner>

source

pub fn builder() -> FilePtrArgsBuilder<Inner, Optional, Needed>

Creates a new builder for this type.

Trait Implementations§

source§

impl<Inner: Clone> Clone for FilePtrArgs<Inner>

source§

fn clone(&self) -> FilePtrArgs<Inner>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<Inner: Default> Default for FilePtrArgs<Inner>

source§

fn default() -> FilePtrArgs<Inner>

Returns the “default value” for a type. Read more
source§

impl<Inner> NamedArgs for FilePtrArgs<Inner>

§

type Builder = FilePtrArgsBuilder<Inner, Optional, Needed>

The builder type for this type.
source§

fn builder() -> Self::Builder

Creates a new builder for this type.

Auto Trait Implementations§

§

impl<Inner> RefUnwindSafe for FilePtrArgs<Inner>where Inner: RefUnwindSafe,

§

impl<Inner> Send for FilePtrArgs<Inner>where Inner: Send,

§

impl<Inner> Sync for FilePtrArgs<Inner>where Inner: Sync,

§

impl<Inner> Unpin for FilePtrArgs<Inner>where Inner: Unpin,

§

impl<Inner> UnwindSafe for FilePtrArgs<Inner>where Inner: UnwindSafe,

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

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

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

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

Performs the conversion.