Struct Subscriber

Source
pub struct Subscriber<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD, AT, Err> { /* private fields */ }
Expand description

The public-facing part of a subscriber (to be returned by Store::subscribe_area).

Trait Implementations§

Source§

impl<const MCL: usize, const MCC: usize, const MPL: usize, N: Debug, S: Debug, PD: Debug, AT: Debug, Err: Debug> Debug for Subscriber<MCL, MCC, MPL, N, S, PD, AT, Err>

Source§

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

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

impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD, AT, Err> Drop for Subscriber<MCL, MCC, MPL, N, S, PD, AT, Err>

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD, AT, Err> Producer for Subscriber<MCL, MCC, MPL, N, S, PD, AT, Err>
where N: Clone, S: PartialEq + Clone, PD: Clone, AT: Clone,

Source§

type Item = StoreEvent<MCL, MCC, MPL, N, S, PD, AT>

The sequence produced by this producer starts with arbitrarily many values of this type.
Source§

type Final = ()

The sequence produced by this producer ends with up to one value of this type.
Source§

type Error = Err

The type of errors the producer can emit instead of doing its job.
Source§

async fn produce( &mut self, ) -> Result<Either<Self::Item, Self::Final>, Self::Error>

Attempts to produce the next item, which is either a regular repeated item or the final item. Read more
Source§

fn produce_item( &mut self, ) -> impl Future<Output = Result<Self::Item, ProduceAtLeastError<Self::Final, Self::Error>>>

Tries to produce a regular item, and reports an error if the final item was produced instead. Read more
Source§

fn overwrite_full_slice( &mut self, buf: &mut [Self::Item], ) -> impl Future<Output = Result<(), ProduceAtLeastError<Self::Final, Self::Error>>>

Tries to completely overwrite a slice with items from a producer. Reports an error if the slice could not be overwritten completely. Read more

Auto Trait Implementations§

§

impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD, AT, Err> !Freeze for Subscriber<MCL, MCC, MPL, N, S, PD, AT, Err>

§

impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD, AT, Err> !RefUnwindSafe for Subscriber<MCL, MCC, MPL, N, S, PD, AT, Err>

§

impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD, AT, Err> !Send for Subscriber<MCL, MCC, MPL, N, S, PD, AT, Err>

§

impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD, AT, Err> !Sync for Subscriber<MCL, MCC, MPL, N, S, PD, AT, Err>

§

impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD, AT, Err> Unpin for Subscriber<MCL, MCC, MPL, N, S, PD, AT, Err>
where S: Unpin, AT: Unpin, N: Unpin, PD: Unpin,

§

impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD, AT, Err> !UnwindSafe for Subscriber<MCL, MCC, MPL, N, S, PD, AT, Err>

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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. 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.