Struct sn_messaging::client::MsgSender [−][src]
pub struct MsgSender { /* fields omitted */ }
A msg sender in the larger network (clients + nodes), provides its identification by specifying type of entity, and providing a signature over it.
Implementations
impl MsgSender
[src]
impl MsgSender
[src]pub fn client(key: PublicKey, sig: Signature) -> Result<Self>
[src]
pub fn any_node(
key: Ed25519PublicKey,
duty: Duty,
sig: Ed25519Signature
) -> Result<Self>
[src]
key: Ed25519PublicKey,
duty: Duty,
sig: Ed25519Signature
) -> Result<Self>
pub fn adult(
key: Ed25519PublicKey,
duty: AdultDuties,
sig: Ed25519Signature
) -> Result<Self>
[src]
key: Ed25519PublicKey,
duty: AdultDuties,
sig: Ed25519Signature
) -> Result<Self>
pub fn elder(
key: TransientElderKey,
duty: ElderDuties,
sig: BlsSignatureShare
) -> Result<Self>
[src]
key: TransientElderKey,
duty: ElderDuties,
sig: BlsSignatureShare
) -> Result<Self>
pub fn section(key: TransientSectionKey, duty: ElderDuties) -> Result<Self>
[src]
pub fn id(&self) -> EntityId
[src]
The id of the sender.
pub fn address(&self) -> Address
[src]
The network address of the sender.
pub fn duty(&self) -> Option<Duty>
[src]
The duty under which the sender operated.
pub fn verify(&self, payload: &[u8]) -> bool
[src]
Verifies a payload as sent by this sender.
pub fn group_key_set(&self) -> Option<BlsPublicKeySet>
[src]
If sender is Elder
pub fn group_sig_share(&self) -> Option<SignatureShare>
[src]
If sender is Elder
pub fn is_client(&self) -> bool
[src]
pub fn is_any_node(&self) -> bool
[src]
pub fn is_adult(&self) -> bool
[src]
pub fn is_elder(&self) -> bool
[src]
pub fn is_section(&self) -> bool
[src]
Trait Implementations
impl<'de> Deserialize<'de> for MsgSender
[src]
impl<'de> Deserialize<'de> for MsgSender
[src]fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl StructuralEq for MsgSender
[src]
impl StructuralEq for MsgSender
[src]impl StructuralPartialEq for MsgSender
[src]
impl StructuralPartialEq for MsgSender
[src]Auto Trait Implementations
impl RefUnwindSafe for MsgSender
impl RefUnwindSafe for MsgSender
impl UnwindSafe for MsgSender
impl UnwindSafe for MsgSender
Blanket Implementations
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,