Trait Validator

Source
pub trait Validator:
    Debug
    + Serialize
    + DeserializeOwned
    + Default
    + Send
    + Sync {
    type Record: Record;
    type Error: Send;

    // Required method
    fn validate(
        self,
        record: &ProtoEnvelope<Self::Record>,
    ) -> Result<Self, Self::Error>;
}
Expand description

Trait implemented by the log state types.

Required Associated Types§

Source

type Record: Record

The type of record being validated.

Source

type Error: Send

The type of error returned when validation fails.

Required Methods§

Source

fn validate( self, record: &ProtoEnvelope<Self::Record>, ) -> Result<Self, Self::Error>

Validates the given record.

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§