pub struct ServiceType {
pub service: String,
pub protocol: String,
pub domain: String,
}Expand description
A parsed DNS-SD service type
Fields§
§service: StringService name (e.g., “http”)
protocol: StringProtocol (“tcp” or “udp”)
domain: StringDomain (e.g., “local”)
Implementations§
Source§impl ServiceType
impl ServiceType
Sourcepub fn parse(s: &str) -> Result<Self, MdnsError>
pub fn parse(s: &str) -> Result<Self, MdnsError>
Parse a service type string like “_http._tcp.local”
Sourcepub fn to_service_string(&self) -> String
pub fn to_service_string(&self) -> String
Format as DNS-SD service type string
Trait Implementations§
Source§impl Clone for ServiceType
impl Clone for ServiceType
Source§fn clone(&self) -> ServiceType
fn clone(&self) -> ServiceType
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ServiceType
impl Debug for ServiceType
Source§impl PartialEq for ServiceType
impl PartialEq for ServiceType
impl Eq for ServiceType
impl StructuralPartialEq for ServiceType
Auto Trait Implementations§
impl Freeze for ServiceType
impl RefUnwindSafe for ServiceType
impl Send for ServiceType
impl Sync for ServiceType
impl Unpin for ServiceType
impl UnwindSafe for ServiceType
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)