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>
impl<Inner> FilePtrArgs<Inner>
sourcepub fn builder() -> FilePtrArgsBuilder<Inner, Optional, Needed>
pub fn builder() -> FilePtrArgsBuilder<Inner, Optional, Needed>
Creates a new builder for this type.
Trait Implementations§
source§impl<Inner: Clone> Clone for FilePtrArgs<Inner>
impl<Inner: Clone> Clone for FilePtrArgs<Inner>
source§fn clone(&self) -> FilePtrArgs<Inner>
fn clone(&self) -> FilePtrArgs<Inner>
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<Inner: Default> Default for FilePtrArgs<Inner>
impl<Inner: Default> Default for FilePtrArgs<Inner>
source§fn default() -> FilePtrArgs<Inner>
fn default() -> FilePtrArgs<Inner>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<Inner> Freeze for FilePtrArgs<Inner>where
Inner: Freeze,
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> 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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)