Struct stun_types::attribute::AlternateServer
source · pub struct AlternateServer { /* private fields */ }Expand description
The AlternateServer Attribute
Implementations§
source§impl AlternateServer
impl AlternateServer
sourcepub fn new(addr: SocketAddr) -> Self
pub fn new(addr: SocketAddr) -> Self
sourcepub fn server(&self) -> SocketAddr
pub fn server(&self) -> SocketAddr
Retrieve the server value
§Examples
let addr = "127.0.0.1:12345".parse().unwrap();
let server = AlternateServer::new(addr);
assert_eq!(server.server(), addr);Trait Implementations§
source§impl Attribute for AlternateServer
impl Attribute for AlternateServer
source§impl Clone for AlternateServer
impl Clone for AlternateServer
source§fn clone(&self) -> AlternateServer
fn clone(&self) -> AlternateServer
Returns a copy of the value. Read more
1.0.0 · 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 AlternateServer
impl Debug for AlternateServer
source§impl Display for AlternateServer
impl Display for AlternateServer
source§impl From<AlternateServer> for RawAttribute
impl From<AlternateServer> for RawAttribute
source§fn from(value: AlternateServer) -> RawAttribute
fn from(value: AlternateServer) -> RawAttribute
Converts to this type from the input type.
source§impl PartialEq for AlternateServer
impl PartialEq for AlternateServer
source§fn eq(&self, other: &AlternateServer) -> bool
fn eq(&self, other: &AlternateServer) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl TryFrom<&RawAttribute> for AlternateServer
impl TryFrom<&RawAttribute> for AlternateServer
§type Error = StunParseError
type Error = StunParseError
The type returned in the event of a conversion error.
impl Eq for AlternateServer
impl StructuralPartialEq for AlternateServer
Auto Trait Implementations§
impl Freeze for AlternateServer
impl RefUnwindSafe for AlternateServer
impl Send for AlternateServer
impl Sync for AlternateServer
impl Unpin for AlternateServer
impl UnwindSafe for AlternateServer
Blanket Implementations§
source§impl<E, T> AttributeFromRaw<E> for T
impl<E, T> AttributeFromRaw<E> for T
source§fn from_raw(raw: &RawAttribute) -> Result<T, E>
fn from_raw(raw: &RawAttribute) -> Result<T, E>
Convert an
Attribute from a RawAttributesource§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