starlane_space::space::wave::exchange

Struct InCtxDef

Source
pub struct InCtxDef<'a, I, T>
where T: Clone,
{ pub transmitter: Cow<'a, T>, pub input: &'a I, pub logger: SpanLogger, /* private fields */ }

Fields§

§transmitter: Cow<'a, T>§input: &'a I§logger: SpanLogger

Implementations§

Source§

impl<'a, I> InCtxDef<'a, I, ProtoTransmitterDef<AsyncRouter, Exchanger>>

Source

pub fn push_from(self, from: Surface) -> InCtx<'a, I>

Source§

impl<'a, I> InCtxDef<'a, I, ProtoTransmitterDef<SyncRouter, ()>>

Source

pub fn push_from(self, from: Surface) -> InCtx<'a, I>

Source§

impl<'a, I, T> InCtxDef<'a, I, T>
where T: Clone,

Source

pub fn new( root: &'a RootInCtxDef<T>, input: &'a I, tx: Cow<'a, T>, logger: SpanLogger, ) -> Self

Source

pub fn from(&self) -> &Surface

Source

pub fn to(&self) -> &Surface

Source

pub fn push(self) -> InCtxDef<'a, I, T>

Source

pub fn push_input_ref<I2>(self, input: &'a I2) -> InCtxDef<'a, I2, T>

Source

pub fn wave(&self) -> &DirectedWave

Source

pub fn ok_body(self, substance: Substance) -> ReflectedCore

Source

pub fn not_found(self) -> ReflectedCore

Source

pub fn forbidden(self) -> ReflectedCore

Source

pub fn bad_request(self) -> ReflectedCore

Source

pub fn err(self, err: SpaceErr) -> ReflectedCore

Trait Implementations§

Source§

impl<'a, I, T> Deref for InCtxDef<'a, I, T>
where T: Clone,

Source§

type Target = I

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.

Auto Trait Implementations§

§

impl<'a, I, T> Freeze for InCtxDef<'a, I, T>
where T: Freeze,

§

impl<'a, I, T> !RefUnwindSafe for InCtxDef<'a, I, T>

§

impl<'a, I, T> Send for InCtxDef<'a, I, T>
where T: Send + Sync, I: Sync,

§

impl<'a, I, T> Sync for InCtxDef<'a, I, T>
where T: Sync, I: Sync,

§

impl<'a, I, T> Unpin for InCtxDef<'a, I, T>
where T: Unpin,

§

impl<'a, I, T> !UnwindSafe for InCtxDef<'a, I, T>

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<I, T> ExtractContext<I, ()> for T

Source§

fn extract_context(self, _original_input: I)

Given the context attached to a nom error, and given the original input to the nom parser, extract more the useful context information. 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<I> RecreateContext<I> for I

Source§

fn recreate_context(_original_input: I, tail: I) -> I

Given the original input, as well as the context reported by nom, recreate a context in the original string where the error occurred. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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.