rc_zip_sync

Trait HasCursor

source
pub trait HasCursor {
    type Cursor<'a>: Read + 'a
       where Self: 'a;

    // Required method
    fn cursor_at(&self, offset: u64) -> Self::Cursor<'_>;
}
Expand description

A sliceable I/O resource: we can ask for a Read at a given offset.

Required Associated Types§

source

type Cursor<'a>: Read + 'a where Self: 'a

The type of Read returned by HasCursor::cursor_at.

Required Methods§

source

fn cursor_at(&self, offset: u64) -> Self::Cursor<'_>

Returns a Read at the given offset.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl HasCursor for &[u8]

source§

type Cursor<'a> = &'a [u8] where Self: 'a

source§

fn cursor_at(&self, offset: u64) -> Self::Cursor<'_>

source§

impl HasCursor for Vec<u8>

source§

type Cursor<'a> = &'a [u8] where Self: 'a

source§

fn cursor_at(&self, offset: u64) -> Self::Cursor<'_>

source§

impl HasCursor for File

source§

type Cursor<'a> = Cursor<&'a File> where Self: 'a

source§

fn cursor_at(&self, offset: u64) -> Self::Cursor<'_>

Implementors§