Trait UniqueId

Source
pub trait UniqueId<T> {
    // Required method
    fn get_id(&self) -> T;
}
Expand description

UniqueId trait defines the interface of an object with an unique id, for general purposes crossing over many modules of fpRust.

§Remarks

This is inspired by Java/Swift Hashable.

Required Methods§

Source

fn get_id(&self) -> T

The callback when Subscription received the broadcasted value.

§Arguments
  • func - The given FnMut.

Implementors§

Source§

impl<Msg> UniqueId<String> for HandleAsync<Msg>
where Msg: Send + 'static,

Source§

impl<Msg, ContextValue> UniqueId<String> for ActorAsync<Msg, ContextValue>
where Msg: Send + 'static,

Source§

impl<T> UniqueId<String> for SubscriptionFunc<T>