Skip to main content

GetAttrPropSpec

Trait GetAttrPropSpec 

Source
pub trait GetAttrPropSpec<AttrNames, Names> {
    type Output;

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

A trait for attribute property specifiers, which allows a great flexibility in how DatabaseProxy::get_dev_attr_prop works: the attributes are shaped by their names, the way any request on names is, see crate::dev::ToNamesSpec, and the properties of every one of them by the names of the properties, see GetPropSpec, which is what this is implemented on.

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(attrs: &mut AttrPropReply) -> Result<Self::Output>

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

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§

Source§

impl<'name, T: GetPropSpec<Names>, Names> GetAttrPropSpec<(&'name str, &'name str), Names> for T

Source§

type Output = (Result<<T as GetPropSpec<Names>>::Output, Error>, Result<<T as GetPropSpec<Names>>::Output, Error>)

Source§

impl<'name, T: GetPropSpec<Names>, Names> GetAttrPropSpec<(&'name str, &'name str, &'name str), Names> for T

Source§

type Output = (Result<<T as GetPropSpec<Names>>::Output, Error>, Result<<T as GetPropSpec<Names>>::Output, Error>, Result<<T as GetPropSpec<Names>>::Output, Error>)

Source§

impl<'name, T: GetPropSpec<Names>, Names> GetAttrPropSpec<(&'name str, &'name str, &'name str, &'name str), Names> for T

Source§

type Output = (Result<<T as GetPropSpec<Names>>::Output, Error>, Result<<T as GetPropSpec<Names>>::Output, Error>, Result<<T as GetPropSpec<Names>>::Output, Error>, Result<<T as GetPropSpec<Names>>::Output, Error>)

Source§

impl<'name, T: GetPropSpec<Names>, Names> GetAttrPropSpec<(&'name str, &'name str, &'name str, &'name str, &'name str), Names> for T

Source§

type Output = (Result<<T as GetPropSpec<Names>>::Output, Error>, Result<<T as GetPropSpec<Names>>::Output, Error>, Result<<T as GetPropSpec<Names>>::Output, Error>, Result<<T as GetPropSpec<Names>>::Output, Error>, Result<<T as GetPropSpec<Names>>::Output, Error>)

Source§

impl<'name, T: GetPropSpec<Names>, Names> GetAttrPropSpec<(&'name str, &'name str, &'name str, &'name str, &'name str, &'name str), Names> for T

Source§

type Output = (Result<<T as GetPropSpec<Names>>::Output, Error>, Result<<T as GetPropSpec<Names>>::Output, Error>, Result<<T as GetPropSpec<Names>>::Output, Error>, Result<<T as GetPropSpec<Names>>::Output, Error>, Result<<T as GetPropSpec<Names>>::Output, Error>, Result<<T as GetPropSpec<Names>>::Output, Error>)

Source§

impl<'name, T: GetPropSpec<Names>, Names> GetAttrPropSpec<(&'name str,), Names> for T

Source§

type Output = (Result<<T as GetPropSpec<Names>>::Output, Error>,)

Source§

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

Source§

type Output = [Result<<T as GetPropSpec<Names>>::Output, Error>; N]

Source§

impl<T: GetPropSpec<Names>, Names> GetAttrPropSpec<&Buf<str, 1>, Names> for T

Source§

type Output = Vec<Result<<T as GetPropSpec<Names>>::Output, Error>>

Source§

impl<T: GetPropSpec<Names>, Names> GetAttrPropSpec<&[&str], Names> for T

Source§

type Output = Vec<Result<<T as GetPropSpec<Names>>::Output, Error>>

Source§

impl<T: GetPropSpec<Names>, Names> GetAttrPropSpec<&str, Names> for T

One attribute: its properties are the output, and their failure is the output’s own since there is no slot of its own to carry it in.

Source§

type Output = <T as GetPropSpec<Names>>::Output

Source§

impl<T: GetPropSpec<Names>, Names> GetAttrPropSpec<All, Names> for T

Nothing was named here, so every attribute carries its own name.

Source§

impl<T: GetPropSpec<Names>, Names> GetAttrPropSpec<Buf<str, 1>, Names> for T

Source§

type Output = Vec<Result<<T as GetPropSpec<Names>>::Output, Error>>