pub struct RequestEnvelope {
pub handler_type: String,
pub handler_id: String,
pub message_type: String,
pub payload: Vec<u8>,
}Expand description
This is the struct that we serialize and send to the server serialized
Fields§
§handler_type: String§handler_id: String§message_type: String§payload: Vec<u8>Implementations§
Trait Implementations§
Source§impl Clone for RequestEnvelope
impl Clone for RequestEnvelope
Source§fn clone(&self) -> RequestEnvelope
fn clone(&self) -> RequestEnvelope
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 Debug for RequestEnvelope
impl Debug for RequestEnvelope
Source§impl<'de> Deserialize<'de> for RequestEnvelope
impl<'de> Deserialize<'de> for RequestEnvelope
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for RequestEnvelope
impl Serialize for RequestEnvelope
Source§impl<'a, S, E: Error + DeserializeOwned> Service<RequestEnvelope> for Request<'a, S, E>where
S: MembershipStorage + 'static,
impl<'a, S, E: Error + DeserializeOwned> Service<RequestEnvelope> for Request<'a, S, E>where
S: MembershipStorage + 'static,
Source§impl<'a, S, E> Service<RequestEnvelope> for RequestRedirect<'a, S, E>where
E: Error + DeserializeOwned + Send + Sync + 'a,
S: MembershipStorage + 'static,
Request<'a, S, E>: Clone,
impl<'a, S, E> Service<RequestEnvelope> for RequestRedirect<'a, S, E>where
E: Error + DeserializeOwned + Send + Sync + 'a,
S: MembershipStorage + 'static,
Request<'a, S, E>: Clone,
Source§fn call(&mut self, req: RequestEnvelope) -> Self::Future
fn call(&mut self, req: RequestEnvelope) -> Self::Future
There are tons of extra allocations to avoid race conditions
This method works over a clone of [Request], we need to make sure
it keeps in sync with the originial version
Source§type Error = RequestError<E>
type Error = RequestError<E>
Errors produced by the service.
Source§type Future = Pin<Box<dyn Future<Output = Result<<RequestRedirect<'a, S, E> as Service<RequestEnvelope>>::Response, <RequestRedirect<'a, S, E> as Service<RequestEnvelope>>::Error>> + Send + 'a>>
type Future = Pin<Box<dyn Future<Output = Result<<RequestRedirect<'a, S, E> as Service<RequestEnvelope>>::Response, <RequestRedirect<'a, S, E> as Service<RequestEnvelope>>::Error>> + Send + 'a>>
The future response value.
Source§impl<S: MembershipStorage + 'static, P: ObjectPlacement + 'static> Service<RequestEnvelope> for Service<S, P>
Service implementation to handle RequestEnvelope request
impl<S: MembershipStorage + 'static, P: ObjectPlacement + 'static> Service<RequestEnvelope> for Service<S, P>
Service implementation to handle RequestEnvelope request
Source§fn call(&mut self, req: RequestEnvelope) -> Self::Future
fn call(&mut self, req: RequestEnvelope) -> Self::Future
Call a service locally, or return an error that will indicate whether this service is allocated somewhere else
Source§type Response = ResponseEnvelope
type Response = ResponseEnvelope
Responses given by the service.
Source§type Error = ResponseError
type Error = ResponseError
Errors produced by the service.
Auto Trait Implementations§
impl Freeze for RequestEnvelope
impl RefUnwindSafe for RequestEnvelope
impl Send for RequestEnvelope
impl Sync for RequestEnvelope
impl Unpin for RequestEnvelope
impl UnsafeUnpin for RequestEnvelope
impl UnwindSafe for RequestEnvelope
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,
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