pub struct DosParams {
rate_per_sec: Option<BoundedInt32<0, { i32::MAX }>>,
burst_per_sec: Option<BoundedInt32<0, { i32::MAX }>>,
}Expand description
Extension to tell the introduction point to rate-limit.
When we sent this extension, it tells the introduction point to rate-limit the INTRODUCE2 messages it sends us to the rates shown here.
When this extension is not sent, the introduction point imposes a rate-limit depending on parameters in the latest consensus.
This extension requires protover HSIntro=5.
See https://spec.torproject.org/rend-spec/introduction-protocol.html#EST_INTRO_DOS_EXT.
Fields§
§rate_per_sec: Option<BoundedInt32<0, { i32::MAX }>>An optional parameter indicates the rate per second of INTRODUCE2 cell relayed to the service.
Min: 0, Max: 2147483647
burst_per_sec: Option<BoundedInt32<0, { i32::MAX }>>An optional parameter indicates the burst per second of INTRODUCE2 cell relayed to the service
Min: 0, Max: 2147483647
Implementations§
Trait Implementations§
Source§impl Ext for DosParams
impl Ext for DosParams
Source§type Id = EstIntroExtType
type Id = EstIntroExtType
An identifier kind used with this sort of extension. Read more
Source§fn type_id(&self) -> EstIntroExtType
fn type_id(&self) -> EstIntroExtType
The field-type id for this particular extension.
Source§fn take_body_from(b: &mut Reader<'_>) -> Result<Self>
fn take_body_from(b: &mut Reader<'_>) -> Result<Self>
Extract the body (not the type or the length) from a single
extension.
Source§fn write_body_onto<B: Writer + ?Sized>(&self, b: &mut B) -> EncodeResult<()>
fn write_body_onto<B: Writer + ?Sized>(&self, b: &mut B) -> EncodeResult<()>
Write the body (not the type or the length) for a single extension.
Source§impl From<DosParams> for EstablishIntroExt
impl From<DosParams> for EstablishIntroExt
Source§fn from(val: DosParams) -> EstablishIntroExt
fn from(val: DosParams) -> EstablishIntroExt
Converts to this type from the input type.
Source§impl HasMemoryCostStructural for DosParams
impl HasMemoryCostStructural for DosParams
Source§fn indirect_memory_cost(&self, et: EnabledToken) -> usize
fn indirect_memory_cost(&self, et: EnabledToken) -> usize
Memory cost of data stored out-of-line Read more
impl Eq for DosParams
impl StructuralPartialEq for DosParams
Auto Trait Implementations§
impl Freeze for DosParams
impl RefUnwindSafe for DosParams
impl Send for DosParams
impl Sync for DosParams
impl Unpin for DosParams
impl UnsafeUnpin for DosParams
impl UnwindSafe for DosParams
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> 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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> HasMemoryCost for Twhere
T: HasMemoryCostStructural,
impl<T> HasMemoryCost for Twhere
T: HasMemoryCostStructural,
Source§fn memory_cost(&self, et: EnabledToken) -> usize
fn memory_cost(&self, et: EnabledToken) -> usize
Returns the memory cost of
self, in bytes Read moreSource§impl<T> HasTypedMemoryCost<T> for Twhere
T: HasMemoryCost,
impl<T> HasTypedMemoryCost<T> for Twhere
T: HasMemoryCost,
Source§fn typed_memory_cost(&self, enabled: EnabledToken) -> TypedMemoryCost<T>
fn typed_memory_cost(&self, enabled: EnabledToken) -> TypedMemoryCost<T>
The cost, as a
TypedMemoryCost<T> rather than a raw usizeSource§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