Struct Payload
pub struct Payload<D> { /* private fields */ }Expand description
A payload wrapper containing both structured content and optional arbitrary bytes.
This is used by verifiable types (like SignedDebitAllowance) to include
auxiliary data that is also signed, enabling Local Laws to prove things
about signed messages.
Implementations§
§impl<D> Payload<D>
impl<D> Payload<D>
pub const fn with_auxiliary(content: D, auxiliary: Vec<u8>) -> Payload<D>
pub const fn with_auxiliary(content: D, auxiliary: Vec<u8>) -> Payload<D>
Create a new payload with auxiliary data.
pub fn into_signed<K>(
self,
signer: &K,
) -> Result<BaseSignedMessage<Payload<D>, Signature>, SignError>
pub fn into_signed<K>( self, signer: &K, ) -> Result<BaseSignedMessage<Payload<D>, Signature>, SignError>
Consume the payload and sign it with the given signer.
Trait Implementations§
§impl<'de, D> Deserialize<'de> for Payload<D>where
D: Deserialize<'de>,
impl<'de, D> Deserialize<'de> for Payload<D>where
D: Deserialize<'de>,
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Payload<D>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Payload<D>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl<D> Serialize for Payload<D>where
D: Serialize,
impl<D> Serialize for Payload<D>where
D: Serialize,
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl<D> Eq for Payload<D>where
D: Eq,
impl<D> StructuralPartialEq for Payload<D>
Auto Trait Implementations§
impl<D> Freeze for Payload<D>where
D: Freeze,
impl<D> RefUnwindSafe for Payload<D>where
D: RefUnwindSafe,
impl<D> Send for Payload<D>where
D: Send,
impl<D> Sync for Payload<D>where
D: Sync,
impl<D> Unpin for Payload<D>where
D: Unpin,
impl<D> UnwindSafe for Payload<D>where
D: 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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§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> 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