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§
fn check(&self) -> Result<(), SerializationError>
Provided Methods§
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 u8
impl Valid for u8
fn check(&self) -> Result<(), SerializationError>
fn batch_check<'a>(
_batch: impl Iterator<Item = &'a Self>,
) -> Result<(), SerializationError>where
Self: 'a,
Source§impl Valid for u16
impl Valid for u16
fn check(&self) -> Result<(), SerializationError>
fn batch_check<'a>(
_batch: impl Iterator<Item = &'a Self>,
) -> Result<(), SerializationError>where
Self: 'a,
Source§impl Valid for u32
impl Valid for u32
fn check(&self) -> Result<(), SerializationError>
fn batch_check<'a>(
_batch: impl Iterator<Item = &'a Self>,
) -> Result<(), SerializationError>where
Self: 'a,
Source§impl Valid for u64
impl Valid for u64
fn check(&self) -> Result<(), SerializationError>
fn batch_check<'a>(
_batch: impl Iterator<Item = &'a Self>,
) -> Result<(), SerializationError>where
Self: 'a,
Source§impl Valid for usize
impl Valid for usize
fn check(&self) -> Result<(), SerializationError>
fn batch_check<'a>(
_batch: impl Iterator<Item = &'a Self>,
) -> Result<(), SerializationError>where
Self: 'a,
Source§impl Valid for BigUint
impl Valid for BigUint
fn check(&self) -> Result<(), SerializationError>
fn batch_check<'a>(
_batch: impl Iterator<Item = &'a Self>,
) -> Result<(), SerializationError>where
Self: 'a,
Source§impl<'b, T> Valid for Cow<'b, T>
impl<'b, T> Valid for Cow<'b, T>
fn check(&self) -> Result<(), SerializationError>
fn batch_check<'a>(
batch: impl Iterator<Item = &'a Self> + Send,
) -> Result<(), SerializationError>where
Self: 'a,
Source§impl<A, B, C, D> Valid for (A, B, C, D)
impl<A, B, C, D> Valid for (A, B, C, D)
Source§impl<A, B, C, D, E> Valid for (A, B, C, D, E)
impl<A, B, C, D, E> Valid for (A, B, C, D, E)
Source§impl<K: Valid, V: Valid> Valid for BTreeMap<K, V>
impl<K: Valid, V: Valid> Valid for BTreeMap<K, V>
fn check(&self) -> Result<(), SerializationError>
fn batch_check<'a>(
batch: impl Iterator<Item = &'a Self>,
) -> Result<(), SerializationError>where
Self: 'a,
Source§impl<T: Sync> Valid for PhantomData<T>
impl<T: Sync> Valid for PhantomData<T>
Source§impl<T: CanonicalDeserialize, const N: usize> Valid for [T; N]
impl<T: CanonicalDeserialize, const N: usize> Valid for [T; N]
fn check(&self) -> Result<(), SerializationError>
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>
Available on target_has_atomic=ptr only.
impl<T: Valid + Sync + Send> Valid for Arc<T>
Available on
target_has_atomic=ptr only.