pub struct SubjectDescriptor {
pub fab_idx: u8,
/* private fields */
}Expand description
Who is making an access request.
Accessor, in rs-matter-node, puts this together with the fabric
table that the requests are checked against.
Fields§
§fab_idx: u8The fabric index of the accessor
Implementations§
Source§impl SubjectDescriptor
impl SubjectDescriptor
Sourcepub fn for_session(
session_mode: &SessionMode,
peer_node_id: Option<NodeId>,
aux_acl_enabled: bool,
) -> Self
pub fn for_session( session_mode: &SessionMode, peer_node_id: Option<NodeId>, aux_acl_enabled: bool, ) -> Self
Create the subject descriptor of a session
§Arguments
session_mode: The mode of the sessionpeer_node_id: The node ID of the peer of the session, if the session has oneaux_acl_enabled: Whether AUX ACL is enabled
Sourcepub const fn new(
fab_idx: u8,
aux_acl_enabled: bool,
subjects: AccessorSubjects,
auth_mode: Option<AuthMode>,
) -> Self
pub const fn new( fab_idx: u8, aux_acl_enabled: bool, subjects: AccessorSubjects, auth_mode: Option<AuthMode>, ) -> Self
Create a new subject descriptor
§Arguments
fab_idx: The fabric index of the accessor (0 means no fabric index)aux_acl_enabled: Whether AUX ACL was enabled at the time this accessor was instantiatedsubjects: The subjects of the accessorauth_mode: The auth mode of the accessor
pub fn fab_idx(&self) -> Result<NonZeroU8, Error>
Sourcepub const fn aux_acl_enabled(&self) -> bool
pub const fn aux_acl_enabled(&self) -> bool
Return whether AUX ACL was enabled at the time this accessor was instantiated
Sourcepub const fn subjects(&self) -> &AccessorSubjects
pub const fn subjects(&self) -> &AccessorSubjects
Return the subjects of the accessor
Sourcepub fn is_endpoint_accessible(
&self,
endpoint_id: EndptId,
fabrics: &Fabrics,
) -> bool
pub fn is_endpoint_accessible( &self, endpoint_id: EndptId, fabrics: &Fabrics, ) -> bool
Return whether the given endpoint is accessible for this accessor.
For group sessions, only endpoints that are members of the group are accessible. For all other session types, all endpoints are accessible.
Sourcepub fn peer_node_id(&self) -> Option<u64>
pub fn peer_node_id(&self) -> Option<u64>
Return the peer node ID (admin node ID) for CASE sessions, or None for PASE/other sessions.
Auto Trait Implementations§
impl Forget for SubjectDescriptor
impl Freeze for SubjectDescriptor
impl Move for SubjectDescriptor
impl RefUnwindSafe for SubjectDescriptor
impl Send for SubjectDescriptor
impl Sync for SubjectDescriptor
impl Unpin for SubjectDescriptor
impl UnsafeUnpin for SubjectDescriptor
impl UnwindSafe for SubjectDescriptor
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
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> ⓘ
Converts
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> ⓘ
Converts
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 moreSource§impl<T, I> IntoFallibleInit<T> for Iwhere
I: Init<T>,
impl<T, I> IntoFallibleInit<T> for Iwhere
I: Init<T>,
Source§fn into_fallible<E>(self) -> impl Init<T, E>
fn into_fallible<E>(self) -> impl Init<T, E>
Convert the infallible initializer to a fallible one.