pub struct GenericPath {
pub endpoint: Option<u16>,
pub cluster: Option<u32>,
pub leaf: Option<u32>,
}Expand description
A generic (possibly a wildcard) path with endpoint, clusters, and a leaf
The leaf could be a command, an attribute, or an event
Note that this type does not implement FromTLV / ToTLV because it does not correspond
to a specific TLV structure in the Interaction Model.
Note also that it only captures a subset of the fields of AttrPath, and as such, it should be used with care!
Look at AttrPath, CmdPath, and EventPath for specific TLV structures, which
can be turned into GenericPath using their to_gp() method.
Fields§
§endpoint: Option<u16>The endpoint ID, if specified, otherwise None for wildcard
cluster: Option<u32>The cluster ID, if specified, otherwise None for wildcard
leaf: Option<u32>The leaf ID, if specified, otherwise None for wildcard
Implementations§
Source§impl GenericPath
impl GenericPath
Sourcepub const fn new(
endpoint: Option<u16>,
cluster: Option<u32>,
leaf: Option<u32>,
) -> GenericPath
pub const fn new( endpoint: Option<u16>, cluster: Option<u32>, leaf: Option<u32>, ) -> GenericPath
Create a new GenericPath with the given endpoint, cluster, and leaf.
Sourcepub fn not_wildcard(&self) -> Result<(u16, u32, u32), Error>
pub fn not_wildcard(&self) -> Result<(u16, u32, u32), Error>
Return Ok, if the path is non wildcard, otherwise returns an error
Sourcepub const fn is_wildcard(&self) -> bool
pub const fn is_wildcard(&self) -> bool
Return true, if the path is wildcard
Trait Implementations§
Source§impl Clone for GenericPath
impl Clone for GenericPath
Source§fn clone(&self) -> GenericPath
fn clone(&self) -> GenericPath
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 GenericPath
impl Debug for GenericPath
Source§impl Default for GenericPath
impl Default for GenericPath
Source§fn default() -> GenericPath
fn default() -> GenericPath
Source§impl PartialEq for GenericPath
impl PartialEq for GenericPath
impl StructuralPartialEq for GenericPath
Auto Trait Implementations§
impl Freeze for GenericPath
impl RefUnwindSafe for GenericPath
impl Send for GenericPath
impl Sync for GenericPath
impl Unpin for GenericPath
impl UnsafeUnpin for GenericPath
impl UnwindSafe for GenericPath
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