Struct mp4san::SeekSkipAdapter

source ·
pub struct SeekSkipAdapter<T>(pub T)
where
    T: ?Sized;
Expand description

An adapter implementing Skip/AsyncSkip for all types implementing [Seek]/[AsyncSeek].

Tuple Fields§

§0: T

Trait Implementations§

source§

impl<T> AsyncRead for SeekSkipAdapter<T>
where T: AsyncRead + Unpin + ?Sized,

source§

fn poll_read( self: Pin<&mut SeekSkipAdapter<T>>, cx: &mut Context<'_>, buf: &mut [u8] ) -> Poll<Result<usize, Error>>

Attempt to read from the AsyncRead into buf. Read more
§

fn poll_read_vectored( self: Pin<&mut Self>, cx: &mut Context<'_>, bufs: &mut [IoSliceMut<'_>] ) -> Poll<Result<usize, Error>>

Attempt to read from the AsyncRead into bufs using vectored IO operations. Read more
source§

impl<R> AsyncSkip for SeekSkipAdapter<R>
where R: AsyncSeek + Unpin + ?Sized,

source§

fn poll_skip( self: Pin<&mut SeekSkipAdapter<R>>, cx: &mut Context<'_>, amount: u64 ) -> Poll<Result<(), Error>>

Skip an amount of bytes in a stream. Read more
source§

fn poll_stream_position( self: Pin<&mut SeekSkipAdapter<R>>, cx: &mut Context<'_> ) -> Poll<Result<u64, Error>>

Returns the current position of the cursor from the start of the stream.
source§

fn poll_stream_len( self: Pin<&mut SeekSkipAdapter<R>>, cx: &mut Context<'_> ) -> Poll<Result<u64, Error>>

Returns the length of this stream, in bytes.
source§

impl<T> Clone for SeekSkipAdapter<T>
where T: Clone + ?Sized,

source§

fn clone(&self) -> SeekSkipAdapter<T>

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<T> Debug for SeekSkipAdapter<T>
where T: Debug + ?Sized,

source§

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

Formats the value using the given formatter. Read more
source§

impl<T> Default for SeekSkipAdapter<T>
where T: Default + ?Sized,

source§

fn default() -> SeekSkipAdapter<T>

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

impl<T> Deref for SeekSkipAdapter<T>
where T: ?Sized,

§

type Target = T

The resulting type after dereferencing.
source§

fn deref(&self) -> &<SeekSkipAdapter<T> as Deref>::Target

Dereferences the value.
source§

impl<T> DerefMut for SeekSkipAdapter<T>
where T: ?Sized,

source§

fn deref_mut(&mut self) -> &mut <SeekSkipAdapter<T> as Deref>::Target

Mutably dereferences the value.
source§

impl<T> Read for SeekSkipAdapter<T>
where T: Read + ?Sized,

source§

fn read(&mut self, buf: &mut [u8]) -> Result<usize, Error>

Pull some bytes from this source into the specified buffer, returning how many bytes were read. Read more
1.36.0 · source§

fn read_vectored(&mut self, bufs: &mut [IoSliceMut<'_>]) -> Result<usize, Error>

Like read, except that it reads into a slice of buffers. Read more
source§

fn is_read_vectored(&self) -> bool

🔬This is a nightly-only experimental API. (can_vector)
Determines if this Reader has an efficient read_vectored implementation. Read more
1.0.0 · source§

fn read_to_end(&mut self, buf: &mut Vec<u8>) -> Result<usize, Error>

Read all bytes until EOF in this source, placing them into buf. Read more
1.0.0 · source§

fn read_to_string(&mut self, buf: &mut String) -> Result<usize, Error>

Read all bytes until EOF in this source, appending them to buf. Read more
1.6.0 · source§

fn read_exact(&mut self, buf: &mut [u8]) -> Result<(), Error>

Read the exact number of bytes required to fill buf. Read more
source§

fn read_buf(&mut self, buf: BorrowedCursor<'_>) -> Result<(), Error>

🔬This is a nightly-only experimental API. (read_buf)
Pull some bytes from this source into the specified buffer. Read more
source§

fn read_buf_exact(&mut self, cursor: BorrowedCursor<'_>) -> Result<(), Error>

🔬This is a nightly-only experimental API. (read_buf)
Read the exact number of bytes required to fill cursor. Read more
source§

impl<T> Skip for SeekSkipAdapter<T>
where T: Seek,

source§

fn skip(&mut self, amount: u64) -> Result<(), Error>

Skip an amount of bytes in a stream. Read more
source§

fn stream_position(&mut self) -> Result<u64, Error>

Returns the current position of the cursor from the start of the stream.
source§

fn stream_len(&mut self) -> Result<u64, Error>

Returns the length of this stream, in bytes.
source§

impl<T> Copy for SeekSkipAdapter<T>
where T: Copy + ?Sized,

Auto Trait Implementations§

§

impl<T: ?Sized> RefUnwindSafe for SeekSkipAdapter<T>
where T: RefUnwindSafe,

§

impl<T: ?Sized> Send for SeekSkipAdapter<T>
where T: Send,

§

impl<T: ?Sized> Sync for SeekSkipAdapter<T>
where T: Sync,

§

impl<T: ?Sized> Unpin for SeekSkipAdapter<T>
where T: Unpin,

§

impl<T: ?Sized> UnwindSafe for SeekSkipAdapter<T>
where T: UnwindSafe,

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<R> AsyncReadExt for R
where R: AsyncRead + ?Sized,

source§

fn chain<R>(self, next: R) -> Chain<Self, R>
where Self: Sized, R: AsyncRead,

Creates an adaptor which will chain this stream with another. Read more
source§

fn read<'a>(&'a mut self, buf: &'a mut [u8]) -> Read<'a, Self>
where Self: Unpin,

Tries to read some bytes directly into the given buf in asynchronous manner, returning a future type. Read more
source§

fn read_vectored<'a>( &'a mut self, bufs: &'a mut [IoSliceMut<'a>] ) -> ReadVectored<'a, Self>
where Self: Unpin,

Creates a future which will read from the AsyncRead into bufs using vectored IO operations. Read more
source§

fn read_exact<'a>(&'a mut self, buf: &'a mut [u8]) -> ReadExact<'a, Self>
where Self: Unpin,

Creates a future which will read exactly enough bytes to fill buf, returning an error if end of file (EOF) is hit sooner. Read more
source§

fn read_to_end<'a>(&'a mut self, buf: &'a mut Vec<u8>) -> ReadToEnd<'a, Self>
where Self: Unpin,

Creates a future which will read all the bytes from this AsyncRead. Read more
source§

fn read_to_string<'a>( &'a mut self, buf: &'a mut String ) -> ReadToString<'a, Self>
where Self: Unpin,

Creates a future which will read all the bytes from this AsyncRead. Read more
source§

fn split(self) -> (ReadHalf<Self>, WriteHalf<Self>)
where Self: AsyncWrite + Sized,

Helper method for splitting this read/write object into two halves. Read more
source§

fn take(self, limit: u64) -> Take<Self>
where Self: Sized,

Creates an AsyncRead adapter which will read at most limit bytes from the underlying reader. Read more
source§

impl<T> AsyncSkipExt for T
where T: AsyncSkip + ?Sized,

source§

fn skip(&mut self, amount: u64) -> Skip<'_, Self>

Skip an amount of bytes in a stream. Read more
source§

fn stream_position(&mut self) -> StreamPosition<'_, Self>

Returns the current position of the cursor from the start of the stream.
source§

fn stream_len(&mut self) -> StreamLen<'_, Self>

Returns the length of this stream, in bytes.
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> Downcast for T
where T: Any,

source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
source§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
source§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
source§

impl<T> DynClone for T
where T: Clone,

source§

fn __clone_box(&self, _: Private) -> *mut ()

source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where 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 T
where 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 T
where 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 T
where 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.