Struct tor_proto::channel::params::ChannelPaddingInstructions
source · pub struct ChannelPaddingInstructions { /* private fields */ }Expand description
Initial, and, overall, padding instructions for channels
This is used both to generate the initial instructions, and to handle updates: when used for handling updates, it contains the last instructions that has been implemented.
Central code managing all channels will contain a ChannelPaddingInstructions,
and use ChannelPaddingInstructionsUpdatesBuilder to both update those Instructions
and generate ChannelPaddingInstructionsUpdates messages representing the changes.
The channel frontend (methods on Channel)
processes ChannelPaddingInstructionsUpdates from the channel manager,
possibly into channel-specific updates.
Default is a placeholder to use pending availability of a netdir etc.
Implementations§
source§impl ChannelPaddingInstructions
impl ChannelPaddingInstructions
sourcepub fn initial_update(&self) -> Option<ChannelPaddingInstructionsUpdates>
pub fn initial_update(&self) -> Option<ChannelPaddingInstructionsUpdates>
Create an update message which sets settings in self which
are not equal to the initial behaviour of the reactor.
Used during channel startup.
source§impl ChannelPaddingInstructions
impl ChannelPaddingInstructions
sourcepub fn start_update(&mut self) -> ChannelPaddingInstructionsUpdatesBuilder<'_>
pub fn start_update(&mut self) -> ChannelPaddingInstructionsUpdatesBuilder<'_>
Start building an update to channel padding instructions
The builder must not be dropped, once created;
instead, finish must be called.
So prepare your new values first, perhaps fallibly,
and only then create and use the builder and send the update, infallibly.
(This is because the builder uses self: ChannelPaddingInstructions
to track which values have changed,
and the values in self are updated immediately by the field update methods.)
Panics
ChannelPaddingInstructionsUpdatesBuilder panics if it is dropped.
Trait Implementations§
source§impl Clone for ChannelPaddingInstructions
impl Clone for ChannelPaddingInstructions
source§fn clone(&self) -> ChannelPaddingInstructions
fn clone(&self) -> ChannelPaddingInstructions
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for ChannelPaddingInstructions
impl Debug for ChannelPaddingInstructions
source§impl Default for ChannelPaddingInstructions
impl Default for ChannelPaddingInstructions
source§impl PartialEq<ChannelPaddingInstructions> for ChannelPaddingInstructions
impl PartialEq<ChannelPaddingInstructions> for ChannelPaddingInstructions
source§fn eq(&self, other: &ChannelPaddingInstructions) -> bool
fn eq(&self, other: &ChannelPaddingInstructions) -> bool
self and other values to be equal, and is used
by ==.impl Eq for ChannelPaddingInstructions
impl StructuralEq for ChannelPaddingInstructions
impl StructuralPartialEq for ChannelPaddingInstructions
Auto Trait Implementations§
impl RefUnwindSafe for ChannelPaddingInstructions
impl Send for ChannelPaddingInstructions
impl Sync for ChannelPaddingInstructions
impl Unpin for ChannelPaddingInstructions
impl UnwindSafe for ChannelPaddingInstructions
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.