pub struct OpaqueIid(/* private fields */);
Expand description
An opaque interface identifier (IID).
Implementations§
Source§impl OpaqueIid
impl OpaqueIid
Sourcepub fn new<IF, ID>(
prefix: Subnet<Ipv6Addr>,
net_iface: IF,
net_id: Option<ID>,
dad_counter: OpaqueIidNonce,
secret_key: &IidSecret,
) -> Self
pub fn new<IF, ID>( prefix: Subnet<Ipv6Addr>, net_iface: IF, net_id: Option<ID>, dad_counter: OpaqueIidNonce, secret_key: &IidSecret, ) -> Self
Computes an opaque interface identifier (IID) using the algorithm in RFC 7217 Section 5.
Each argument to this function corresponds to an argument from Section 5 of the RFC:
prefix
corresponds to the “Prefix” argumentnet_iface
corresponds to the “Net_Iface” argumentnet_id
corresponds to the “Network_ID” argumentnonce
corresponds to the “DAD_Counter” argument if nonce =OpaqueIidNonce::DadCounter
secret_key
corresponds to the “secret_key” argument
Callers can set nonce
= [OpaqueIidNonce::Random(x)
] to pass in a
randomly-generated value. This guarantees the caller similar privacy
properties as the original algorithm specified in the RFC without requiring
that they keep state in the form of a DAD count.
For fixed inputs, the output of this function is guaranteed to be stable across versions of this codebase.
Sourcepub fn to_be_bytes(&self) -> [u8; 16]
pub fn to_be_bytes(&self) -> [u8; 16]
Copies the bytes from this identifier in Big Endian representation.
Trait Implementations§
Source§impl Ord for OpaqueIid
impl Ord for OpaqueIid
Source§impl PartialOrd for OpaqueIid
impl PartialOrd for OpaqueIid
impl Copy for OpaqueIid
impl Eq for OpaqueIid
impl StructuralPartialEq for OpaqueIid
Auto Trait Implementations§
impl Freeze for OpaqueIid
impl RefUnwindSafe for OpaqueIid
impl Send for OpaqueIid
impl Sync for OpaqueIid
impl Unpin for OpaqueIid
impl UnwindSafe for OpaqueIid
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
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§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<CC, BC, Meta> RecvFrameContext<Meta, BC> for CCwhere
Meta: ReceivableFrameMeta<CC, BC>,
impl<CC, BC, Meta> RecvFrameContext<Meta, BC> for CCwhere
Meta: ReceivableFrameMeta<CC, BC>,
Source§impl<CC, BC, Meta> SendFrameContext<BC, Meta> for CCwhere
Meta: SendableFrameMeta<CC, BC>,
impl<CC, BC, Meta> SendFrameContext<BC, Meta> for CCwhere
Meta: SendableFrameMeta<CC, BC>,
Source§fn send_frame<S>(
&mut self,
bindings_ctx: &mut BC,
metadata: Meta,
frame: S,
) -> Result<(), ErrorAndSerializer<SendFrameErrorReason, S>>where
S: Serializer,
<S as Serializer>::Buffer: BufferMut,
fn send_frame<S>(
&mut self,
bindings_ctx: &mut BC,
metadata: Meta,
frame: S,
) -> Result<(), ErrorAndSerializer<SendFrameErrorReason, S>>where
S: Serializer,
<S as Serializer>::Buffer: BufferMut,
Send a frame. Read more
Source§impl<Id, CC, BC> TimerHandler<BC, Id> for CCwhere
BC: TimerBindingsTypes,
Id: HandleableTimer<CC, BC>,
impl<Id, CC, BC> TimerHandler<BC, Id> for CCwhere
BC: TimerBindingsTypes,
Id: HandleableTimer<CC, BC>,
Source§fn handle_timer(
&mut self,
bindings_ctx: &mut BC,
dispatch: Id,
timer: <BC as TimerBindingsTypes>::UniqueTimerId,
)
fn handle_timer( &mut self, bindings_ctx: &mut BC, dispatch: Id, timer: <BC as TimerBindingsTypes>::UniqueTimerId, )
Handle a timer firing. Read more