#[non_exhaustive]pub struct SsdpMessage {
pub kind: SsdpKind,
pub host: Option<String>,
pub nt: Option<String>,
pub nts: Option<String>,
pub st: Option<String>,
pub usn: Option<String>,
pub location: Option<String>,
pub server: Option<String>,
pub cache_control_max_age: Option<u32>,
pub user_agent: Option<String>,
}ssdp only.Expand description
One parsed SSDP datagram. Field semantics depend on
SsdpMessage::kind.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.kind: SsdpKindWhether this is an advertisement, search, or response.
host: Option<String>HOST header — multicast address+port (e.g.
"239.255.255.250:1900"). RFC 4795: required.
nt: Option<String>NT header (NOTIFY only) — Notification Type — the
device or service type being advertised.
nts: Option<String>NTS header (NOTIFY only) — Notification Sub-Type:
"ssdp:alive", "ssdp:byebye", "ssdp:update".
st: Option<String>ST header (M-SEARCH + response) — Search Target.
usn: Option<String>USN header — Unique Service Name. Combines a
UUID with an optional :: + URN suffix.
location: Option<String>LOCATION header — HTTP URL pointing at the device
description XML.
server: Option<String>SERVER header — vendor / firmware banner (NOTIFY +
response). Operationally one of the more discriminating
asset-discovery signals.
cache_control_max_age: Option<u32>CACHE-CONTROL: max-age=<n> — TTL of the advertisement
in seconds. Decoded only when the header has the exact
max-age=N form.
user_agent: Option<String>USER-AGENT header (M-SEARCH only) — the searching
client’s identifier.
Implementations§
Trait Implementations§
Source§impl Clone for SsdpMessage
impl Clone for SsdpMessage
Source§impl Debug for SsdpMessage
impl Debug for SsdpMessage
Source§impl<'de> Deserialize<'de> for SsdpMessage
Available on crate feature serde only.
impl<'de> Deserialize<'de> for SsdpMessage
serde only.Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for SsdpMessage
Source§impl Hash for SsdpMessage
impl Hash for SsdpMessage
Source§impl PartialEq for SsdpMessage
impl PartialEq for SsdpMessage
Source§impl Serialize for SsdpMessage
Available on crate feature serde only.
impl Serialize for SsdpMessage
serde only.impl StructuralPartialEq for SsdpMessage
Auto Trait Implementations§
impl Freeze for SsdpMessage
impl RefUnwindSafe for SsdpMessage
impl Send for SsdpMessage
impl Sync for SsdpMessage
impl Unpin for SsdpMessage
impl UnsafeUnpin for SsdpMessage
impl UnwindSafe for SsdpMessage
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.