pub struct WhoIsServerValue {
pub host: WhoIsHost,
pub query: Option<String>,
pub punycode: bool,
}Expand description
The model of a WHOIS server.
Fields§
§host: WhoIsHostThe host of this server.
query: Option<String>The query to send, where $addr is replaced by the target. None means the default query, "$addr\r\n".
punycode: boolWhether this server wants a domain in its ASCII (Punycode) form. The default value is true.
Implementations§
Source§impl WhoIsServerValue
impl WhoIsServerValue
Sourcepub fn from_value(value: &Value) -> Result<WhoIsServerValue, WhoIsError>
pub fn from_value(value: &Value) -> Result<WhoIsServerValue, WhoIsError>
Read a server from an entry of a server list. The entry is either a host string, or an object with a host string and optional query and punycode fields.
Sourcepub fn from_string<S: AsRef<str>>(
string: S,
) -> Result<WhoIsServerValue, WhoIsError>
pub fn from_string<S: AsRef<str>>( string: S, ) -> Result<WhoIsServerValue, WhoIsError>
Read a server from a host string, using the default query and the default punycode setting.
Trait Implementations§
Source§impl Clone for WhoIsServerValue
impl Clone for WhoIsServerValue
Source§fn clone(&self) -> WhoIsServerValue
fn clone(&self) -> WhoIsServerValue
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for WhoIsServerValue
impl RefUnwindSafe for WhoIsServerValue
impl Send for WhoIsServerValue
impl Sync for WhoIsServerValue
impl Unpin for WhoIsServerValue
impl UnsafeUnpin for WhoIsServerValue
impl UnwindSafe for WhoIsServerValue
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