pub struct V1LinkPayload {
nonce: V1Nonce,
last_seqno_sent: u64,
last_seqno_recv: u64,
desired_ux: V1DesiredUx,
}
Available on crate feature
conflux
only.Expand description
The v1 payload of a v1 ConfluxLink
or ConfluxLinked
message.
Fields§
§nonce: V1Nonce
Random 256-bit secret, for associating two circuits together.
last_seqno_sent: u64
The last sequence number sent.
last_seqno_recv: u64
The last sequence number received.
desired_ux: V1DesiredUx
The desired UX properties.
Implementations§
Source§impl V1LinkPayload
impl V1LinkPayload
Sourcepub fn nonce(&self) -> &V1Nonce
pub fn nonce(&self) -> &V1Nonce
Method borrowing V1LinkPayload::nonce
field.
Random 256-bit secret, for associating two circuits together.
Sourcepub fn last_seqno_sent(&self) -> &u64
pub fn last_seqno_sent(&self) -> &u64
Method borrowing V1LinkPayload::last_seqno_sent
field.
The last sequence number sent.
Sourcepub fn last_seqno_recv(&self) -> &u64
pub fn last_seqno_recv(&self) -> &u64
Method borrowing V1LinkPayload::last_seqno_recv
field.
The last sequence number received.
Sourcepub fn desired_ux(&self) -> &V1DesiredUx
pub fn desired_ux(&self) -> &V1DesiredUx
Method borrowing V1LinkPayload::desired_ux
field.
The desired UX properties.
Source§impl V1LinkPayload
impl V1LinkPayload
Sourcepub fn new(nonce: V1Nonce, desired_ux: V1DesiredUx) -> Self
pub fn new(nonce: V1Nonce, desired_ux: V1DesiredUx) -> Self
Create a new V1LinkPayload
.
Sourcepub fn set_last_seqno_sent(&mut self, seqno: u64)
pub fn set_last_seqno_sent(&mut self, seqno: u64)
Set the last sequence number sent.
Sourcepub fn set_last_seqno_recv(&mut self, seqno: u64)
pub fn set_last_seqno_recv(&mut self, seqno: u64)
Set the last sequence number received.
Trait Implementations§
Source§impl Body for V1LinkPayload
impl Body for V1LinkPayload
Source§fn decode_from_reader(r: &mut Reader<'_>) -> Result<Self>
fn decode_from_reader(r: &mut Reader<'_>) -> Result<Self>
Decode a relay cell body from a provided reader.
Source§impl Clone for V1LinkPayload
impl Clone for V1LinkPayload
Source§fn clone(&self) -> V1LinkPayload
fn clone(&self) -> V1LinkPayload
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for V1LinkPayload
impl Debug for V1LinkPayload
Source§impl HasMemoryCostStructural for V1LinkPayload
impl HasMemoryCostStructural for V1LinkPayload
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
Auto Trait Implementations§
impl Freeze for V1LinkPayload
impl RefUnwindSafe for V1LinkPayload
impl Send for V1LinkPayload
impl Sync for V1LinkPayload
impl Unpin for V1LinkPayload
impl UnwindSafe for V1LinkPayload
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<T> HasMemoryCost for Twhere
T: HasMemoryCostStructural,
impl<T> HasMemoryCost for Twhere
T: HasMemoryCostStructural,
§fn memory_cost(&self, et: EnabledToken) -> usize
fn memory_cost(&self, et: EnabledToken) -> usize
Returns the memory cost of
self
, in bytes Read more§impl<T> HasTypedMemoryCost<T> for Twhere
T: HasMemoryCost,
impl<T> HasTypedMemoryCost<T> for Twhere
T: HasMemoryCost,
§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