Struct condow_core::condow_client::InMemoryClient
source · [−]pub struct InMemoryClient<L = IgnoreLocation> { /* private fields */ }Expand description
Holds the BLOB in memory as owned or static data.
Use for testing.
Implementations
sourceimpl<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
sourceimpl<L: Clone> Clone for InMemoryClient<L>
impl<L: Clone> Clone for InMemoryClient<L>
sourcefn clone(&self) -> InMemoryClient<L>
fn clone(&self) -> InMemoryClient<L>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl<L> CondowClient for InMemoryClient<L> where
L: Debug + Display + Clone + Send + Sync + 'static,
impl<L> CondowClient for InMemoryClient<L> where
L: Debug + Display + Clone + Send + Sync + 'static,
type Location = L
sourcefn 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
sourcefn download(
&self,
_location: Self::Location,
spec: DownloadSpec
) -> BoxFuture<'static, Result<(BytesStream, BytesHint), CondowError>>
fn download(
&self,
_location: Self::Location,
spec: DownloadSpec
) -> BoxFuture<'static, Result<(BytesStream, BytesHint), CondowError>>
Download a BLOB or part of a BLOB from the given location as specified by the DownloadSpec Read more
Auto Trait Implementations
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more