Struct aldrin::DiscovererEvent

source ·
pub struct DiscovererEvent<Key> { /* private fields */ }
Expand description

Event emitted by Discoverers.

Implementations§

source§

impl<Key> DiscovererEvent<Key>
where Key: Copy + Eq + Hash,

source

pub fn key(self) -> Key

Returns the key associated with this object.

source

pub fn kind(self) -> DiscovererEventKind

Specifies whether the object was created or destroyed.

source

pub fn object_id(self) -> ObjectId

Returns the object ID that prompted this event.

source

pub fn service_id( self, discoverer: &Discoverer<Key>, service: ServiceUuid, ) -> ServiceId

Returns a service ID that is owned by this event’s object.

This function can only be called for those events that are emitted when an object is created (kind returns DiscovererEventKind::Created). It will panic otherwise.

This function will also panic if service is not one of the UUIDs specified when object was called.

Trait Implementations§

source§

impl<Key: Clone> Clone for DiscovererEvent<Key>

source§

fn clone(&self) -> DiscovererEvent<Key>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<Key: Debug> Debug for DiscovererEvent<Key>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<Key> From<DiscovererIterEntry<'_, Key>> for DiscovererEvent<Key>
where Key: Copy + Eq + Hash,

source§

fn from(entry: DiscovererIterEntry<'_, Key>) -> Self

Converts to this type from the input type.
source§

impl<Key: Copy> Copy for DiscovererEvent<Key>

Auto Trait Implementations§

§

impl<Key> Freeze for DiscovererEvent<Key>
where Key: Freeze,

§

impl<Key> RefUnwindSafe for DiscovererEvent<Key>
where Key: RefUnwindSafe,

§

impl<Key> Send for DiscovererEvent<Key>
where Key: Send,

§

impl<Key> Sync for DiscovererEvent<Key>
where Key: Sync,

§

impl<Key> Unpin for DiscovererEvent<Key>
where Key: Unpin,

§

impl<Key> UnwindSafe for DiscovererEvent<Key>
where Key: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.