Struct melnet::NetState [−][src]
pub struct NetState { /* fields omitted */ }
Expand description
A clonable structure representing a melnet state. All copies share the same routing table.
Implementations
Runs the netstate. Usually you would want to call this in a separate task. This doesn’t consume the netstate because the netstate struct can still be used to get out routes, register new verbs, etc even when it’s concurrently run as a server.
Registers a verb.
Adds a route to the routing table.
Obtains a vector of routes. This is guaranteed to be uniformly shuffled, so taking the first N elements is always fair.
Constructs a netstate with a given name.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for NetState
impl !UnwindSafe for NetState
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V