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]

[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");

[src]

Returns the name of the Role.

Example

use sesstype::Role;

let alice = Role::new("Alice");
let _alice_name = alice.name();

Trait Implementations

impl Debug for Role
[src]

[src]

Formats the value using the given formatter.

impl ToString for Role
[src]

[src]

Converts the given value to a String. Read more