fidl_table_validation

Trait Converter

Source
pub trait Converter {
    type Fidl;
    type Validated;
    type Error;

    // Required methods
    fn try_from_fidl(value: Self::Fidl) -> Result<Self::Validated, Self::Error>;
    fn from_validated(validated: Self::Validated) -> Self::Fidl;
}
Expand description

A converter trait that can convert from FIDL types T into a validated type Validated.

Used in conjunction with fidl_field_type with custom converters.

Required Associated Types§

Required Methods§

Source

fn try_from_fidl(value: Self::Fidl) -> Result<Self::Validated, Self::Error>

Source

fn from_validated(validated: Self::Validated) -> Self::Fidl

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§