Enum safe_network::messaging::MessageType[][src]

pub enum MessageType {
    SectionInfo {
        msg: SectionInfoMsg,
        dst_info: DstInfo,
    },
    Client {
        msg: ClientMsg,
        dst_info: DstInfo,
    },
    Routing {
        msg: RoutingMsg,
        dst_info: DstInfo,
    },
    Node {
        msg: NodeMsg,
        dst_info: DstInfo,
        src_section_pk: Option<PublicKey>,
    },
}
Expand description

Type of message. Note this is part of this crate’s public API but this enum is never serialised or even part of the message that is sent over the wire.

Variants

SectionInfo

Message about infrastructure (may be directed at nodes or clients)

Show fields

Fields of SectionInfo

msg: SectionInfoMsg

the message

dst_info: DstInfo

destination info

Client

Client message

Show fields

Fields of Client

msg: ClientMsg

the message

dst_info: DstInfo

destination info

Routing

Routing layer messages

Show fields

Fields of Routing

msg: RoutingMsg

the message

dst_info: DstInfo

destination info

Node

Node to node message

Show fields

Fields of Node

msg: NodeMsg

the message

dst_info: DstInfo

destination info

src_section_pk: Option<PublicKey>

source section pk

Implementations

serialize the message type into bytes ready to be sent over the wire.

Returns a WireMsg built from this MessageType

Update the destination info on the contained message

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.