Struct tor_cell::chancell::msg::PaddingNegotiate
source · 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 PartialEq for PaddingNegotiate
impl PartialEq for PaddingNegotiate
source§fn eq(&self, other: &PaddingNegotiate) -> bool
fn eq(&self, other: &PaddingNegotiate) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.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§
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<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.