wlan_hw_sim::event::branch

Struct DynamicTryAnd

Source
pub struct DynamicTryAnd<T>(/* private fields */);

Trait Implementations§

Source§

impl<T: Clone> Clone for DynamicTryAnd<T>

Source§

fn clone(&self) -> DynamicTryAnd<T>

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<T: Debug> Debug for DynamicTryAnd<T>

Source§

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

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

impl<S, E, H> Handler<S, E> for DynamicTryAnd<Vec<H>>
where H: Handler<S, E>, H::Output: Try,

Source§

type Output = <H as Handler<S, E>>::Output

The output of the event handler when it is matched.
Source§

fn call(&mut self, state: &mut S, event: &E) -> Handled<Self::Output>

Reacts to an event with some state. Read more
Source§

fn map<U, F>(self, f: F) -> Map<Self, F>
where Self: Sized, F: FnMut(Self::Output) -> U,

Maps the output of the event handler using the given function.
Source§

fn and<H2>(self, handler: H2) -> And<Self, H2>
where Self: Sized, H2: Handler<S, E>,

Executes the handler followed by the given handler if and only if the event is matched by the first.
Source§

fn try_and<H2>(self, handler: H2) -> TryAnd<Self, H2>
where Self: Sized, Self::Output: Try, H2: Handler<S, E>, H2::Output: Try<Residual = <Self::Output as Try>::Residual>,

Executes the handler followed by the given handler if and only if the event is matched by the first and the output is not an error. Read more
Source§

fn and_then<H2, F>(self, f: F) -> AndThen<Self, F>
where Self: Sized, H2: Handler<S, E>, F: FnMut(Self::Output) -> H2,

Executes the handler followed by the given function if and only if the event is matched by the first. The function is given the output of the handler and must return a compatible handler to execute next.
Source§

fn try_and_then<H2, F>(self, f: F) -> TryAndThen<Self, F>
where Self: Sized, Self::Output: Try, H2: Handler<S, E>, H2::Output: Try<Residual = <Self::Output as Try>::Residual>, F: FnMut(<Self::Output as Try>::Output) -> H2,

Executes the handler followed by the given function if and only if the event is matched by the first and the output is not an error. The function is given the output of the handler and must return a compatible handler to execute next. Read more
Source§

fn or<H2>(self, handler: H2) -> Or<Self, H2>
where Self: Sized, H2: Handler<S, E, Output = Self::Output>,

Executes the handler followed by the given handler if and only if the event is not matched by the first.
Source§

fn try_or<H2>(self, handler: H2) -> TryOr<Self, H2>
where Self: Sized, Self::Output: Try, H2: Handler<S, E, Output = Self::Output>,

Executes the handler followed by the given handler if the event is not matched by the first or the output is an error. That is, the given handler is executed only if the first fails: it does not match the event or it matches but returns an error. Read more
Source§

fn try_or_unmatched(self) -> TryOrUnmatched<Self>
where Self: Sized, Self::Output: Try,

Combines the handler’s output with [try_or] over Unmatched. Read more
Source§

fn context<C, O, D>(self, context: C) -> Context<Self, C, O, D>
where Self: Sized, Self::Output: Context<O, D>, C: Clone + Display + Send + Sync + 'static,

Provides context for fallible outputs (like Results).
Source§

fn expect<M>(self, message: M) -> Expect<Self, M>
where Self: Sized, Self::Output: Try, M: Display,

Panics with the given message if a fallible output indicates an error.
Source§

fn expect_matches_times<R>(self, expected: R) -> ExpectMatchesTimes<Self, R>
where Self: Sized, R: RangeBounds<usize>,

Panics if the event handler does not match an event a number of times within the specified range. Read more
Source§

fn by_ref(&mut self) -> ByRef<'_, Self>
where Self: Sized,

Borrows the event handler (rather than consuming it). Read more
Source§

impl<T: Copy> Copy for DynamicTryAnd<T>

Auto Trait Implementations§

§

impl<T> Freeze for DynamicTryAnd<T>
where T: Freeze,

§

impl<T> RefUnwindSafe for DynamicTryAnd<T>
where T: RefUnwindSafe,

§

impl<T> Send for DynamicTryAnd<T>
where T: Send,

§

impl<T> Sync for DynamicTryAnd<T>
where T: Sync,

§

impl<T> Unpin for DynamicTryAnd<T>
where T: Unpin,

§

impl<T> UnwindSafe for DynamicTryAnd<T>
where T: 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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
§

impl<T, D> Encode<Ambiguous1, D> for T
where D: ResourceDialect,

§

unsafe fn encode( self, _encoder: &mut Encoder<'_, D>, _offset: usize, _depth: Depth, ) -> Result<(), Error>

Encodes the object into the encoder’s buffers. Any handles stored in the object are swapped for Handle::INVALID. Read more
§

impl<T, D> Encode<Ambiguous2, D> for T
where D: ResourceDialect,

§

unsafe fn encode( self, _encoder: &mut Encoder<'_, D>, _offset: usize, _depth: Depth, ) -> Result<(), Error>

Encodes the object into the encoder’s buffers. Any handles stored in the object are swapped for Handle::INVALID. 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.

§

impl<T> IntoAny for T
where T: 'static + Send + Sync,

§

fn into_any(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

Cast the given object into a dyn std::any::Any.
Source§

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

Source§

const PRESENT: Presence<Self> = _

Source§

const ABSENT: Presence<Self> = _

§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

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

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

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<St> WithTag for St

§

fn tagged<T>(self, tag: T) -> Tagged<T, St>

Produce a new stream from this one which yields item tupled with a constant tag