pub enum LearningSource {
Usync,
PeerPnMessage,
PeerLidMessage,
RecipientLatestLid,
MigrationSyncLatest,
MigrationSyncOld,
BlocklistActive,
BlocklistInactive,
Pairing,
DeviceNotification,
Other,
}Expand description
The source from which a LID-PN mapping was learned. Different sources have different trust levels and handling for identity changes.
Variants§
Usync
Mapping learned from usync (device sync) query response
PeerPnMessage
Mapping learned from incoming message with sender_lid attribute (sender is PN)
PeerLidMessage
Mapping learned from incoming message with sender_pn attribute (sender is LID)
RecipientLatestLid
Mapping learned when looking up recipient’s latest LID
MigrationSyncLatest
Mapping learned from latest history sync migration
MigrationSyncOld
Mapping learned from old history sync records
BlocklistActive
Mapping learned from active blocklist entry
BlocklistInactive
Mapping learned from inactive blocklist entry
Pairing
Mapping learned from device pairing (own JID <-> LID)
DeviceNotification
Mapping learned from device notification (when lid attribute present)
Other
Mapping learned from other/unknown source
Implementations§
Source§impl LearningSource
impl LearningSource
Sourcepub fn parse(s: &str) -> LearningSource
pub fn parse(s: &str) -> LearningSource
Parse from database string (unknown values map to Other)
Trait Implementations§
Source§impl Clone for LearningSource
impl Clone for LearningSource
Source§fn clone(&self) -> LearningSource
fn clone(&self) -> LearningSource
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LearningSource
impl Debug for LearningSource
Source§impl Default for LearningSource
impl Default for LearningSource
Source§fn default() -> LearningSource
fn default() -> LearningSource
Source§impl<'de> Deserialize<'de> for LearningSource
impl<'de> Deserialize<'de> for LearningSource
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<LearningSource, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<LearningSource, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Display for LearningSource
impl Display for LearningSource
Source§impl ParseStringEnum for LearningSource
impl ParseStringEnum for LearningSource
fn parse_from_str(s: &str) -> Result<LearningSource, Error>
Source§impl PartialEq for LearningSource
impl PartialEq for LearningSource
Source§impl Serialize for LearningSource
impl Serialize for LearningSource
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Source§impl TryFrom<&str> for LearningSource
impl TryFrom<&str> for LearningSource
impl Copy for LearningSource
impl Eq for LearningSource
impl StructuralPartialEq for LearningSource
Auto Trait Implementations§
impl Freeze for LearningSource
impl RefUnwindSafe for LearningSource
impl Send for LearningSource
impl Sync for LearningSource
impl Unpin for LearningSource
impl UnsafeUnpin for LearningSource
impl UnwindSafe for LearningSource
Blanket Implementations§
Source§impl<T> AggregateExpressionMethods for T
impl<T> AggregateExpressionMethods for T
Source§fn aggregate_distinct(self) -> Self::Outputwhere
Self: DistinctDsl,
fn aggregate_distinct(self) -> Self::Outputwhere
Self: DistinctDsl,
DISTINCT modifier for aggregate functions Read moreSource§fn aggregate_all(self) -> Self::Outputwhere
Self: AllDsl,
fn aggregate_all(self) -> Self::Outputwhere
Self: AllDsl,
ALL modifier for aggregate functions Read moreSource§fn aggregate_filter<P>(self, f: P) -> Self::Output
fn aggregate_filter<P>(self, f: P) -> Self::Output
Source§fn aggregate_order<O>(self, o: O) -> Self::Outputwhere
Self: OrderAggregateDsl<O>,
fn aggregate_order<O>(self, o: O) -> Self::Outputwhere
Self: OrderAggregateDsl<O>,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> IntoSql for T
impl<T> IntoSql for T
Source§fn into_sql<T>(self) -> Self::Expression
fn into_sql<T>(self) -> Self::Expression
self to an expression for Diesel’s query builder. Read moreSource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
&self to an expression for Diesel’s query builder. Read more