pub trait NetdocSigned {
type Body: Sized;
type Signatures: Sized;
// Required methods
fn inspect_unverified(&self) -> (&Self::Body, &Self::Signatures);
fn unwrap_unverified(self) -> (Self::Body, Self::Signatures);
fn from_parts(body: Self::Body, signatures: Self::Signatures) -> Self;
}Available on crate feature
parse2 only.Expand description
A network document with (unverified) signatures
Typically implemented automatically, for FooSigned structs, as defined by
#[derive_deftly(NetdocSigned)].
Required Associated Types§
Sourcetype Signatures: Sized
type Signatures: Sized
The signatures (the whole signature section)
Required Methods§
Sourcefn inspect_unverified(&self) -> (&Self::Body, &Self::Signatures)
fn inspect_unverified(&self) -> (&Self::Body, &Self::Signatures)
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, Self::Signatures)
fn unwrap_unverified(self) -> (Self::Body, Self::Signatures)
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: Self::Signatures) -> Self
fn from_parts(body: Self::Body, signatures: Self::Signatures) -> Self
Construct a new NetdocSigned from a body and signatures
(Called by code generated by #[derive_deftly(NetdocSigned)].)
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.
Implementors§
Source§impl NetdocSigned for DirAuthKeyCertSigned
Available on crate feature plain-consensus only.
impl NetdocSigned for DirAuthKeyCertSigned
Available on crate feature
plain-consensus only.Source§impl NetdocSigned for tor_netdoc::parse2::poc::netstatus::NetworkStatusSignedMd
Available on crate feature plain-consensus only.
impl NetdocSigned for tor_netdoc::parse2::poc::netstatus::NetworkStatusSignedMd
Available on crate feature
plain-consensus only.type Body = NetworkStatus
type Signatures = NetworkStatusSignatures
Source§impl NetdocSigned for tor_netdoc::parse2::poc::netstatus::NetworkStatusSignedNs
Available on crate feature plain-consensus only.
impl NetdocSigned for tor_netdoc::parse2::poc::netstatus::NetworkStatusSignedNs
Available on crate feature
plain-consensus only.type Body = NetworkStatus
type Signatures = NetworkStatusSignatures
Source§impl NetdocSigned for tor_netdoc::parse2::poc::netstatus::NetworkStatusSignedVote
Available on crate feature plain-consensus only.
impl NetdocSigned for tor_netdoc::parse2::poc::netstatus::NetworkStatusSignedVote
Available on crate feature
plain-consensus only.