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
sourceimpl 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.
sourceimpl 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
sourceimpl Clone for ChannelPaddingInstructions
impl Clone for ChannelPaddingInstructions
sourcefn clone(&self) -> ChannelPaddingInstructions
fn clone(&self) -> ChannelPaddingInstructions
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more