[][src]Struct kayrx::jrpc::raw::server::Params

pub struct Params<'a> { /* fields omitted */ }

Access to the parameters of a request.

Methods

impl<'a> Params<'a>[src]

pub fn get<'k, T>(self, param: impl Into<ParamKey<'k>>) -> Result<T, ()> where
    T: DeserializeOwned
[src]

Returns a parameter of the request by name and decodes it.

Returns an error if the parameter doesn't exist or is of the wrong type.

pub fn get_raw<'k>(
    self,
    param: impl Into<ParamKey<'k>>
) -> Option<&'a JsonValue>
[src]

Returns a parameter of the request by name.

Trait Implementations

impl<'a> AsRef<Params> for Params<'a>[src]

impl<'a> Clone for Params<'a>[src]

impl<'a> Copy for Params<'a>[src]

impl<'a> Debug for Params<'a>[src]

impl<'a> From<Params<'a>> for &'a Params[src]

impl<'a> IntoIterator for Params<'a>[src]

type Item = (ParamKey<'a>, &'a JsonValue)

The type of the elements being iterated over.

type IntoIter = Iter<'a>

Which kind of iterator are we turning this into?

Auto Trait Implementations

impl<'a> RefUnwindSafe for Params<'a>

impl<'a> Send for Params<'a>

impl<'a> Sync for Params<'a>

impl<'a> Unpin for Params<'a>

impl<'a> UnwindSafe for Params<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,