pub struct Accessor<'a> { /* private fields */ }Expand description
The Accessor Object
Implementations§
Source§impl<'a> Accessor<'a>
impl<'a> Accessor<'a>
Sourcepub fn for_session(session: &Session, matter: &'a Matter<'a>) -> Accessor<'a>
pub fn for_session(session: &Session, matter: &'a Matter<'a>) -> Accessor<'a>
Create a new Accessor object for the given session
Sourcepub const fn new(
fab_idx: u8,
subjects: AccessorSubjects,
auth_mode: Option<AuthMode>,
matter: &'a Matter<'a>,
) -> Accessor<'a>
pub const fn new( fab_idx: u8, subjects: AccessorSubjects, auth_mode: Option<AuthMode>, matter: &'a Matter<'a>, ) -> Accessor<'a>
Create a new Accessor object
§Arguments
fab_idx: The fabric index of the accessor (0 means no fabric index)subjects: The subjects of the accessorauth_mode: The auth mode of the accessormatter: The Matter instance
pub fn fab_idx(&self) -> Result<NonZero<u8>, Error>
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: u16) -> bool
pub fn is_endpoint_accessible(&self, endpoint_id: u16) -> 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<'a> !RefUnwindSafe for Accessor<'a>
impl<'a> !Send for Accessor<'a>
impl<'a> !Sync for Accessor<'a>
impl<'a> !UnwindSafe for Accessor<'a>
impl<'a> Freeze for Accessor<'a>
impl<'a> Unpin for Accessor<'a>
impl<'a> UnsafeUnpin for Accessor<'a>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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.
Source§impl<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
impl<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
type Error = <Target as OctetsFrom<Source>>::Error
Source§fn try_octets_into(
self,
) -> Result<Target, <Source as OctetsInto<Target>>::Error>
fn try_octets_into( self, ) -> Result<Target, <Source as OctetsInto<Target>>::Error>
Performs the conversion.
Source§fn octets_into(self) -> Target
fn octets_into(self) -> Target
Performs an infallible conversion.