pub struct Channel {
pub channel_type: ChannelType,
pub identifier: String,
pub filter: Option<String>,
}Expand description
A channel that clients can subscribe to.
Fields§
§channel_type: ChannelTypeChannel type.
identifier: StringChannel identifier.
filter: Option<String>Optional sub-channel filter.
Implementations§
Source§impl Channel
impl Channel
Sourcepub fn parse(s: &str) -> Result<Self, RealtimeError>
pub fn parse(s: &str) -> Result<Self, RealtimeError>
Parse a channel string into a Channel.
Formats:
repo:owner/name- All events for a repositoryrepo:owner/name/prs- PR events onlyrepo:owner/name/issues- Issue events onlyuser:username- User notificationsorg:orgname- Organization events
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Channel
impl<'de> Deserialize<'de> for Channel
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Channel
impl StructuralPartialEq for Channel
Auto Trait Implementations§
impl Freeze for Channel
impl RefUnwindSafe for Channel
impl Send for Channel
impl Sync for Channel
impl Unpin for Channel
impl UnwindSafe for Channel
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