pub enum MessageSource {
Single(Message),
Mmb(BundleProof),
}Expand description
The source of an [mpc::Message], which can be either a single message or a multimessage
bundle (in the form of a proof).
Variants§
Implementations§
Source§impl MessageSource
impl MessageSource
Sourcepub fn mpc_message(&self) -> Message
pub fn mpc_message(&self) -> Message
Construct a [mpc::Message] from the provided source.
Trait Implementations§
Source§impl Clone for MessageSource
impl Clone for MessageSource
Source§fn clone(&self) -> MessageSource
fn clone(&self) -> MessageSource
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 MessageSource
impl Debug for MessageSource
Source§impl<'de> Deserialize<'de> for MessageSource
impl<'de> Deserialize<'de> for MessageSource
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 From<BundleProof> for MessageSource
impl From<BundleProof> for MessageSource
Source§fn from(v: BundleProof) -> Self
fn from(v: BundleProof) -> Self
Converts to this type from the input type.
Source§impl From<Message> for MessageSource
impl From<Message> for MessageSource
Source§impl Hash for MessageSource
impl Hash for MessageSource
Source§impl Ord for MessageSource
impl Ord for MessageSource
Source§fn cmp(&self, other: &MessageSource) -> Ordering
fn cmp(&self, other: &MessageSource) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for MessageSource
impl PartialEq for MessageSource
Source§impl PartialOrd for MessageSource
impl PartialOrd for MessageSource
Source§impl Serialize for MessageSource
impl Serialize for MessageSource
Source§impl StrictDecode for MessageSource
impl StrictDecode for MessageSource
fn strict_decode(reader: &mut impl TypedRead) -> Result<Self, DecodeError>
fn strict_read(reader: impl ReadRaw) -> Result<Self, DecodeError>
Source§impl StrictDumb for MessageSource
impl StrictDumb for MessageSource
fn strict_dumb() -> Self
Source§impl StrictEncode for MessageSource
impl StrictEncode for MessageSource
fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>
fn strict_write(&self, writer: impl WriteRaw) -> Result<(), Error>
Source§impl StrictSum for MessageSource
impl StrictSum for MessageSource
const ALL_VARIANTS: &'static [(u8, &'static str)]
fn variant_name(&self) -> &'static str
fn strict_check_variants()
fn variant_name_by_tag(tag: u8) -> Option<VariantName>
fn variant_ord(&self) -> u8
Source§impl StrictType for MessageSource
impl StrictType for MessageSource
const STRICT_LIB_NAME: &'static str = dbc::LIB_NAME_BPCORE
fn strict_name() -> Option<TypeName>
Source§impl StrictUnion for MessageSource
impl StrictUnion for MessageSource
fn strict_type_info() -> TypeInfo<Self>
impl Eq for MessageSource
impl StructuralPartialEq for MessageSource
Auto Trait Implementations§
impl Freeze for MessageSource
impl RefUnwindSafe for MessageSource
impl Send for MessageSource
impl Sync for MessageSource
impl Unpin for MessageSource
impl UnwindSafe for MessageSource
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> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.