pub struct TypedSubscription<T: 'static> {
pub handler: TypedHandler<T>,
pub handler_id: Ustr,
pub pattern: MStr<Pattern>,
pub priority: u32,
}Expand description
A typed subscription for pub/sub messaging.
Associates a handler with a topic pattern and priority.
Fields§
§handler: TypedHandler<T>The typed message handler.
handler_id: UstrCached handler ID for faster equality checks.
pattern: MStr<Pattern>The pattern for matching topics.
priority: u32Higher priority handlers receive messages first.
Implementations§
Source§impl<T: 'static> TypedSubscription<T>
impl<T: 'static> TypedSubscription<T>
Trait Implementations§
Source§impl<T: Clone + 'static> Clone for TypedSubscription<T>
impl<T: Clone + 'static> Clone for TypedSubscription<T>
Source§impl<T: 'static> Debug for TypedSubscription<T>
impl<T: 'static> Debug for TypedSubscription<T>
impl<T: 'static> Eq for TypedSubscription<T>
Source§impl<T: 'static> Equivalent<TypedSubscription<T>> for (MStr<Pattern>, Ustr)
impl<T: 'static> Equivalent<TypedSubscription<T>> for (MStr<Pattern>, Ustr)
Source§fn equivalent(&self, other: &TypedSubscription<T>) -> bool
fn equivalent(&self, other: &TypedSubscription<T>) -> bool
Compare self to
key and return true if they are equal.Source§impl<T: 'static> Hash for TypedSubscription<T>
impl<T: 'static> Hash for TypedSubscription<T>
Source§impl<T: 'static> Ord for TypedSubscription<T>
impl<T: 'static> Ord for TypedSubscription<T>
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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl<T: 'static> PartialEq for TypedSubscription<T>
impl<T: 'static> PartialEq for TypedSubscription<T>
Source§impl<T: 'static> PartialOrd for TypedSubscription<T>
impl<T: 'static> PartialOrd for TypedSubscription<T>
Auto Trait Implementations§
impl<T> !RefUnwindSafe for TypedSubscription<T>
impl<T> !Send for TypedSubscription<T>
impl<T> !Sync for TypedSubscription<T>
impl<T> !UnwindSafe for TypedSubscription<T>
impl<T> Freeze for TypedSubscription<T>where
TypedHandler<T>: Freeze,
impl<T> Unpin for TypedSubscription<T>where
TypedHandler<T>: Unpin,
impl<T> UnsafeUnpin for TypedSubscription<T>where
TypedHandler<T>: UnsafeUnpin,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more