pub trait WriteAttrSpec<'a>: Sized {
type Output;
type ReadNames;
type ReadSpec;
// Required methods
fn into_values(self) -> Vec<Named<Value>>;
fn collect(writes: Vec<Result<()>>) -> Result<Self::Output>;
}Expand description
An abstract specification of single to many AttrWrite-like, which is used by the
DevProxy::write_attr in order to be very flexible.
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§
Required Methods§
Sourcefn into_values(self) -> Vec<Named<Value>>
fn into_values(self) -> Vec<Named<Value>>
Make this write specification into the values it represents, each with the name of its attribute.
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<'a, A: IntoValue, B: IntoValue, C: IntoValue, D: IntoValue, E: IntoValue, F: IntoValue> WriteAttrSpec<'a> for ((&'a str, A), (&'a str, B), (&'a str, C), (&'a str, D), (&'a str, E), (&'a str, F))
impl<'a, A: IntoValue, B: IntoValue, C: IntoValue, D: IntoValue, E: IntoValue, F: IntoValue> WriteAttrSpec<'a> for ((&'a str, A), (&'a str, B), (&'a str, C), (&'a str, D), (&'a str, E), (&'a str, F))
type Output = (Result<(), Error>, Result<(), Error>, Result<(), Error>, Result<(), Error>, Result<(), Error>, Result<(), Error>)
type ReadNames = (&'a str, &'a str, &'a str, &'a str, &'a str, &'a str)
type ReadSpec = (A, B, C, D, E, F)
fn into_values(self) -> Vec<Named<Value>>
fn collect(writes: Vec<Result<()>>) -> Result<Self::Output>
Source§impl<'a, A: IntoValue, B: IntoValue, C: IntoValue, D: IntoValue, E: IntoValue> WriteAttrSpec<'a> for ((&'a str, A), (&'a str, B), (&'a str, C), (&'a str, D), (&'a str, E))
impl<'a, A: IntoValue, B: IntoValue, C: IntoValue, D: IntoValue, E: IntoValue> WriteAttrSpec<'a> for ((&'a str, A), (&'a str, B), (&'a str, C), (&'a str, D), (&'a str, E))
type Output = (Result<(), Error>, Result<(), Error>, Result<(), Error>, Result<(), Error>, Result<(), Error>)
type ReadNames = (&'a str, &'a str, &'a str, &'a str, &'a str)
type ReadSpec = (A, B, C, D, E)
fn into_values(self) -> Vec<Named<Value>>
fn collect(writes: Vec<Result<()>>) -> Result<Self::Output>
Source§impl<'a, A: IntoValue, B: IntoValue, C: IntoValue, D: IntoValue> WriteAttrSpec<'a> for ((&'a str, A), (&'a str, B), (&'a str, C), (&'a str, D))
impl<'a, A: IntoValue, B: IntoValue, C: IntoValue, D: IntoValue> WriteAttrSpec<'a> for ((&'a str, A), (&'a str, B), (&'a str, C), (&'a str, D))
type Output = (Result<(), Error>, Result<(), Error>, Result<(), Error>, Result<(), Error>)
type ReadNames = (&'a str, &'a str, &'a str, &'a str)
type ReadSpec = (A, B, C, D)
fn into_values(self) -> Vec<Named<Value>>
fn collect(writes: Vec<Result<()>>) -> Result<Self::Output>
Source§impl<'a, A: IntoValue, B: IntoValue, C: IntoValue> WriteAttrSpec<'a> for ((&'a str, A), (&'a str, B), (&'a str, C))
impl<'a, A: IntoValue, B: IntoValue, C: IntoValue> WriteAttrSpec<'a> for ((&'a str, A), (&'a str, B), (&'a str, C))
Source§impl<'a, A: IntoValue> WriteAttrSpec<'a> for ((&'a str, A),)
impl<'a, A: IntoValue> WriteAttrSpec<'a> for ((&'a str, A),)
Source§impl<'a, T: IntoValue, const N: usize> WriteAttrSpec<'a> for [(&'a str, T); N]
For a array of attributes.
impl<'a, T: IntoValue, const N: usize> WriteAttrSpec<'a> for [(&'a str, T); N]
For a array of attributes.
Source§impl<'a, T: IntoValue> WriteAttrSpec<'a> for (&'a str, T)
For a singe attribute.
impl<'a, T: IntoValue> WriteAttrSpec<'a> for (&'a str, T)
For a singe attribute.