pub enum MatterRemoteService {
Operational {
compressed_fabric_id: u64,
node_id: u64,
},
Commissionable {
id: u64,
},
}Expand description
A Matter service elsewhere that this node resolves / looks up over a discovery transport such as mDNS.
This is the query-side analog of the publish-side MatterLocalService:
it identifies a single Matter service instance to resolve (SRV/TXT/A/AAAA),
rather than describing one to advertise. The discovery-transport encoding
(e.g. the mDNS instance name) lives in the mdns module
(MatterRemoteService::instance_name).
Note that browsing (enumerating all commissionable or operational nodes)
does not need a MatterRemoteService - it is a PTR query against the bare
service type.
Variants§
Operational
A specific operational (commissioned) node.
The instance name is <compressed-fabric-id-hex>-<node-id-hex>._matter._tcp.local.
Commissionable
A specific commissionable instance.
The instance name is <id-hex>._matterc._udp.local.
Implementations§
Source§impl MatterRemoteService
impl MatterRemoteService
Sourcepub fn service_type(&self) -> &'static str
pub fn service_type(&self) -> &'static str
The DNS-SD service type (without domain) this remote service lives under:
_matter._tcp for operational nodes, _matterc._udp for commissionable
ones. Used by OS-backed responders that resolve via a (name, type, domain)
API rather than a fully-qualified instance name.
Sourcepub fn instance_name(
&self,
buf: &mut StringInner<usize, VecStorageInner<[MaybeUninit<u8>; 128]>>,
)
pub fn instance_name( &self, buf: &mut StringInner<usize, VecStorageInner<[MaybeUninit<u8>; 128]>>, )
Write the fully-qualified mDNS instance name for this service into buf.
This is the name to issue SRV/TXT/A/AAAA queries against when resolving.
Sourcepub fn matches_instance<I>(&self, instance: &I) -> boolwhere
I: ToLabelIter,
pub fn matches_instance<I>(&self, instance: &I) -> boolwhere
I: ToLabelIter,
Whether the given mDNS instance (as a label iterator) refers to this
service. Walks the labels directly: the first label must hold the matching
hex id(s), and the remaining labels the service-type suffix (compared
case-insensitively). No name is ever rendered into a buffer - it reads the
domain (or OS) name’s labels in place.
Trait Implementations§
Source§impl Clone for MatterRemoteService
impl Clone for MatterRemoteService
Source§fn clone(&self) -> MatterRemoteService
fn clone(&self) -> MatterRemoteService
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MatterRemoteService
impl Debug for MatterRemoteService
impl Eq for MatterRemoteService
Source§impl Hash for MatterRemoteService
impl Hash for MatterRemoteService
Source§impl PartialEq for MatterRemoteService
impl PartialEq for MatterRemoteService
impl StructuralPartialEq for MatterRemoteService
Auto Trait Implementations§
impl Freeze for MatterRemoteService
impl RefUnwindSafe for MatterRemoteService
impl Send for MatterRemoteService
impl Sync for MatterRemoteService
impl Unpin for MatterRemoteService
impl UnsafeUnpin for MatterRemoteService
impl UnwindSafe for MatterRemoteService
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more