pub trait NetdocUnverified: Sized {
type Body: Sized;
type Signatures: NetdocParseableSignatures;
// Required methods
fn inspect_unverified(&self) -> (&Self::Body, &SignaturesData<Self>);
fn unwrap_unverified(self) -> (Self::Body, SignaturesData<Self>);
fn from_parts(body: Self::Body, signatures: SignaturesData<Self>) -> Self;
}Expand description
A network document with (unverified) signatures
Typically implemented automatically, for FooUnverified structs, as defined by
#[derive_deftly(NetdocParseableUnverified)].
Each FooUnverified embodies precisely the body Body
and the signatures data SignaturesData needed to verify it,
This trait is precisely the constructors/accessors/deconstructors.
Required Associated Types§
Sourcetype Signatures: NetdocParseableSignatures
type Signatures: NetdocParseableSignatures
The signatures (the whole signature section)
Required Methods§
Sourcefn inspect_unverified(&self) -> (&Self::Body, &SignaturesData<Self>)
fn inspect_unverified(&self) -> (&Self::Body, &SignaturesData<Self>)
Inspect the document (and its signatures)
§Security hazard
The signature has not been verified, so the returned data must not be trusted.
Sourcefn unwrap_unverified(self) -> (Self::Body, SignaturesData<Self>)
fn unwrap_unverified(self) -> (Self::Body, SignaturesData<Self>)
Obtain the actual document (and signatures), without verifying
§Security hazard
The signature has not been verified, so the returned data must not be trusted.
Sourcefn from_parts(body: Self::Body, signatures: SignaturesData<Self>) -> Self
fn from_parts(body: Self::Body, signatures: SignaturesData<Self>) -> Self
Construct a new NetdocUnverified from a body and signatures
(Called by code generated by #[derive_deftly(NetdocUnverified)].)
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.