pub struct PaddingNegotiate { /* private fields */ }
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()
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<()>
Consume this message and encode its body onto
w
. Read moreSource§fn decode_from_reader(r: &mut Reader<'_>) -> Result<Self>
fn decode_from_reader(r: &mut Reader<'_>) -> Result<Self>
Decode a channel cell body from a provided reader.
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<()>
Write the body of this message (not including length or command).
Source§impl Clone for PaddingNegotiate
impl Clone for PaddingNegotiate
Source§fn clone(&self) -> PaddingNegotiate
fn clone(&self) -> PaddingNegotiate
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 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
Converts to this type from the input type.
Source§impl From<PaddingNegotiate> for AnyChanCell
impl From<PaddingNegotiate> for AnyChanCell
Source§fn from(body: PaddingNegotiate) -> AnyChanCell
fn from(body: PaddingNegotiate) -> AnyChanCell
Converts to this type from the input type.
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
Memory cost of data stored out-of-line Read more
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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)
Converts
&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)
Converts
&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
Checks if this value is equivalent to the given key. Read more
§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
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 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>
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