pub struct ProstSerializable<T: Message>(pub T);Expand description
Wrapper for protobuf messages that implements TemporalSerializable/TemporalDeserializable
using binary/protobuf encoding.
Tuple Fields§
§0: TTrait Implementations§
Source§impl<T> TemporalDeserializable for ProstSerializable<T>
impl<T> TemporalDeserializable for ProstSerializable<T>
Source§fn from_payload(
_: &SerializationContext<'_>,
p: Payload,
) -> Result<Self, PayloadConversionError>where
Self: Sized,
fn from_payload(
_: &SerializationContext<'_>,
p: Payload,
) -> Result<Self, PayloadConversionError>where
Self: Sized,
Deserialize from a single
Payload.Source§fn from_serde(
_: &dyn ErasedSerdePayloadConverter,
_ctx: &SerializationContext<'_>,
_: Payload,
) -> Result<Self, PayloadConversionError>
fn from_serde( _: &dyn ErasedSerdePayloadConverter, _ctx: &SerializationContext<'_>, _: Payload, ) -> Result<Self, PayloadConversionError>
Deserialize from a serde-based payload converter.
Source§fn from_payloads(
ctx: &SerializationContext<'_>,
payloads: Vec<Payload>,
) -> Result<Self, PayloadConversionError>
fn from_payloads( ctx: &SerializationContext<'_>, payloads: Vec<Payload>, ) -> Result<Self, PayloadConversionError>
Convert from multiple payloads. Override this for types representing multiple arguments.
Source§impl<T> TemporalSerializable for ProstSerializable<T>
impl<T> TemporalSerializable for ProstSerializable<T>
Source§fn to_payload(
&self,
_: &SerializationContext<'_>,
) -> Result<Payload, PayloadConversionError>
fn to_payload( &self, _: &SerializationContext<'_>, ) -> Result<Payload, PayloadConversionError>
Convert this value into a single
Payload.Source§fn as_serde(&self) -> Result<&dyn Serialize, PayloadConversionError>
fn as_serde(&self) -> Result<&dyn Serialize, PayloadConversionError>
Return a reference to this value as a serde-serializable trait object.
Source§fn to_payloads(
&self,
ctx: &SerializationContext<'_>,
) -> Result<Vec<Payload>, PayloadConversionError>
fn to_payloads( &self, ctx: &SerializationContext<'_>, ) -> Result<Vec<Payload>, PayloadConversionError>
Convert to multiple payloads. Override this for types representing multiple arguments.
Auto Trait Implementations§
impl<T> Freeze for ProstSerializable<T>where
T: Freeze,
impl<T> RefUnwindSafe for ProstSerializable<T>where
T: RefUnwindSafe,
impl<T> Send for ProstSerializable<T>
impl<T> Sync for ProstSerializable<T>
impl<T> Unpin for ProstSerializable<T>where
T: Unpin,
impl<T> UnsafeUnpin for ProstSerializable<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for ProstSerializable<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> 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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request