Enum sn_messaging::section_info::Message[][src]

pub enum Message {
    GetSectionQuery(XorName),
    RegisterEndUserCmd {
        end_user: PublicKey,
        socketaddr_sig: Signature,
    },
    RegisterEndUserError(Error),
    GetSectionResponse(GetSectionResponse),
    SectionInfoUpdate(ErrorResponse),
}

Messages for exchanging network info, specifically on a target section for a msg.

Variants

GetSectionQuery(XorName)

Message to request information about the section that matches the given name.

RegisterEndUserCmd

An EndUser that wants to interact with the network, would send this cmd to the elders received in the GetSectionResponse.

Show fields

Fields of RegisterEndUserCmd

end_user: PublicKey

The end user public key.

socketaddr_sig: Signature

A sig over the socketaddr from which this request is made, by the secret key corresponding to the end_user public key.

RegisterEndUserError(Error)

If the sig over the sender socketaddr cannot be verified by the provided public key.

GetSectionResponse(GetSectionResponse)

Response to GetSectionQuery.

SectionInfoUpdate(ErrorResponse)

Updated info related to section

Implementations

impl Message[src]

pub fn from(bytes: Bytes) -> Result<Self>[src]

Convenience function to deserialize a ‘Query’ from bytes received over the wire. It returns an error if the bytes don’t correspond to a network info query.

pub fn serialize(&self) -> Result<Bytes>[src]

serialize this Query into bytes ready to be sent over the wire.

Trait Implementations

impl Debug for Message[src]

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

impl PartialEq<Message> for Message[src]

impl Serialize for Message[src]

impl StructuralPartialEq for Message[src]

Auto Trait Implementations

impl RefUnwindSafe for Message

impl Send for Message

impl Sync for Message

impl Unpin for Message

impl UnwindSafe for Message

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> Same<T> for T

type Output = T

Should always be Self

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>,