Struct crystalorb_mock_network::MockNetwork[][src]

pub struct MockNetwork {
    pub connections: HashMap<ConnectionHandleType, MockConnection>,
}

Fields

connections: HashMap<ConnectionHandleType, MockConnection>

Implementations

Trait Implementations

Returns the “default value” for a type. Read more

The Connection structure that CrystalOrb will use to send/receive messages from a specific remote machine. This may probably be a wrapper to a mutable reference to some connection type that is used by your external networking library of choice, in which case a generic lifetime parameter is provided here that you can use. Read more

Get a specific connection given its connection handle.

Iterate through the available connections. For servers, this would be the list of current client connections that are still alive. For the client, this would only contain the connection to the server once the connection has been established. Read more

Optional: Send the given message to all active connections. A default implementation is already given that uses NetworkResource::connections and Connection::send. Read more

Optional: Send the given message to the given connection. A default implementation is already given that uses NetworkResource::get_connection and Connection::send. 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.

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

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more