Struct azalea_protocol::ServerAddress
source · [−]Expand description
A host and port. It’s possible that the port doesn’t resolve to anything.
Examples
ServerAddress implements TryFrom<&str>, so you can use it like this:
use azalea_protocol::ServerAddress;
let addr = ServerAddress::try_from("localhost:25565").unwrap();
assert_eq!(addr.host, "localhost");
assert_eq!(addr.port, 25565);
Fields
host: String
port: u16
Trait Implementations
sourceimpl Debug for ServerAddress
impl Debug for ServerAddress
Auto Trait Implementations
impl RefUnwindSafe for ServerAddress
impl Send for ServerAddress
impl Sync for ServerAddress
impl Unpin for ServerAddress
impl UnwindSafe for ServerAddress
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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