[][src]Trait amadeus_core::file::Page

pub trait Page: Send {
    type Error: Error + Clone + PartialEq + Into<Error> + ProcessSend + 'static;
    fn len(&self) -> u64;
fn set_len(&self, len: u64) -> Result<(), Self::Error>;
fn read(
        &self,
        offset: u64,
        len: usize
    ) -> BoxFuture<'static, Result<Box<[u8]>, Self::Error>>;
fn write(
        &self,
        offset: u64,
        buf: Box<[u8]>
    ) -> BoxFuture<'static, Result<(), Self::Error>>; fn reader(self) -> Reader<Self>
    where
        Self: Sized
, { ... } }

Associated Types

type Error: Error + Clone + PartialEq + Into<Error> + ProcessSend + 'static

Loading content...

Required methods

fn len(&self) -> u64

fn set_len(&self, len: u64) -> Result<(), Self::Error>

fn read(
    &self,
    offset: u64,
    len: usize
) -> BoxFuture<'static, Result<Box<[u8]>, Self::Error>>

fn write(
    &self,
    offset: u64,
    buf: Box<[u8]>
) -> BoxFuture<'static, Result<(), Self::Error>>

Loading content...

Provided methods

fn reader(self) -> Reader<Self> where
    Self: Sized

Loading content...

Implementations on Foreign Types

impl<'impl0, T: ?Sized> Page for &'impl0 T where
    T: Page + Sync
[src]

type Error = T::Error

impl<T: ?Sized> Page for Arc<T> where
    T: Page + Sync
[src]

type Error = T::Error

Loading content...

Implementors

impl Page for LocalFile[src]

type Error = IoError

Loading content...