pub struct RawValue {
pub payloads: Vec<Payload>,
}Expand description
An unconverted set of payloads, used when the caller wants to defer deserialization.
Fields§
§payloads: Vec<Payload>The underlying payloads.
Implementations§
Source§impl RawValue
impl RawValue
Sourcepub fn empty() -> Self
pub fn empty() -> Self
A RawValue representing no meaningful data, containing a single default payload. This ensures the value can still be serialized as a single payload.
Sourcepub fn from_value<T: TemporalSerializable + 'static>(
value: &T,
converter: &PayloadConverter,
) -> RawValue
pub fn from_value<T: TemporalSerializable + 'static>( value: &T, converter: &PayloadConverter, ) -> RawValue
Create a RawValue by serializing a value with the given converter.
Sourcepub fn to_value<T: TemporalDeserializable + 'static>(
self,
converter: &PayloadConverter,
) -> T
pub fn to_value<T: TemporalDeserializable + 'static>( self, converter: &PayloadConverter, ) -> T
Deserialize this RawValue into a typed value using the given converter.
Trait Implementations§
Source§impl TemporalDeserializable for RawValue
impl TemporalDeserializable for RawValue
Source§fn from_payload(
_: &SerializationContext<'_>,
p: Payload,
) -> Result<Self, PayloadConversionError>
fn from_payload( _: &SerializationContext<'_>, p: Payload, ) -> Result<Self, PayloadConversionError>
Deserialize from a single
Payload.Source§fn from_payloads(
_: &SerializationContext<'_>,
payloads: Vec<Payload>,
) -> Result<Self, PayloadConversionError>
fn from_payloads( _: &SerializationContext<'_>, payloads: Vec<Payload>, ) -> Result<Self, PayloadConversionError>
Convert from multiple payloads. Override this for types representing multiple arguments.
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§impl TemporalSerializable for RawValue
impl TemporalSerializable for RawValue
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 to_payloads(
&self,
_: &SerializationContext<'_>,
) -> Result<Vec<Payload>, PayloadConversionError>
fn to_payloads( &self, _: &SerializationContext<'_>, ) -> Result<Vec<Payload>, PayloadConversionError>
Convert to multiple payloads. Override this for types representing multiple arguments.
Auto Trait Implementations§
impl Freeze for RawValue
impl RefUnwindSafe for RawValue
impl Send for RawValue
impl Sync for RawValue
impl Unpin for RawValue
impl UnsafeUnpin for RawValue
impl UnwindSafe for RawValue
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> 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