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
sourceimpl 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 tupe
For testing only
Trait Implementations
sourceimpl Body for PaddingNegotiate
impl Body for PaddingNegotiate
sourcefn into_message(self) -> ChanMsg
fn into_message(self) -> ChanMsg
Convert this type into a ChanMsg, wrapped as appropriate.
sourcefn write_body_onto<W: Writer + ?Sized>(self, w: &mut W) -> EncodeResult<()>
fn write_body_onto<W: Writer + ?Sized>(self, w: &mut W) -> EncodeResult<()>
Consume this message and encode its body onto
w. Read moresourceimpl Clone for PaddingNegotiate
impl Clone for PaddingNegotiate
sourcefn clone(&self) -> PaddingNegotiate
fn clone(&self) -> PaddingNegotiate
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresourceimpl Debug for PaddingNegotiate
impl Debug for PaddingNegotiate
sourceimpl Default for PaddingNegotiate
impl Default for PaddingNegotiate
sourceimpl From<PaddingNegotiate> for ChanCell
impl From<PaddingNegotiate> for ChanCell
sourcefn from(body: PaddingNegotiate) -> ChanCell
fn from(body: PaddingNegotiate) -> ChanCell
Converts to this type from the input type.
sourceimpl PartialEq<PaddingNegotiate> for PaddingNegotiate
impl PartialEq<PaddingNegotiate> for PaddingNegotiate
sourcefn eq(&self, other: &PaddingNegotiate) -> bool
fn eq(&self, other: &PaddingNegotiate) -> bool
sourceimpl Readable for PaddingNegotiate
impl Readable for PaddingNegotiate
impl Eq for PaddingNegotiate
impl StructuralEq for PaddingNegotiate
impl StructuralPartialEq for PaddingNegotiate
Auto Trait Implementations
impl RefUnwindSafe for PaddingNegotiate
impl Send for PaddingNegotiate
impl Sync for PaddingNegotiate
impl Unpin for PaddingNegotiate
impl UnwindSafe for PaddingNegotiate
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more