pub trait Document:
AsRef<str>
+ Send
+ Sync {
// Required methods
fn new(document: impl Into<Arc<str>>) -> Result<Self, Error>
where Self: Sized;
fn validate(document: impl Into<Arc<str>>) -> bool
where Self: Sized;
fn document_name(&self) -> &'static str;
}Required Methods§
fn new(document: impl Into<Arc<str>>) -> Result<Self, Error>where
Self: Sized,
fn validate(document: impl Into<Arc<str>>) -> boolwhere
Self: Sized,
fn document_name(&self) -> &'static str
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".