Trait traffloat_def::Xylem [−][src]
pub trait Xylem<S>: 'static where
S: Schema + ?Sized, {
type From: Sized;
type Args: Default;
fn convert_impl(
from: Self::From,
context: &mut <S as Schema>::Context,
args: &Self::Args
) -> Result<Self, <S as Schema>::Error>;
fn convert(
from: Self::From,
context: &mut <S as Schema>::Context,
args: &Self::Args
) -> Result<Self, <S as Schema>::Error> { ... }
}
Expand description
Implementors of this trait have a special conversion rule under the schema Schema
.
Associated Types
The args provided in the field.
The type must be a struct that implements Default
,
allowing the macro to instantiate it in the following format:
ⓘ
Args {
key1: value1,
key2: value2,
..Default::default()
}
where the macro has the field attribute #[xylem(key1 = value1, key2 = value2)]
.
Required methods
Provided methods
Implementations on Foreign Types
The unit type is used as the dummy type for the root scope.