[][src]Struct sn_data_types::MsgSender

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]

pub fn client(key: PublicKey, sig: Signature) -> Result<Self>[src]

pub fn any_node(
    key: Ed25519PublicKey,
    duty: Duty,
    sig: Ed25519Signature
) -> Result<Self>
[src]

pub fn adult(
    key: Ed25519PublicKey,
    duty: AdultDuties,
    sig: Ed25519Signature
) -> Result<Self>
[src]

pub fn elder(
    key: TransientElderKey,
    duty: ElderDuties,
    sig: BlsSignatureShare
) -> Result<Self>
[src]

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 Clone for MsgSender[src]

impl Debug for MsgSender[src]

impl<'de> Deserialize<'de> for MsgSender[src]

impl Eq for MsgSender[src]

impl Hash for MsgSender[src]

impl PartialEq<MsgSender> for MsgSender[src]

impl Serialize for MsgSender[src]

impl StructuralEq for MsgSender[src]

impl StructuralPartialEq for MsgSender[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Member for T where
    T: Clone + Eq + Hash
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,