pub struct MockDirectoryPutter {
DirectoryPutter_expectations: MockDirectoryPutter_DirectoryPutter,
}Expand description
Provides a handle to put a closure of connected Directory elements.
The consumer can periodically call DirectoryPutter::put, starting from the leaves. Once the root is reached, DirectoryPutter::close can be called to retrieve the root digest (or an error).
DirectoryPutters might be created without a single DirectoryPutter::put, and then dropped without calling DirectoryPutter::close, for example when ingesting a path that ends up not pointing to a directory, but a single file or symlink.
Fields§
§DirectoryPutter_expectations: MockDirectoryPutter_DirectoryPutterImplementations§
Source§impl MockDirectoryPutter
impl MockDirectoryPutter
Sourcepub fn checkpoint(&mut self)
pub fn checkpoint(&mut self)
Validate that all current expectations for all methods have been satisfied, and discard them.
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new mock object with no expectations.
This method will not be generated if the real struct
already has a new method. However, it will be
generated if the struct implements a trait with a new
method. The trait’s new method can still be called
like <MockX as TraitY>::new
Source§impl MockDirectoryPutter
impl MockDirectoryPutter
Sourcepub fn expect_put(&mut self) -> &mut Expectation
pub fn expect_put(&mut self) -> &mut Expectation
Create an Expectation for mocking the put method
Sourcepub fn expect_close(&mut self) -> &mut Expectation
pub fn expect_close(&mut self) -> &mut Expectation
Create an Expectation for mocking the close method
Trait Implementations§
Source§impl Debug for MockDirectoryPutter
impl Debug for MockDirectoryPutter
Source§impl Default for MockDirectoryPutter
impl Default for MockDirectoryPutter
Source§impl DirectoryPutter for MockDirectoryPutter
Provides a handle to put a closure of connected Directory elements.
impl DirectoryPutter for MockDirectoryPutter
Provides a handle to put a closure of connected Directory elements.
The consumer can periodically call DirectoryPutter::put, starting from the leaves. Once the root is reached, DirectoryPutter::close can be called to retrieve the root digest (or an error).
DirectoryPutters might be created without a single DirectoryPutter::put, and then dropped without calling DirectoryPutter::close, for example when ingesting a path that ends up not pointing to a directory, but a single file or symlink.
Source§fn put<'life0, 'async_trait>(
&'life0 mut self,
directory: Directory,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn put<'life0, 'async_trait>(
&'life0 mut self,
directory: Directory,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Put a individual Directory into the store.
Error semantics and behaviour is up to the specific implementation of
this trait.
Due to bursting, the returned error might refer to an object previously
sent via put.
Source§fn close<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<B3Digest, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn close<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<B3Digest, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Close the stream, and wait for any errors. If there’s been any invalid Directory message uploaded, and error must be returned.
Auto Trait Implementations§
impl Freeze for MockDirectoryPutter
impl RefUnwindSafe for MockDirectoryPutter
impl Send for MockDirectoryPutter
impl Sync for MockDirectoryPutter
impl Unpin for MockDirectoryPutter
impl UnsafeUnpin for MockDirectoryPutter
impl UnwindSafe for MockDirectoryPutter
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].