pub struct ExtraInfoUnverified {
pub sigs: SignaturesData<ExtraInfoUnverified>,
/* private fields */
}Available on crate feature
incomplete only.Expand description
Signed (unverified) form of ExtraInfo
Embodies:
ExtraInfo: document bodyExtraInfoSignatures: signatures
If this type was parsed from a document text, the signatures have not yet been verified.
Use a .verify_... method to obtain useable, verified, contents.
Fields§
§sigs: SignaturesData<ExtraInfoUnverified>Signatures
Implementations§
Source§impl ExtraInfoUnverified
impl ExtraInfoUnverified
Sourcepub fn verify(self, rd: &RouterDesc) -> Result<ExtraInfo, VerifyFailed>
pub fn verify(self, rd: &RouterDesc) -> Result<ExtraInfo, VerifyFailed>
Verifies an extra-info document.
This verification requires an already verified RouterDesc.
We do not work with time bounded values here, because all respective
time bounded values in extra-info documents match up with the respective
values in their associated RouterDesc. Instead, we simply require
RouterDesc to be timely for this to be timely as well.
For an extra-info document to be valid, the following constraints apply:
RouterDesc::routerimpliesExtraInfoIntroItem::nicknameRouterDesc::signing_keyimpliesExtraInfoIntroItem::fingerprintRouterDesc::identity_ed25519==ExtraInfo::identity_ed25519RouterDesc::published==ExtraInfo::publishedRouterDesc::extra_info_digestimplies this document.- This document has valid signatures.
Trait Implementations§
Source§impl Clone for ExtraInfoUnverified
impl Clone for ExtraInfoUnverified
Source§fn clone(&self) -> ExtraInfoUnverified
fn clone(&self) -> ExtraInfoUnverified
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ExtraInfoUnverified
impl Debug for ExtraInfoUnverified
Source§impl NetdocParseable for ExtraInfoUnverified
impl NetdocParseable for ExtraInfoUnverified
Source§fn doctype_for_error() -> &'static str
fn doctype_for_error() -> &'static str
Document type for errors, normally its intro keyword
Source§fn is_intro_item_keyword(kw: KeywordRef<'_>) -> bool
fn is_intro_item_keyword(kw: KeywordRef<'_>) -> bool
Is
Keyword an intro Item Keyword for this kind of document? Read moreSource§fn is_structural_keyword(kw: KeywordRef<'_>) -> Option<IsStructural>
fn is_structural_keyword(kw: KeywordRef<'_>) -> Option<IsStructural>
Is
Keyword a structural keyword for this kind of document? Read moreSource§fn from_items<'s>(
input: &mut ItemStream<'s>,
outer_stop: StopAt<impl StopPredicate>,
) -> Result<ExtraInfoUnverified, ErrorProblem>
fn from_items<'s>( input: &mut ItemStream<'s>, outer_stop: StopAt<impl StopPredicate>, ) -> Result<ExtraInfoUnverified, ErrorProblem>
Parse the document from a stream of Items Read more
Source§impl NetdocParseableUnverified for ExtraInfoUnverified
impl NetdocParseableUnverified for ExtraInfoUnverified
Source§type Signatures = ExtraInfoSignatures
type Signatures = ExtraInfoSignatures
The signatures (the whole signature section)
Source§fn inspect_unverified(
&self,
) -> (&Self::Body, &SignaturesData<ExtraInfoUnverified>)
fn inspect_unverified( &self, ) -> (&Self::Body, &SignaturesData<ExtraInfoUnverified>)
Inspect the document (and its signatures) Read more
Source§fn unwrap_unverified(self) -> (Self::Body, SignaturesData<ExtraInfoUnverified>)
fn unwrap_unverified(self) -> (Self::Body, SignaturesData<ExtraInfoUnverified>)
Obtain the actual document (and signatures), without verifying Read more
Source§fn from_parts(
body: Self::Body,
sigs: SignaturesData<ExtraInfoUnverified>,
) -> Self
fn from_parts( body: Self::Body, sigs: SignaturesData<ExtraInfoUnverified>, ) -> Self
Construct a new
NetdocParseableUnverified from a body and signatures Read moreAuto Trait Implementations§
impl Freeze for ExtraInfoUnverified
impl RefUnwindSafe for ExtraInfoUnverified
impl Send for ExtraInfoUnverified
impl Sync for ExtraInfoUnverified
impl Unpin for ExtraInfoUnverified
impl UnsafeUnpin for ExtraInfoUnverified
impl UnwindSafe for ExtraInfoUnverified
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more