nanondef 0.0.1

A no-std, no-alloc, minimal NDEF encoding and decoding library.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::{error::ImplementationError, trace::MaybeDebug};

pub trait Validate: Sized + MaybeDebug {
    /// Error type returned by validation functions.
    type Error: ImplementationError;

    #[inline(always)]
    fn error(&self) -> Option<Self::Error> {
        None
    }

    #[inline(always)]
    fn is_valid(&self) -> bool {
        self.error().is_none()
    }
}