pub enum Signature {
Show 16 variants
LegacyED25519(LegacyED25519Signature),
RCD1(RCD1Signature),
ED25519(ED25519Signature),
BTC(BTCSignature),
BTCLegacy(BTCLegacySignature),
ETH(ETHSignature),
RsaSha256(RsaSha256Signature),
EcdsaSha256(EcdsaSha256Signature),
TypedData(TypedDataSignature),
Receipt(ReceiptSignature),
Partition(PartitionSignature),
Set(SignatureSet),
Remote(RemoteSignature),
Delegated(DelegatedSignature),
Internal(InternalSignature),
Authority(AuthoritySignature),
}Expand description
Main signature dispatch enum
Variants§
LegacyED25519(LegacyED25519Signature)
RCD1(RCD1Signature)
ED25519(ED25519Signature)
BTC(BTCSignature)
BTCLegacy(BTCLegacySignature)
ETH(ETHSignature)
RsaSha256(RsaSha256Signature)
EcdsaSha256(EcdsaSha256Signature)
TypedData(TypedDataSignature)
Receipt(ReceiptSignature)
Partition(PartitionSignature)
Set(SignatureSet)
Remote(RemoteSignature)
Delegated(DelegatedSignature)
Internal(InternalSignature)
Authority(AuthoritySignature)
Implementations§
Source§impl Signature
impl Signature
pub fn wire_tag(&self) -> &'static str
Sourcepub fn get_vote(&self) -> VoteType
pub fn get_vote(&self) -> VoteType
Get the vote from this signature Returns VoteType::Accept for signatures that don’t have a vote field
Sourcepub fn votes_accept(&self) -> bool
pub fn votes_accept(&self) -> bool
Check if this signature votes to accept
Sourcepub fn votes_reject(&self) -> bool
pub fn votes_reject(&self) -> bool
Check if this signature votes to reject
Sourcepub fn votes_abstain(&self) -> bool
pub fn votes_abstain(&self) -> bool
Check if this signature abstains
Sourcepub fn tally_votes(signatures: &[Signature]) -> VoteTally
pub fn tally_votes(signatures: &[Signature]) -> VoteTally
Tally votes from multiple signatures
Sourcepub fn tally_votes_nested(signatures: &[Signature]) -> VoteTally
pub fn tally_votes_nested(signatures: &[Signature]) -> VoteTally
Tally votes from multiple signatures (nested - includes nested signatures in sets)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
impl<'de> Deserialize<'de> for Signature
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
impl Eq for Signature
impl StructuralPartialEq for Signature
Auto Trait Implementations§
impl Freeze for Signature
impl RefUnwindSafe for Signature
impl Send for Signature
impl Sync for Signature
impl Unpin for Signature
impl UnwindSafe for Signature
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