pub enum ConversationSurface {
ClientPersonal {
user_id: String,
},
ClientGroup {
group_id: String,
},
MessagingPersonal {
provider: String,
account_id: String,
conversation_id: String,
lane_id: Option<String>,
},
MessagingGroup {
provider: String,
account_id: String,
conversation_id: String,
lane_id: Option<String>,
},
}Expand description
Canonical identity and delivery route of one isolated Conversation surface.
The wire representation is always the canonical string returned by
ConversationSurface::canonical_id. Trusted ingress owns construction;
clients and provider payloads must not choose a surface directly.
Variants§
Implementations§
Source§impl ConversationSurface
impl ConversationSurface
pub fn client_personal( user_id: impl Into<String>, ) -> Result<Self, SurfaceParseError>
pub fn client_group( group_id: impl Into<String>, ) -> Result<Self, SurfaceParseError>
pub fn messaging_personal( provider: impl Into<String>, account_id: impl Into<String>, conversation_id: impl Into<String>, lane_id: Option<String>, ) -> Result<Self, SurfaceParseError>
pub fn messaging_group( provider: impl Into<String>, account_id: impl Into<String>, conversation_id: impl Into<String>, lane_id: Option<String>, ) -> Result<Self, SurfaceParseError>
pub fn canonical_id(&self) -> String
pub fn is_personal(&self) -> bool
pub fn is_group(&self) -> bool
pub fn is_client(&self) -> bool
pub fn is_messaging(&self) -> bool
pub fn user_id(&self) -> Option<&str>
pub fn group_id(&self) -> Option<&str>
pub fn messaging_route(&self) -> Option<MessagingSurfaceRoute<'_>>
Trait Implementations§
Source§impl Clone for ConversationSurface
impl Clone for ConversationSurface
Source§fn clone(&self) -> ConversationSurface
fn clone(&self) -> ConversationSurface
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ConversationSurface
impl Debug for ConversationSurface
Source§impl<'de> Deserialize<'de> for ConversationSurface
impl<'de> Deserialize<'de> for ConversationSurface
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
Source§impl Display for ConversationSurface
impl Display for ConversationSurface
impl Eq for ConversationSurface
Source§impl FromStr for ConversationSurface
impl FromStr for ConversationSurface
Source§impl Hash for ConversationSurface
impl Hash for ConversationSurface
Source§impl PartialEq for ConversationSurface
impl PartialEq for ConversationSurface
Source§impl Serialize for ConversationSurface
impl Serialize for ConversationSurface
impl StructuralPartialEq for ConversationSurface
Auto Trait Implementations§
impl Freeze for ConversationSurface
impl RefUnwindSafe for ConversationSurface
impl Send for ConversationSurface
impl Sync for ConversationSurface
impl Unpin for ConversationSurface
impl UnsafeUnpin for ConversationSurface
impl UnwindSafe for ConversationSurface
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