Consumer

Struct Consumer 

Source
pub struct Consumer<C, O>
where O: Observer<C>, C: Debug,
{ pub state: State, pub known_points: Vec<Point>, pub cursor: Option<Point>, pub tip: Option<Tip>, /* private fields */ }

Fields§

§state: State§known_points: Vec<Point>§cursor: Option<Point>§tip: Option<Tip>

Implementations§

Source§

impl<C, O> Consumer<C, O>

Source

pub fn initial(known_points: Vec<Point>, observer: O) -> Self

Trait Implementations§

Source§

impl<C, O> Agent for Consumer<C, O>
where C: BlockLike + EncodePayload + DecodePayload + Debug + 'static, O: Observer<C>,

Source§

type Message = Message<C>

Source§

fn is_done(&self) -> bool

Source§

fn has_agency(&self) -> bool

Source§

fn send_next(self, tx: &impl MachineOutput) -> Transition<Self>

Source§

fn receive_next(self, msg: Self::Message) -> Transition<Self>

Source§

impl<C, O> Debug for Consumer<C, O>
where O: Observer<C> + Debug, C: Debug + Debug,

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<C, O> Freeze for Consumer<C, O>
where O: Freeze, C: Freeze,

§

impl<C, O> RefUnwindSafe for Consumer<C, O>

§

impl<C, O> Send for Consumer<C, O>
where O: Send, C: Send,

§

impl<C, O> Sync for Consumer<C, O>
where O: Sync, C: Sync,

§

impl<C, O> Unpin for Consumer<C, O>
where O: Unpin, C: Unpin,

§

impl<C, O> UnwindSafe for Consumer<C, O>
where O: UnwindSafe, C: 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, 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.