pub struct Subscription {
pub channel_uid: String,
pub creation_id: CreationID,
pub app: String,
pub path: String,
pub message_list: Vec<String>,
}
Fields§
§channel_uid: String
The uid of the channel this subscription was made in
creation_id: CreationID
The id of the message that created this subscription
app: String
The app that is being subscribed to
path: String
The path of the app being subscribed to
message_list: Vec<String>
Implementations§
Source§impl Subscription
impl Subscription
Sourcepub fn add_to_message_list(&mut self, event: &Event) -> Option<u64>
pub fn add_to_message_list(&mut self, event: &Event) -> Option<u64>
Parses an event and adds it to the message list if it’s id
matches the Subscription
creation_id
. On success returns
the length of the message list.
Sourcepub fn pop_message(&mut self) -> Option<String>
pub fn pop_message(&mut self) -> Option<String>
Pops a message from the front of Subscription
’s message_list
.
If no messages are left, returns None
.
Trait Implementations§
Source§impl Clone for Subscription
impl Clone for Subscription
Source§fn clone(&self) -> Subscription
fn clone(&self) -> Subscription
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for Subscription
impl RefUnwindSafe for Subscription
impl Send for Subscription
impl Sync for Subscription
impl Unpin for Subscription
impl UnwindSafe for Subscription
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