pub struct PaddingNegotiate {
command: PaddingNegotiateCmd,
ito_low_ms: u16,
ito_high_ms: u16,
}
Expand description
A PaddingNegotiate message is used to negotiate channel padding.
Sent by a client to its guard node,
to instruct the relay to enable/disable channel padding.
(Not relevant for channels used only for directory lookups,
nor inter-relay channels.)
See padding-spec.txt
, section 2.2.
This message is constructed in the channel manager and transmitted by the reactor.
The Default
impl is the same as start_default()
Fields§
§command: PaddingNegotiateCmd
Whether to start or stop padding
ito_low_ms: u16
Suggested lower-bound value for inter-packet timeout in msec.
ito_high_ms: u16
Suggested upper-bound value for inter-packet timeout in msec.
Implementations§
Source§impl PaddingNegotiate
impl PaddingNegotiate
Sourcepub fn start_default() -> Self
pub fn start_default() -> Self
Create a new PADDING_NEGOTIATE START message requesting consensus timing parameters.
This message restores the state to the one which exists at channel startup.
Sourcepub fn start(
ito_low: IntegerMilliseconds<u16>,
ito_high: IntegerMilliseconds<u16>,
) -> Self
pub fn start( ito_low: IntegerMilliseconds<u16>, ito_high: IntegerMilliseconds<u16>, ) -> Self
Create a new PADDING_NEGOTIATE START message.
Sourcepub fn from_raw(
command: PaddingNegotiateCmd,
ito_low_ms: u16,
ito_high_ms: u16,
) -> Self
Available on crate feature testing
only.
pub fn from_raw( command: PaddingNegotiateCmd, ito_low_ms: u16, ito_high_ms: u16, ) -> Self
testing
only.Construct from the three fields: command, low_ms, high_ms, as a tuple
For testing only
Trait Implementations§
Source§impl Body for PaddingNegotiate
impl Body for PaddingNegotiate
Source§fn encode_onto<W: Writer + ?Sized>(self, w: &mut W) -> EncodeResult<()>
fn encode_onto<W: Writer + ?Sized>(self, w: &mut W) -> EncodeResult<()>
w
. Read moreSource§fn decode_from_reader(r: &mut Reader<'_>) -> Result<Self>
fn decode_from_reader(r: &mut Reader<'_>) -> Result<Self>
Source§impl ChanMsg for PaddingNegotiate
impl ChanMsg for PaddingNegotiate
Source§fn encode_onto<W: Writer + ?Sized>(self, w: &mut W) -> EncodeResult<()>
fn encode_onto<W: Writer + ?Sized>(self, w: &mut W) -> EncodeResult<()>
Source§impl Clone for PaddingNegotiate
impl Clone for PaddingNegotiate
Source§fn clone(&self) -> PaddingNegotiate
fn clone(&self) -> PaddingNegotiate
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for PaddingNegotiate
impl Debug for PaddingNegotiate
Source§impl Default for PaddingNegotiate
impl Default for PaddingNegotiate
Source§impl From<PaddingNegotiate> for AnyChanMsg
impl From<PaddingNegotiate> for AnyChanMsg
Source§fn from(m: PaddingNegotiate) -> AnyChanMsg
fn from(m: PaddingNegotiate) -> AnyChanMsg
Source§impl From<PaddingNegotiate> for AnyChanCell
impl From<PaddingNegotiate> for AnyChanCell
Source§fn from(body: PaddingNegotiate) -> AnyChanCell
fn from(body: PaddingNegotiate) -> AnyChanCell
Source§impl HasMemoryCostStructural for PaddingNegotiate
impl HasMemoryCostStructural for PaddingNegotiate
Source§fn indirect_memory_cost(&self, et: EnabledToken) -> usize
fn indirect_memory_cost(&self, et: EnabledToken) -> usize
Source§impl PartialEq for PaddingNegotiate
impl PartialEq for PaddingNegotiate
Source§impl Readable for PaddingNegotiate
impl Readable for PaddingNegotiate
impl Eq for PaddingNegotiate
impl StructuralPartialEq for PaddingNegotiate
Auto Trait Implementations§
impl Freeze for PaddingNegotiate
impl RefUnwindSafe for PaddingNegotiate
impl Send for PaddingNegotiate
impl Sync for PaddingNegotiate
impl Unpin for PaddingNegotiate
impl UnwindSafe for PaddingNegotiate
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
, which can then be
downcast
into Box<dyn ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
, which can then be further
downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<T> HasMemoryCost for Twhere
T: HasMemoryCostStructural,
impl<T> HasMemoryCost for Twhere
T: HasMemoryCostStructural,
§fn memory_cost(&self, et: EnabledToken) -> usize
fn memory_cost(&self, et: EnabledToken) -> usize
self
, in bytes Read more§impl<T> HasTypedMemoryCost<T> for Twhere
T: HasMemoryCost,
impl<T> HasTypedMemoryCost<T> for Twhere
T: HasMemoryCost,
§fn typed_memory_cost(&self, enabled: EnabledToken) -> TypedMemoryCost<T>
fn typed_memory_cost(&self, enabled: EnabledToken) -> TypedMemoryCost<T>
TypedMemoryCost<T>
rather than a raw usize
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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