pub enum Role {
Publisher,
Subscriber,
Both,
}
Expand description
Indicates the endpoint is a publisher, subscriber, or both.
Variants§
Implementations§
Source§impl Role
impl Role
Sourcepub fn is_publisher(&self) -> bool
pub fn is_publisher(&self) -> bool
Returns true if the role is publisher.
Sourcepub fn is_subscriber(&self) -> bool
pub fn is_subscriber(&self) -> bool
Returns true if the role is a subscriber.
Sourcepub fn is_compatible(&self, other: Role) -> bool
pub fn is_compatible(&self, other: Role) -> bool
Returns true if two endpoints are compatible.
Trait Implementations§
impl Copy for Role
impl Eq for Role
impl StructuralPartialEq for Role
Auto Trait Implementations§
impl Freeze for Role
impl RefUnwindSafe for Role
impl Send for Role
impl Sync for Role
impl Unpin for Role
impl UnwindSafe for Role
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more