pub struct EventSubscription<'a> { /* private fields */ }
Implementations§
Source§impl<'a> EventSubscription<'a>
impl<'a> EventSubscription<'a>
Sourcepub fn new(source: Source<'a>) -> Self
pub fn new(source: Source<'a>) -> Self
Builds an EventSubscription.
§Arguments
source
– events source.
§Example
let account_id = AccountId::new("service_name", "svc.example.org");
let source = Source::Broadcast(&account_id, "v1", "rooms/+/events");
let subscription = EventSubscription::new(source);
Trait Implementations§
Source§impl<'a> SubscriptionTopic for EventSubscription<'a>
impl<'a> SubscriptionTopic for EventSubscription<'a>
Source§fn subscription_topic<A>(
&self,
_me: &A,
_me_version: &str,
) -> Result<String, Error>where
A: Addressable,
fn subscription_topic<A>(
&self,
_me: &A,
_me_version: &str,
) -> Result<String, Error>where
A: Addressable,
Returns a topic to subscribe to as string. Read more
Auto Trait Implementations§
impl<'a> Freeze for EventSubscription<'a>
impl<'a> RefUnwindSafe for EventSubscription<'a>
impl<'a> Send for EventSubscription<'a>
impl<'a> Sync for EventSubscription<'a>
impl<'a> Unpin for EventSubscription<'a>
impl<'a> UnwindSafe for EventSubscription<'a>
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