pub struct PowParamsV1 { /* private fields */ }
Available on crate feature
hs-common
only.Expand description
The contents of a pow-params v1
line
These parameters are defined in the specifications for the v1
proof of work scheme:
https://spec.torproject.org/hspow-spec/v1-equix.html#parameter-descriptor
In addition to the scheme identifier itself, this type of
pow-params
line includes a 32-byte seed with its own expiration
timestamp, and a suggested effort value that clients may use for
their initial request.
Implementations§
Source§impl PowParamsV1
impl PowParamsV1
pub const fn new( seed: TimerangeBound<Seed>, suggested_effort: Effort, ) -> PowParamsV1
Source§impl PowParamsV1
impl PowParamsV1
Sourcepub fn seed(&self) -> &TimerangeBound<Seed>
pub fn seed(&self) -> &TimerangeBound<Seed>
Method borrowing PowParamsV1::seed
field.
Time limited Seed
Sourcepub fn suggested_effort(&self) -> Effort
pub fn suggested_effort(&self) -> Effort
Method returning copy of PowParamsV1::suggested_effort
field.
Last known suggested Effort
Trait Implementations§
Source§impl Clone for PowParamsV1
impl Clone for PowParamsV1
Source§fn clone(&self) -> PowParamsV1
fn clone(&self) -> PowParamsV1
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for PowParamsV1
impl RefUnwindSafe for PowParamsV1
impl Send for PowParamsV1
impl Sync for PowParamsV1
impl Unpin for PowParamsV1
impl UnwindSafe for PowParamsV1
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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