Skip to main content

Input

Enum Input 

Source
pub enum Input<T> {
    StaticValue(T),
    Output(Output<T>),
}
Expand description

Wrapper for either static value or Output

Variants§

§

StaticValue(T)

§

Output(Output<T>)

Trait Implementations§

Source§

impl<T: Default> Default for Input<T>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl From<&str> for Input<Option<String>>

Source§

fn from(value: &str) -> Self

Converts to this type from the input type.
Source§

impl From<&str> for Input<String>

Source§

fn from(value: &str) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<[&str; N]> for Input<Option<Vec<String>>>

Source§

fn from(value: [&str; N]) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<[&str; N]> for Input<Vec<String>>

Source§

fn from(value: [&str; N]) -> Self

Converts to this type from the input type.
Source§

impl<T, const N: usize> From<[T; N]> for Input<Option<Vec<T>>>

Source§

fn from(value: [T; N]) -> Self

Converts to this type from the input type.
Source§

impl<T, const N: usize> From<[T; N]> for Input<Vec<T>>

Source§

fn from(value: [T; N]) -> Self

Converts to this type from the input type.
Source§

impl<V, V2: Into<V>> From<BTreeMap<&str, V2>> for Input<BTreeMap<String, V>>

Source§

fn from(value: BTreeMap<&str, V2>) -> Self

Converts to this type from the input type.
Source§

impl<T: Clone + Send + Sync + 'static> From<Output<T>> for Input<Option<T>>

Source§

fn from(output: Output<T>) -> Self

Converts to this type from the input type.
Source§

impl<T> From<Output<T>> for Input<T>

Source§

fn from(output: Output<T>) -> Self

Converts to this type from the input type.
Source§

impl<T> From<T> for Input<Option<T>>

Source§

fn from(value: T) -> Self

Converts to this type from the input type.
Source§

impl<T> From<T> for Input<T>

Source§

fn from(value: T) -> Input<T>

Converts to this type from the input type.
Source§

impl From<Vec<&str>> for Input<Option<Vec<String>>>

Source§

fn from(value: Vec<&str>) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<&str>> for Input<Vec<String>>

Source§

fn from(value: Vec<&str>) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

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

§

impl<T> !RefUnwindSafe for Input<T>

§

impl<T> Send for Input<T>
where T: Send + Sync,

§

impl<T> Sync for Input<T>
where T: Sync + Send,

§

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

§

impl<T> UnsafeUnpin for Input<T>
where T: UnsafeUnpin,

§

impl<T> !UnwindSafe for Input<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<T> From<!> for T

Source§

fn from(t: !) -> T

Converts to this type from the input type.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoRequest<T> for T

§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
§

impl<L> LayerExt<L> for L

§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in [Layered].
§

impl<O> ObjectMarkerFor<Local> for O
where O: 'static,

§

fn run_creation_hooks(report: ReportMut<'_, Dynamic, Local>)

§

impl<O> ObjectMarkerFor<SendSync> for O
where O: 'static + Send + Sync,

§

fn run_creation_hooks(report: ReportMut<'_>)

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

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more