Skip to main content

GetPropSpec

Trait GetPropSpec 

Source
pub trait GetPropSpec<Names> {
    type Output;

    // Required method
    fn collect(props: &mut PropReply) -> Result<Self::Output>;
}
Expand description

A trait for property specifiers, which allows a great flexibility in how DatabaseProxy::get_dev_prop works.

Supporting trait: it is only there to make this crate’s API easier to use, it is implemented for everything that API accepts and is not one to implement anywhere else.

Required Associated Types§

Source

type Output

Kind of output type returned.

Required Methods§

Source

fn collect(props: &mut PropReply) -> Result<Self::Output>

Build the output out of the properties, taking them one at a time.

The shape of the output is what the names that were given say it is, and what every property is parsed into is what this is implemented on.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<'name, A, B, C, D, E, F> GetPropSpec<(&'name str, &'name str, &'name str, &'name str, &'name str, &'name str)> for (A, B, C, D, E, F)
where A: FromProp, B: FromProp, C: FromProp, D: FromProp, E: FromProp, F: FromProp,

Source§

type Output = (Result<A, Error>, Result<B, Error>, Result<C, Error>, Result<D, Error>, Result<E, Error>, Result<F, Error>)

Source§

fn collect(props: &mut PropReply) -> Result<Self::Output>

Source§

impl<'name, A, B, C, D, E> GetPropSpec<(&'name str, &'name str, &'name str, &'name str, &'name str)> for (A, B, C, D, E)
where A: FromProp, B: FromProp, C: FromProp, D: FromProp, E: FromProp,

Source§

type Output = (Result<A, Error>, Result<B, Error>, Result<C, Error>, Result<D, Error>, Result<E, Error>)

Source§

fn collect(props: &mut PropReply) -> Result<Self::Output>

Source§

impl<'name, A, B, C, D> GetPropSpec<(&'name str, &'name str, &'name str, &'name str)> for (A, B, C, D)
where A: FromProp, B: FromProp, C: FromProp, D: FromProp,

Source§

type Output = (Result<A, Error>, Result<B, Error>, Result<C, Error>, Result<D, Error>)

Source§

fn collect(props: &mut PropReply) -> Result<Self::Output>

Source§

impl<'name, A, B, C> GetPropSpec<(&'name str, &'name str, &'name str)> for (A, B, C)
where A: FromProp, B: FromProp, C: FromProp,

Source§

type Output = (Result<A, Error>, Result<B, Error>, Result<C, Error>)

Source§

fn collect(props: &mut PropReply) -> Result<Self::Output>

Source§

impl<'name, A, B> GetPropSpec<(&'name str, &'name str)> for (A, B)
where A: FromProp, B: FromProp,

Source§

type Output = (Result<A, Error>, Result<B, Error>)

Source§

fn collect(props: &mut PropReply) -> Result<Self::Output>

Source§

impl<'name, A> GetPropSpec<(&'name str,)> for (A,)
where A: FromProp,

Source§

type Output = (Result<A, Error>,)

Source§

fn collect(props: &mut PropReply) -> Result<Self::Output>

Implementors§

Source§

impl GetPropSpec<All> for Spectrum<str>

Source§

impl<T, const N: usize> GetPropSpec<[&str; N]> for T
where T: FromProp,

Source§

impl<T> GetPropSpec<&Buf<str, 1>> for T
where T: FromProp,

Source§

impl<T> GetPropSpec<&[&str]> for T
where T: FromProp,

Source§

impl<T> GetPropSpec<&str> for T
where T: FromProp,

One name, one property: that property is the output, and its failure is the output’s own since there is no slot of its own to carry it in.

Source§

impl<T> GetPropSpec<Buf<str, 1>> for T
where T: FromProp,