pub struct FipsAddress(/* private fields */);Expand description
128-bit FIPS address with IPv6-compatible format.
The address uses the IPv6 Unique Local Address (ULA) prefix fd00::/8,
providing 120 bits for the node_addr hash. This format allows applications
designed for IP transports to bind to FIPS addresses via a TUN interface.
Implementations§
Source§impl FipsAddress
impl FipsAddress
Sourcepub fn from_bytes(bytes: [u8; 16]) -> Result<FipsAddress, IdentityError>
pub fn from_bytes(bytes: [u8; 16]) -> Result<FipsAddress, IdentityError>
Create a FipsAddress from a 16-byte array.
Sourcepub fn from_slice(slice: &[u8]) -> Result<FipsAddress, IdentityError>
pub fn from_slice(slice: &[u8]) -> Result<FipsAddress, IdentityError>
Create a FipsAddress from a slice.
Sourcepub fn from_node_addr(node_addr: &NodeAddr) -> FipsAddress
pub fn from_node_addr(node_addr: &NodeAddr) -> FipsAddress
Derive a FipsAddress from a NodeAddr.
Takes the first 15 bytes of the node_addr and prepends the 0xfd prefix.
Trait Implementations§
Source§impl Clone for FipsAddress
impl Clone for FipsAddress
Source§fn clone(&self) -> FipsAddress
fn clone(&self) -> FipsAddress
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 FipsAddress
impl Debug for FipsAddress
Source§impl Display for FipsAddress
impl Display for FipsAddress
Source§impl Hash for FipsAddress
impl Hash for FipsAddress
Source§impl PartialEq for FipsAddress
impl PartialEq for FipsAddress
Source§fn eq(&self, other: &FipsAddress) -> bool
fn eq(&self, other: &FipsAddress) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for FipsAddress
impl Eq for FipsAddress
impl StructuralPartialEq for FipsAddress
Auto Trait Implementations§
impl Freeze for FipsAddress
impl RefUnwindSafe for FipsAddress
impl Send for FipsAddress
impl Sync for FipsAddress
impl Unpin for FipsAddress
impl UnsafeUnpin for FipsAddress
impl UnwindSafe for FipsAddress
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,
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.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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