Struct aldrin::DiscovererEvent

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

Event emitted by Discoverers.

Implementations§

source§

impl<'a, Key> DiscovererEvent<'a, Key>

source

pub fn kind(&self) -> DiscovererEventKind

Specifies whether the object was created or destroyed.

source

pub fn key(&self) -> &Key

Returns a references to the key associated with this object.

source

pub fn object_id(&self) -> ObjectId

Returns the object ID that prompted this event.

source

pub fn service_id(&self, uuid: 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 uuid is not one of the UUIDs specified when object was called.

Trait Implementations§

source§

impl<'a, Key: Debug> Debug for DiscovererEvent<'a, Key>

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a, Key> Freeze for DiscovererEvent<'a, Key>

§

impl<'a, Key> !RefUnwindSafe for DiscovererEvent<'a, Key>

§

impl<'a, Key> Send for DiscovererEvent<'a, Key>
where Key: Sync,

§

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

§

impl<'a, Key> Unpin for DiscovererEvent<'a, Key>

§

impl<'a, Key> !UnwindSafe for DiscovererEvent<'a, Key>

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, 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.