pub struct PreferredAddress { /* private fields */ }Expand description
The server’s preferred address, which is used to effect a change in server address at the end of the handshake.
See section-18.2-4.31 and figure-22 for more details.
Implementations§
Source§impl PreferredAddress
impl PreferredAddress
pub fn address_v4(&self) -> SocketAddrV4
pub fn address_v6(&self) -> SocketAddrV6
pub fn connection_id(&self) -> ConnectionId
pub fn stateless_reset_token(&self) -> ResetToken
Source§impl PreferredAddress
impl PreferredAddress
pub fn set_address_v4(&mut self, val: SocketAddrV4) -> &mut Self
pub fn set_address_v6(&mut self, val: SocketAddrV6) -> &mut Self
pub fn set_connection_id(&mut self, val: ConnectionId) -> &mut Self
pub fn set_stateless_reset_token(&mut self, val: ResetToken) -> &mut Self
Source§impl PreferredAddress
impl PreferredAddress
Sourcepub fn new(
address_v4: SocketAddrV4,
address_v6: SocketAddrV6,
connection_id: ConnectionId,
stateless_reset_token: ResetToken,
) -> Self
pub fn new( address_v4: SocketAddrV4, address_v6: SocketAddrV6, connection_id: ConnectionId, stateless_reset_token: ResetToken, ) -> Self
Create a new preferred address.
Sourcepub fn encoding_size(&self) -> usize
pub fn encoding_size(&self) -> usize
Returns the encoding size of the preferred address.
Trait Implementations§
Source§impl Clone for PreferredAddress
impl Clone for PreferredAddress
Source§fn clone(&self) -> PreferredAddress
fn clone(&self) -> PreferredAddress
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PreferredAddress
impl Debug for PreferredAddress
Source§impl From<PreferredAddress> for ParameterValue
impl From<PreferredAddress> for ParameterValue
Source§fn from(value: PreferredAddress) -> Self
fn from(value: PreferredAddress) -> Self
Converts to this type from the input type.
Source§impl PartialEq for PreferredAddress
impl PartialEq for PreferredAddress
Source§impl TryFrom<ParameterValue> for PreferredAddress
impl TryFrom<ParameterValue> for PreferredAddress
Source§type Error = TryIntoError<ParameterValue>
type Error = TryIntoError<ParameterValue>
The type returned in the event of a conversion error.
Source§fn try_from(value: ParameterValue) -> Result<Self, TryIntoError<ParameterValue>>
fn try_from(value: ParameterValue) -> Result<Self, TryIntoError<ParameterValue>>
Performs the conversion.
impl Copy for PreferredAddress
impl StructuralPartialEq for PreferredAddress
Auto Trait Implementations§
impl Freeze for PreferredAddress
impl RefUnwindSafe for PreferredAddress
impl Send for PreferredAddress
impl Sync for PreferredAddress
impl Unpin for PreferredAddress
impl UnwindSafe for PreferredAddress
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)