[−][src]Struct sn_data_types::MsgSender
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]
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 Clone for MsgSender
[src]
impl Debug for MsgSender
[src]
impl<'de> Deserialize<'de> for MsgSender
[src]
pub fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Eq for MsgSender
[src]
impl PartialEq<MsgSender> for MsgSender
[src]
impl Serialize for MsgSender
[src]
pub fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralEq for MsgSender
[src]
impl StructuralPartialEq for MsgSender
[src]
Auto Trait Implementations
impl RefUnwindSafe for MsgSender
impl Send for MsgSender
impl Sync for MsgSender
impl Unpin for MsgSender
impl UnwindSafe for MsgSender
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,