Skip to main content

TransportEvent

Enum TransportEvent 

Source
pub enum TransportEvent<C, R> {
    Command {
        cmd: C,
        calling_uid: Option<u32>,
        reply: ReplySink<R>,
    },
    WatcherClosed(WatcherId),
    WatcherDied(WatcherId),
}
Expand description

A transport-agnostic command or watcher-lifecycle event.

Backends produce these; channel logic consumes them. C is the domain command type, R the domain reply type.

Variants§

§

Command

One command with the caller identity captured at delivery time and a one-shot reply target.

Fields

§cmd: C

The domain command.

§calling_uid: Option<u32>

The calling uid captured synchronously by the backend when the command arrived (None when the transport exposes no caller identity, e.g. a socket backend with no auth policy).

§reply: ReplySink<R>

The one-shot reply target, consumed exactly once.

§

WatcherClosed(WatcherId)

A watcher’s transport went away (socket EOF / hangup, or a client unwatch). The id was allocated by this loop.

§

WatcherDied(WatcherId)

A watcher died remotely (binder death-recipient callback). The id was allocated by this loop.

Trait Implementations§

Source§

impl<C: Debug, R: Debug> Debug for TransportEvent<C, R>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<C, R> !RefUnwindSafe for TransportEvent<C, R>

§

impl<C, R> !Sync for TransportEvent<C, R>

§

impl<C, R> !UnwindSafe for TransportEvent<C, R>

§

impl<C, R> Freeze for TransportEvent<C, R>
where C: Freeze,

§

impl<C, R> Send for TransportEvent<C, R>
where C: Send,

§

impl<C, R> Unpin for TransportEvent<C, R>
where C: Unpin,

§

impl<C, R> UnsafeUnpin for TransportEvent<C, R>
where C: UnsafeUnpin,

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

Source§

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

Source§

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.