Skip to main content

ReadAttrSpec

Trait ReadAttrSpec 

Source
pub trait ReadAttrSpec<Names> {
    type Output;

    // Required method
    fn collect(reads: Vec<NamedResult<AttrRead<Value>>>) -> Result<Self::Output>;
}
Expand description

A trait for attribute specifiers, which allows a great flexibility in how DevProxy::read_attr 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

The final type of the output.

Required Methods§

Source

fn collect(reads: Vec<NamedResult<AttrRead<Value>>>) -> Result<Self::Output>

Build the output out of the readings, one per attribute.

The shape of the output is what the names that were given say it is, and what every reading is converted 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> ReadAttrSpec<(&'name str, &'name str, &'name str, &'name str, &'name str, &'name str)> for (A, B, C, D, E, F)

Source§

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

Source§

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

Source§

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

Source§

impl<'name, A, B> ReadAttrSpec<(&'name str, &'name str)> for (A, B)
where A: FromValue, B: FromValue,

Source§

impl<'name, A> ReadAttrSpec<(&'name str,)> for (A,)
where A: FromValue,

Implementors§