Skip to main content

Next

Struct Next 

Source
pub struct Next<'n> { /* private fields */ }
Expand description

Passes events on to the next Layer.

The last layer passes the events on to the format.

Implementations§

Source§

impl<'n> Next<'n>

Source

pub fn value(&self) -> SerializeRef<'_>

Returns the value of the current event.

This is only useful to describe the value. If the driver does not pass on values (see EventSink::DESCRIBED), this is a value that describes nothing.

Source

pub fn state(&self) -> &State

Returns the state.

Source

pub fn state_mut(&mut self) -> &mut State

Returns the state mutably.

Source

pub fn emit_key(&mut self, event: Event<'_>) -> Result<(), Error>

Passes an event on as map key.

This is like emit but the event is passed on with State::is_map_key set. This is useful for layers which hold back map keys and emit them later, when the state already describes the value.

Source

pub fn emit(&mut self, event: Event<'_>) -> Result<(), Error>

Passes an event on.

This can be invoked any number of times per event.

Auto Trait Implementations§

§

impl<'n> !RefUnwindSafe for Next<'n>

§

impl<'n> !Send for Next<'n>

§

impl<'n> !Sync for Next<'n>

§

impl<'n> !UnwindSafe for Next<'n>

§

impl<'n> Freeze for Next<'n>

§

impl<'n> Unpin for Next<'n>

§

impl<'n> UnsafeUnpin for Next<'n>

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 = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

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.