#[repr(u8)]pub enum Server {
Pn = 0,
Lid = 1,
Group = 2,
Broadcast = 3,
Newsletter = 4,
Hosted = 5,
HostedLid = 6,
Messenger = 7,
Interop = 8,
Bot = 9,
Legacy = 10,
}Expand description
Known WhatsApp server identifiers.
Maps to the wire protocol’s AD_JID domain type (u8) and the @server suffix
in JID string representation.
Variants§
Pn = 0
Lid = 1
Group = 2
Broadcast = 3
Newsletter = 4
Hosted = 5
HostedLid = 6
Messenger = 7
Interop = 8
Bot = 9
Legacy = 10
Implementations§
Source§impl Server
impl Server
pub fn as_str(self) -> &'static str
Sourcepub fn is_pn_family(self) -> bool
pub fn is_pn_family(self) -> bool
Phone-number-namespaced servers (@s.whatsapp.net, @hosted).
The PN side of the LID↔PN mapping treats these as a single class.
Sourcepub fn is_lid_family(self) -> bool
pub fn is_lid_family(self) -> bool
LID-namespaced servers (@lid, @hosted.lid).
Trait Implementations§
Source§impl Ord for Server
impl Ord for Server
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for Server
impl PartialOrd for Server
impl Copy for Server
impl Eq for Server
impl StructuralPartialEq for Server
Auto Trait Implementations§
impl Freeze for Server
impl RefUnwindSafe for Server
impl Send for Server
impl Sync for Server
impl Unpin for Server
impl UnsafeUnpin for Server
impl UnwindSafe for Server
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read more