Struct sesstype::Role
[−]
[src]
pub struct Role { /* fields omitted */ }
A participant of a multiparty session.
The Role
type represents an endpoint participant of a multiparty
session, and the name
is used for uniquely identifying the
participant within the session.
Typical usage of a Role
is to create once in a session, and reuse
the same Role
variable in the session.
Methods
impl Role
[src]
fn new(name: &str) -> Rc<Role>
[src]
Creates a new Role
with the given name.
The Role
returned is a reference counted pointer variable,
and within the same session, all references to the Role
should use the same variable.
Example
use sesstype::Role; let _alice = Role::new("Alice");
fn name(&self) -> &String
[src]
Returns the name of the Role
.
Example
use sesstype::Role; let alice = Role::new("Alice"); let _alice_name = alice.name();