pub struct SliceBackend<'a> { /* private fields */ }Expand description
Borrowed in-memory media source.
Implementations§
Trait Implementations§
Source§impl<'a> Clone for SliceBackend<'a>
impl<'a> Clone for SliceBackend<'a>
Source§fn clone(&self) -> SliceBackend<'a>
fn clone(&self) -> SliceBackend<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<'a> Copy for SliceBackend<'a>
Source§impl<'a> Debug for SliceBackend<'a>
impl<'a> Debug for SliceBackend<'a>
Source§impl<'a> From<SliceBackend<'a>> for ReadBackend<'a>
impl<'a> From<SliceBackend<'a>> for ReadBackend<'a>
Source§fn from(slice: SliceBackend<'a>) -> Self
fn from(slice: SliceBackend<'a>) -> Self
Converts to this type from the input type.
Source§impl MediaReadAt for SliceBackend<'_>
impl MediaReadAt for SliceBackend<'_>
Source§fn read_at(
&self,
range: ByteRange,
dst: &mut [u8],
) -> Result<usize, ReadAtError>
fn read_at( &self, range: ByteRange, dst: &mut [u8], ) -> Result<usize, ReadAtError>
Copy exactly
range.len bytes into dst.Source§fn window_at(&self, range: ByteRange) -> Result<&[u8], ReadAtError>
fn window_at(&self, range: ByteRange) -> Result<&[u8], ReadAtError>
Borrow exactly
range.len bytes from the source.Source§fn window_at_partial(&self, range: ByteRange) -> Result<&[u8], ReadAtError>
fn window_at_partial(&self, range: ByteRange) -> Result<&[u8], ReadAtError>
Borrow up to
range.len bytes. The offset must still be in bounds.Source§fn as_contiguous(&self) -> Option<&[u8]>
fn as_contiguous(&self) -> Option<&[u8]>
Return the complete contiguous source only for compatibility paths.
fn is_empty(&self) -> bool
fn stats(&self) -> SourceStats
Auto Trait Implementations§
impl<'a> Freeze for SliceBackend<'a>
impl<'a> RefUnwindSafe for SliceBackend<'a>
impl<'a> Send for SliceBackend<'a>
impl<'a> Sync for SliceBackend<'a>
impl<'a> Unpin for SliceBackend<'a>
impl<'a> UnsafeUnpin for SliceBackend<'a>
impl<'a> UnwindSafe for SliceBackend<'a>
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