Struct sage_broker::Session[][src]

pub struct Session { /* fields omitted */ }
Expand description

Represents a client and holds all of its data, may it be active or not. If the client is connected, peer is used to retrieve its information and send him packets.

Implementations

Creates a new session, giving a peer and an id

A unique ID that cannot be changed neither can collide with other instances of Session This ID is not part of MQTT specification but is used to ensure a new session can be created with a same client_id

Returns the client_id of the session

Assign the session to another peer

Gets the currently bound peer as as owning pointer

Gets the subscriptions this session has

Trait Implementations

Formats the value using the given formatter. Read more

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.

Performs the conversion.

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.