Skip to main content

Validator

Trait Validator 

Source
pub trait Validator:
    Clone
    + Copy
    + PartialEq
    + Eq
    + Hash
    + Debug { }
Expand description

A validator ID.

This is effectively a trait alias where a potential validator ID is any type which satisfies all of these bounds, and this is implemented for all such types.

The [BorshSerialize] implementation MUST be infallible if the underlying writer is infallible. The [BorshDeserialize] implementation MUST be infallible if it is deserializing a value which was successfully serialized, from a well-formed reader.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<V: Clone + Copy + PartialEq + Eq + Hash + Debug> Validator for V