pub struct InMemoryClient<L = IgnoreLocation> { /* private fields */ }Expand description
Holds the BLOB in memory as owned or static data.
Use for testing.
Implementations§
Source§impl<L> InMemoryClient<L>
impl<L> InMemoryClient<L>
BLOB from shared bytes
Sourcepub fn new_from_slice(blob: &[u8]) -> Self
pub fn new_from_slice(blob: &[u8]) -> Self
BLOB copied from slice
Sourcepub fn new_static(blob: &'static [u8]) -> Self
pub fn new_static(blob: &'static [u8]) -> Self
BLOB with static byte slice
pub fn chunk_size(self, chunk_size: usize) -> Self
Trait Implementations§
Source§impl<L: Clone> Clone for InMemoryClient<L>
impl<L: Clone> Clone for InMemoryClient<L>
Source§fn clone(&self) -> InMemoryClient<L>
fn clone(&self) -> InMemoryClient<L>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<L> CondowClient for InMemoryClient<L>
impl<L> CondowClient for InMemoryClient<L>
type Location = L
Source§fn get_size(
&self,
_location: Self::Location,
) -> BoxFuture<'static, Result<u64, CondowError>>
fn get_size( &self, _location: Self::Location, ) -> BoxFuture<'static, Result<u64, CondowError>>
Returns the size of the BLOB at the given location
Source§fn download(
&self,
_location: Self::Location,
range: InclusiveRange,
) -> BoxFuture<'static, Result<BytesStream, CondowError>>
fn download( &self, _location: Self::Location, range: InclusiveRange, ) -> BoxFuture<'static, Result<BytesStream, CondowError>>
Download a BLOB or part of a BLOB from the given location as specified by the InclusiveRange
Source§fn download_full(
&self,
location: Self::Location,
) -> BoxFuture<'static, Result<BytesStream, CondowError>>
fn download_full( &self, location: Self::Location, ) -> BoxFuture<'static, Result<BytesStream, CondowError>>
Download a complete BLOB
Auto Trait Implementations§
impl<L> Freeze for InMemoryClient<L>
impl<L> RefUnwindSafe for InMemoryClient<L>where
L: RefUnwindSafe,
impl<L> Send for InMemoryClient<L>where
L: Send,
impl<L> Sync for InMemoryClient<L>where
L: Sync,
impl<L> Unpin for InMemoryClient<L>where
L: Unpin,
impl<L> UnwindSafe for InMemoryClient<L>where
L: UnwindSafe,
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