Trait warg_protocol::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.

Object Safety§

This trait is not object safe.

Implementors§