fidl_table_validation

Trait Validate

Source
pub trait Validate<T> {
    type Error;

    // Required method
    fn validate(candidate: &T) -> Result<(), Self::Error>;
}
Expand description

Validations on T that can be run during construction of a validated fidl table by adding the attribute #[fidl_table_validator(YourImpl)] to the valid struct.

Required Associated Types§

Required Methods§

Source

fn validate(candidate: &T) -> Result<(), Self::Error>

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§