pub struct DumpData<T: TransportRequest> {
pub serialized_request: Vec<u8>,
pub serialized_response: Vec<u8>,
/* private fields */
}Expand description
Data format of dumps created with DapiClient::dump_dir.
Fields§
§serialized_request: Vec<u8>Request that was sent to DAPI.
serialized_response: Vec<u8>Response that was received from DAPI.
Implementations§
Source§impl<T: TransportRequest> DumpData<T>
impl<T: TransportRequest> DumpData<T>
Sourcepub fn deserialize(&self) -> (T, MockResult<T>)
pub fn deserialize(&self) -> (T, MockResult<T>)
Return deserialized request
Source§impl<T: TransportRequest> DumpData<T>
impl<T: TransportRequest> DumpData<T>
Sourcepub fn new(request: &T, response: &MockResult<T>) -> Self
pub fn new(request: &T, response: &MockResult<T>) -> Self
Create new dump data.
Sourcepub fn filename(&self) -> Result<String, Error>
pub fn filename(&self) -> Result<String, Error>
Generate unique filename for this dump.
Filename consists of:
- DapiClient::DUMP_FILE_PREFIX
- basename of the type of request, like
GetIdentityRequest - unique identifier (hash) of the request
Trait Implementations§
Source§impl<T> Mockable for DumpData<T>where
T: Mockable + TransportRequest,
T::Response: Mockable,
impl<T> Mockable for DumpData<T>where
T: Mockable + TransportRequest,
T::Response: Mockable,
Auto Trait Implementations§
impl<T> Freeze for DumpData<T>
impl<T> RefUnwindSafe for DumpData<T>where
T: RefUnwindSafe,
impl<T> Send for DumpData<T>
impl<T> Sync for DumpData<T>
impl<T> Unpin for DumpData<T>where
T: Unpin,
impl<T> UnwindSafe for DumpData<T>where
T: 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T, U> IntoPlatformVersioned<U> for Twhere
U: FromPlatformVersioned<T>,
impl<T, U> IntoPlatformVersioned<U> for Twhere
U: FromPlatformVersioned<T>,
Source§fn into_platform_versioned(self, platform_version: &PlatformVersion) -> U
fn into_platform_versioned(self, platform_version: &PlatformVersion) -> U
Performs the conversion.
§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::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>,
Applies the layer to a service and wraps it in [
Layered].Source§impl<T, U> TryIntoPlatformVersioned<U> for Twhere
U: TryFromPlatformVersioned<T>,
impl<T, U> TryIntoPlatformVersioned<U> for Twhere
U: TryFromPlatformVersioned<T>,
Source§type Error = <U as TryFromPlatformVersioned<T>>::Error
type Error = <U as TryFromPlatformVersioned<T>>::Error
The type returned in the event of a conversion error.
Source§fn try_into_platform_versioned(
self,
platform_version: &PlatformVersion,
) -> Result<U, <U as TryFromPlatformVersioned<T>>::Error>
fn try_into_platform_versioned( self, platform_version: &PlatformVersion, ) -> Result<U, <U as TryFromPlatformVersioned<T>>::Error>
Performs the conversion.
§impl<T, U> TryIntoVersioned<U> for Twhere
U: TryFromVersioned<T>,
impl<T, U> TryIntoVersioned<U> for Twhere
U: TryFromVersioned<T>,
§type Error = <U as TryFromVersioned<T>>::Error
type Error = <U as TryFromVersioned<T>>::Error
The type returned in the event of a conversion error.
§fn try_into_versioned(
self,
grove_version: &GroveVersion,
) -> Result<U, <U as TryFromVersioned<T>>::Error>
fn try_into_versioned( self, grove_version: &GroveVersion, ) -> Result<U, <U as TryFromVersioned<T>>::Error>
Performs the conversion.