pub fn slice(this: &Self, extra_offset: usize, len: usize) -> Option<Self> {
        Some(Self(if let Some(len) = NonZeroUsize::new(len) {
            Some(ReadResultInner::slice(this.0.as_ref()?, extra_offset, len)?)
        } else {
            // This branch is needed to make sure that calls to `slice` with `len = 0` are
            // handled. If they aren't valid, then `len` should be changed to
            // `NonZeroUsize`.
            None
        }))
    }
/// Creates a slice of this ReadResult with the given offset and length.
///
/// Returns `None` if either offset or offset + len would not fit in the
/// original buffer.
Creates a slice of this ReadResult with the given offset and length.
Returns `None` if either offset or offset + len would not fit in the
original buffer.
Creates a slice of this ReadResult with the given offset and length . Returns ` None ` if either offset or offset + len would not fit in the original buffer .
pub fn slice(this: &Self, extra_offset: usize, len: usize) -> Option<Self> {
        Some(Self(if let Some(len) = NonZeroUsize::new(len) {
            Some(ReadResultInner::slice(this.0.as_ref()?, extra_offset, len)?)
        } else {
            // This branch is needed to make sure that calls to `slice` with `len = 0` are
            // handled. If they aren't valid, then `len` should be changed to
            // `NonZeroUsize`.
            None
        }))
    }
pub fn slice ( this : & Self , extra_offset : usize , len : usize ) -> Option < Self > { Some ( Self ( if let Some ( len ) = NonZeroUsize :: new ( len ) { Some ( ReadResultInner :: slice ( this . 0 . as_ref ( ) ? , extra_offset , len ) ? ) } else { // This branch is needed to make sure that calls to `slice` with `len = 0` are // handled. If they aren't valid, then `len` should be changed to // `NonZeroUsize`. None } ) ) }
Creates a slice of this ReadResult with the given offset and length.
Creates a slice of this ReadResult with the given offset and length .
this
&Self
extra_offset
usize
len
usize
this
&Self
extra_offset
usize
len
usize