ark_serialize

Trait Valid

Source
pub trait Valid: Sized + Sync {
    // Required method
    fn check(&self) -> Result<(), SerializationError>;

    // Provided method
    fn batch_check<'a>(
        batch: impl Iterator<Item = &'a Self> + Send,
    ) -> Result<(), SerializationError>
       where Self: 'a { ... }
}

Required Methods§

Provided Methods§

Source

fn batch_check<'a>( batch: impl Iterator<Item = &'a Self> + Send, ) -> Result<(), SerializationError>
where Self: 'a,

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.

Implementations on Foreign Types§

Source§

impl Valid for bool

Source§

impl Valid for u8

Source§

fn check(&self) -> Result<(), SerializationError>

Source§

fn batch_check<'a>( _batch: impl Iterator<Item = &'a Self>, ) -> Result<(), SerializationError>
where Self: 'a,

Source§

impl Valid for u16

Source§

fn check(&self) -> Result<(), SerializationError>

Source§

fn batch_check<'a>( _batch: impl Iterator<Item = &'a Self>, ) -> Result<(), SerializationError>
where Self: 'a,

Source§

impl Valid for u32

Source§

fn check(&self) -> Result<(), SerializationError>

Source§

fn batch_check<'a>( _batch: impl Iterator<Item = &'a Self>, ) -> Result<(), SerializationError>
where Self: 'a,

Source§

impl Valid for u64

Source§

fn check(&self) -> Result<(), SerializationError>

Source§

fn batch_check<'a>( _batch: impl Iterator<Item = &'a Self>, ) -> Result<(), SerializationError>
where Self: 'a,

Source§

impl Valid for ()

Source§

impl Valid for usize

Source§

fn check(&self) -> Result<(), SerializationError>

Source§

fn batch_check<'a>( _batch: impl Iterator<Item = &'a Self>, ) -> Result<(), SerializationError>
where Self: 'a,

Source§

impl Valid for String

Source§

impl Valid for BigUint

Source§

fn check(&self) -> Result<(), SerializationError>

Source§

fn batch_check<'a>( _batch: impl Iterator<Item = &'a Self>, ) -> Result<(), SerializationError>
where Self: 'a,

Source§

impl<'b, T> Valid for Cow<'b, T>

Source§

fn check(&self) -> Result<(), SerializationError>

Source§

fn batch_check<'a>( batch: impl Iterator<Item = &'a Self> + Send, ) -> Result<(), SerializationError>
where Self: 'a,

Source§

impl<A> Valid for (A,)
where A: Valid,

Source§

impl<A, B> Valid for (A, B)
where A: Valid, B: Valid,

Source§

impl<A, B, C> Valid for (A, B, C)
where A: Valid, B: Valid, C: Valid,

Source§

impl<A, B, C, D> Valid for (A, B, C, D)
where A: Valid, B: Valid, C: Valid, D: Valid,

Source§

impl<K: Valid, V: Valid> Valid for BTreeMap<K, V>

Source§

fn check(&self) -> Result<(), SerializationError>

Source§

fn batch_check<'a>( batch: impl Iterator<Item = &'a Self>, ) -> Result<(), SerializationError>
where Self: 'a,

Source§

impl<T: Sync> Valid for PhantomData<T>

Source§

impl<T: CanonicalDeserialize, const N: usize> Valid for [T; N]

Source§

fn check(&self) -> Result<(), SerializationError>

Source§

fn batch_check<'a>( batch: impl Iterator<Item = &'a Self> + Send, ) -> Result<(), SerializationError>
where Self: 'a,

Source§

impl<T: Valid + Sync + Send> Valid for Arc<T>

Source§

fn check(&self) -> Result<(), SerializationError>

Source§

fn batch_check<'a>( batch: impl Iterator<Item = &'a Self> + Send, ) -> Result<(), SerializationError>
where Self: 'a,

Source§

impl<T: Valid> Valid for Option<T>

Source§

fn check(&self) -> Result<(), SerializationError>

Source§

fn batch_check<'a>( batch: impl Iterator<Item = &'a Self> + Send, ) -> Result<(), SerializationError>
where Self: 'a,

Source§

impl<T: Valid> Valid for Vec<T>

Source§

fn check(&self) -> Result<(), SerializationError>

Source§

fn batch_check<'a>( batch: impl Iterator<Item = &'a Self> + Send, ) -> Result<(), SerializationError>
where Self: 'a,

Source§

impl<V: Valid> Valid for BTreeSet<V>

Source§

fn check(&self) -> Result<(), SerializationError>

Source§

fn batch_check<'a>( batch: impl Iterator<Item = &'a Self> + Send, ) -> Result<(), SerializationError>
where Self: 'a,

Implementors§