pub struct MockNarCalculationService {
NarCalculationService_expectations: MockNarCalculationService_NarCalculationService,
}Fields§
§NarCalculationService_expectations: MockNarCalculationService_NarCalculationServiceImplementations§
Source§impl MockNarCalculationService
impl MockNarCalculationService
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 MockNarCalculationService
impl MockNarCalculationService
Sourcepub fn expect_calculate_nar(&mut self) -> &mut Expectation
pub fn expect_calculate_nar(&mut self) -> &mut Expectation
Create an Expectation for mocking the calculate_nar method
Trait Implementations§
Source§impl Debug for MockNarCalculationService
impl Debug for MockNarCalculationService
Source§impl Default for MockNarCalculationService
impl Default for MockNarCalculationService
Source§impl NarCalculationService for MockNarCalculationService
impl NarCalculationService for MockNarCalculationService
Source§fn calculate_nar<'life0, 'life1, 'async_trait>(
&'life0 self,
root_node: &'life1 Node,
) -> Pin<Box<dyn Future<Output = Result<(u64, [u8; 32]), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn calculate_nar<'life0, 'life1, 'async_trait>(
&'life0 self,
root_node: &'life1 Node,
) -> Pin<Box<dyn Future<Output = Result<(u64, [u8; 32]), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Return the nar size and nar sha256 digest for a given root node. This can be used to calculate NAR-based output paths.
Auto Trait Implementations§
impl Freeze for MockNarCalculationService
impl RefUnwindSafe for MockNarCalculationService
impl Send for MockNarCalculationService
impl Sync for MockNarCalculationService
impl Unpin for MockNarCalculationService
impl UnsafeUnpin for MockNarCalculationService
impl UnwindSafe for MockNarCalculationService
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
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>
Converts
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>
Converts
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>
Wrap the input message
T in a tonic::RequestCreates a shared type from an unshared type.
§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>,
Applies the layer to a service and wraps it in [
Layered].