pub struct Relocate<S = String> {
pub hostname: S,
pub port: u16,
pub quiet: bool,
}Expand description
Closes the current MUD connection and causes a new connect to open on a new server.
See MXP specification: <RELOCATE>.
§Examples
assert_eq!(
"<RELOCATE new.server.com 1000>".parse::<mxp::Relocate>(),
Ok(mxp::Relocate {
hostname: "new.server.com".into(),
port: 1000,
quiet: false,
}),
);Fields§
§hostname: SHostname of the new connection.
port: u16Port of the new connection.
quiet: boolThe optional keyword QUIET can be used to suppress further output from the MUD.
When the closing </RELOCATE> tag is used, MUD output is resumed.
Implementations§
Trait Implementations§
impl<S: Copy> Copy for Relocate<S>
impl<S: Eq> Eq for Relocate<S>
impl<S> StructuralPartialEq for Relocate<S>
Auto Trait Implementations§
impl<S> Freeze for Relocate<S>where
S: Freeze,
impl<S> RefUnwindSafe for Relocate<S>where
S: RefUnwindSafe,
impl<S> Send for Relocate<S>where
S: Send,
impl<S> Sync for Relocate<S>where
S: Sync,
impl<S> Unpin for Relocate<S>where
S: Unpin,
impl<S> UnsafeUnpin for Relocate<S>where
S: UnsafeUnpin,
impl<S> UnwindSafe for Relocate<S>where
S: UnwindSafe,
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