Struct s2n_quic_core::inet::ipv6::SocketAddressV6
source · [−]#[repr(C)]pub struct SocketAddressV6 { /* private fields */ }Implementations
sourceimpl SocketAddressV6
impl SocketAddressV6
sourcepub const UNSPECIFIED: Self = Self {
ip: IpV6Address::UNSPECIFIED,
port: U16::ZERO,
}
pub const UNSPECIFIED: Self = Self { ip: IpV6Address::UNSPECIFIED, port: U16::ZERO, }
An unspecified SocketAddressV6
pub const fn ip(&self) -> &IpV6Address
pub fn port(&self) -> u16
pub fn set_port(&mut self, port: u16)
sourcepub fn unmap(self) -> SocketAddress
pub fn unmap(self) -> SocketAddress
Converts the IP address into IPv4 if it is mapped, otherwise the address is unchanged
pub const fn unicast_scope(&self) -> Option<UnicastScope>
Trait Implementations
sourceimpl AsBytes for SocketAddressV6
impl AsBytes for SocketAddressV6
sourcefn as_bytes(&self) -> &[u8]ⓘNotable traits for &[u8]impl<'_> Read for &[u8]impl<'_> Write for &mut [u8]
fn as_bytes(&self) -> &[u8]ⓘNotable traits for &[u8]impl<'_> Read for &[u8]impl<'_> Write for &mut [u8]
Gets the bytes of this value. Read more
sourcefn as_bytes_mut(&mut self) -> &mut [u8]ⓘNotable traits for &[u8]impl<'_> Read for &[u8]impl<'_> Write for &mut [u8] where
Self: FromBytes,
fn as_bytes_mut(&mut self) -> &mut [u8]ⓘNotable traits for &[u8]impl<'_> Read for &[u8]impl<'_> Write for &mut [u8] where
Self: FromBytes,
Gets the bytes of this value mutably. Read more
sourcefn write_to<B>(&self, bytes: B) -> Option<()> where
B: ByteSliceMut,
fn write_to<B>(&self, bytes: B) -> Option<()> where
B: ByteSliceMut,
Writes a copy of self to bytes. Read more
sourcefn write_to_prefix<B>(&self, bytes: B) -> Option<()> where
B: ByteSliceMut,
fn write_to_prefix<B>(&self, bytes: B) -> Option<()> where
B: ByteSliceMut,
Writes a copy of self to the prefix of bytes. Read more
sourcefn write_to_suffix<B>(&self, bytes: B) -> Option<()> where
B: ByteSliceMut,
fn write_to_suffix<B>(&self, bytes: B) -> Option<()> where
B: ByteSliceMut,
Writes a copy of self to the suffix of bytes. Read more
sourceimpl Clone for SocketAddressV6
impl Clone for SocketAddressV6
sourcefn clone(&self) -> SocketAddressV6
fn clone(&self) -> SocketAddressV6
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for SocketAddressV6
impl Debug for SocketAddressV6
sourceimpl<'a> DecoderValue<'a> for SocketAddressV6
impl<'a> DecoderValue<'a> for SocketAddressV6
fn decode(buffer: DecoderBuffer<'a>) -> DecoderBufferResult<'_, Self>
sourceimpl<'a> DecoderValue<'a> for &'a SocketAddressV6
impl<'a> DecoderValue<'a> for &'a SocketAddressV6
fn decode(buffer: DecoderBuffer<'a>) -> DecoderBufferResult<'_, Self>
sourceimpl<'a> DecoderValueMut<'a> for SocketAddressV6
impl<'a> DecoderValueMut<'a> for SocketAddressV6
fn decode_mut(buffer: DecoderBufferMut<'a>) -> DecoderBufferMutResult<'_, Self>
sourceimpl<'a> DecoderValueMut<'a> for &'a SocketAddressV6
impl<'a> DecoderValueMut<'a> for &'a SocketAddressV6
fn decode_mut(buffer: DecoderBufferMut<'a>) -> DecoderBufferMutResult<'a, Self>
sourceimpl<'a> DecoderValueMut<'a> for &'a mut SocketAddressV6
impl<'a> DecoderValueMut<'a> for &'a mut SocketAddressV6
fn decode_mut(buffer: DecoderBufferMut<'a>) -> DecoderBufferMutResult<'a, Self>
sourceimpl Default for SocketAddressV6
impl Default for SocketAddressV6
sourcefn default() -> SocketAddressV6
fn default() -> SocketAddressV6
Returns the “default value” for a type. Read more
sourceimpl Display for SocketAddressV6
impl Display for SocketAddressV6
sourceimpl EncoderValue for SocketAddressV6
impl EncoderValue for SocketAddressV6
sourcefn encoding_size(&self) -> usize
fn encoding_size(&self) -> usize
Returns the encoding size with no buffer constrains
sourcefn encoding_size_for_encoder<E: Encoder>(&self, _encoder: &E) -> usize
fn encoding_size_for_encoder<E: Encoder>(&self, _encoder: &E) -> usize
Returns the encoding size for the given encoder’s capacity
sourcefn encode_mut<E>(&mut self, encoder: &mut E) where
E: Encoder,
fn encode_mut<E>(&mut self, encoder: &mut E) where
E: Encoder,
Encodes the value into the encoder, while potentially mutating the value itself
sourceimpl<'a> EncoderValue for &'a SocketAddressV6
impl<'a> EncoderValue for &'a SocketAddressV6
sourcefn encoding_size(&self) -> usize
fn encoding_size(&self) -> usize
Returns the encoding size with no buffer constrains
sourcefn encoding_size_for_encoder<E: Encoder>(&self, _encoder: &E) -> usize
fn encoding_size_for_encoder<E: Encoder>(&self, _encoder: &E) -> usize
Returns the encoding size for the given encoder’s capacity
sourcefn encode_mut<E>(&mut self, encoder: &mut E) where
E: Encoder,
fn encode_mut<E>(&mut self, encoder: &mut E) where
E: Encoder,
Encodes the value into the encoder, while potentially mutating the value itself
sourceimpl<'a> EncoderValue for &'a mut SocketAddressV6
impl<'a> EncoderValue for &'a mut SocketAddressV6
sourcefn encoding_size(&self) -> usize
fn encoding_size(&self) -> usize
Returns the encoding size with no buffer constrains
sourcefn encoding_size_for_encoder<E: Encoder>(&self, _encoder: &E) -> usize
fn encoding_size_for_encoder<E: Encoder>(&self, _encoder: &E) -> usize
Returns the encoding size for the given encoder’s capacity
sourcefn encode_mut<E>(&mut self, encoder: &mut E) where
E: Encoder,
fn encode_mut<E>(&mut self, encoder: &mut E) where
E: Encoder,
Encodes the value into the encoder, while potentially mutating the value itself
sourceimpl From<&SocketAddressV6> for SocketAddrV6
impl From<&SocketAddressV6> for SocketAddrV6
sourcefn from(address: &SocketAddressV6) -> Self
fn from(address: &SocketAddressV6) -> Self
Converts to this type from the input type.
sourceimpl From<&SocketAddressV6> for SocketAddr
impl From<&SocketAddressV6> for SocketAddr
sourcefn from(address: &SocketAddressV6) -> Self
fn from(address: &SocketAddressV6) -> Self
Converts to this type from the input type.
sourceimpl From<(Ipv6Addr, u16)> for SocketAddressV6
impl From<(Ipv6Addr, u16)> for SocketAddressV6
sourceimpl From<SocketAddrV6> for SocketAddressV6
impl From<SocketAddrV6> for SocketAddressV6
sourcefn from(address: SocketAddrV6) -> Self
fn from(address: SocketAddrV6) -> Self
Converts to this type from the input type.
sourceimpl From<SocketAddressV6> for SocketAddress
impl From<SocketAddressV6> for SocketAddress
sourcefn from(addr: SocketAddressV6) -> Self
fn from(addr: SocketAddressV6) -> Self
Converts to this type from the input type.
sourceimpl From<SocketAddressV6> for SocketAddrV6
impl From<SocketAddressV6> for SocketAddrV6
sourcefn from(address: SocketAddressV6) -> Self
fn from(address: SocketAddressV6) -> Self
Converts to this type from the input type.
sourceimpl From<SocketAddressV6> for SocketAddr
impl From<SocketAddressV6> for SocketAddr
sourcefn from(address: SocketAddressV6) -> Self
fn from(address: SocketAddressV6) -> Self
Converts to this type from the input type.
sourceimpl From<SocketAddressV6> for LocalAddress
impl From<SocketAddressV6> for LocalAddress
sourcefn from(value: SocketAddressV6) -> Self
fn from(value: SocketAddressV6) -> Self
Converts to this type from the input type.
sourceimpl From<SocketAddressV6> for RemoteAddress
impl From<SocketAddressV6> for RemoteAddress
sourcefn from(value: SocketAddressV6) -> Self
fn from(value: SocketAddressV6) -> Self
Converts to this type from the input type.
sourceimpl FromBytes for SocketAddressV6
impl FromBytes for SocketAddressV6
sourcefn read_from<B>(bytes: B) -> Option<Self> where
B: ByteSlice,
fn read_from<B>(bytes: B) -> Option<Self> where
B: ByteSlice,
Reads a copy of Self from bytes. Read more
sourcefn read_from_prefix<B>(bytes: B) -> Option<Self> where
B: ByteSlice,
fn read_from_prefix<B>(bytes: B) -> Option<Self> where
B: ByteSlice,
Reads a copy of Self from the prefix of bytes. Read more
sourcefn read_from_suffix<B>(bytes: B) -> Option<Self> where
B: ByteSlice,
fn read_from_suffix<B>(bytes: B) -> Option<Self> where
B: ByteSlice,
Reads a copy of Self from the suffix of bytes. Read more
sourcefn new_zeroed() -> Self
fn new_zeroed() -> Self
Creates an instance of Self from zeroed bytes.
sourceimpl Hash for SocketAddressV6
impl Hash for SocketAddressV6
sourceimpl<'a> IntoEvent<SocketAddress<'a>> for &'a SocketAddressV6
impl<'a> IntoEvent<SocketAddress<'a>> for &'a SocketAddressV6
fn into_event(self) -> SocketAddress<'a>
sourceimpl Ord for SocketAddressV6
impl Ord for SocketAddressV6
sourceimpl PartialEq<SocketAddressV6> for SocketAddressV6
impl PartialEq<SocketAddressV6> for SocketAddressV6
sourceimpl PartialOrd<SocketAddressV6> for SocketAddressV6
impl PartialOrd<SocketAddressV6> for SocketAddressV6
sourcefn partial_cmp(&self, other: &Self) -> Option<Ordering>
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
This method returns an ordering between self and other values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
sourceimpl ToSocketAddrs for SocketAddressV6
impl ToSocketAddrs for SocketAddressV6
type Iter = Once<SocketAddr>
type Iter = Once<SocketAddr>
Returned iterator over socket addresses which this type may correspond to. Read more
sourcefn to_socket_addrs(&self) -> Result<Self::Iter>
fn to_socket_addrs(&self) -> Result<Self::Iter>
Converts this object to an iterator of resolved SocketAddrs. Read more
sourceimpl Unspecified for SocketAddressV6
impl Unspecified for SocketAddressV6
sourcefn is_unspecified(&self) -> bool
fn is_unspecified(&self) -> bool
Returns true if the value is unspecified
sourcefn filter_unspecified(self) -> Option<Self>
fn filter_unspecified(self) -> Option<Self>
Coerce a potentially unspecified value into an Option
impl Copy for SocketAddressV6
impl Eq for SocketAddressV6
impl StructuralEq for SocketAddressV6
impl Unaligned for SocketAddressV6
Auto Trait Implementations
impl RefUnwindSafe for SocketAddressV6
impl Send for SocketAddressV6
impl Sync for SocketAddressV6
impl Unpin for SocketAddressV6
impl UnwindSafe for SocketAddressV6
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> PacketPayloadEncoder for T where
T: EncoderValue,
impl<T> PacketPayloadEncoder for T where
T: EncoderValue,
sourcefn encoding_size_hint<E>(&mut self, encoder: &E, minimum_len: usize) -> usize where
E: Encoder,
fn encoding_size_hint<E>(&mut self, encoder: &E, minimum_len: usize) -> usize where
E: Encoder,
Returns an estimate of the encoding size of the payload. This may be inaccurate from what actually is encoded. Estimates should be less than or equal to what is actually written. Implementations can return 0 to skip encoding. Read more