Skip to main content

Entry

Struct Entry 

Source
pub struct Entry<const S: usize, const T: usize> {
    pub fabric_index: FabricIndex,
    pub privilege: Privilege,
    pub auth_mode: AuthMode,
    pub subjects: Vec<NodeId, S>,
    pub targets: Vec<Target, T>,
}
Expand description

One access control entry (§9.10.5.7’s AccessControlEntryStruct).

S and T bound the subject and target lists, and are exactly what §9.10.6.5’s SubjectsPerAccessControlEntry and §9.10.6.6’s TargetsPerAccessControlEntry report — constrained to 4..=65534 and 3..=65534, which Acl::CHECK holds them to. They default to those minima.

Fields§

§fabric_index: FabricIndex

The fabric this entry belongs to, and the only one that can see it.

§privilege: Privilege

Privilege [1] — what this entry grants.

§auth_mode: AuthMode

AuthMode [2] — the authentication mode it applies to.

§subjects: Vec<NodeId, S>

Subjects [3] — who. Empty is a wildcard, not an empty set.

§targets: Vec<Target, T>

Targets [4] — what. Empty is a wildcard, not an empty set.

Implementations§

Source§

impl<const S: usize, const T: usize> Entry<S, T>

Source

pub fn case(fabric_index: FabricIndex, privilege: Privilege) -> Self

An entry granting privilege to CASE subjects on fabric, wildcard in both lists.

Source

pub fn with_subject(self, subject: NodeId) -> Result<Self>

Adds a subject, which narrows the entry from its wildcard.

A CAT is carried as its §6.6.2.1.2 node-id sub-encoding; CaseAuthenticatedTag produces it.

Source

pub fn with_target(self, target: Target) -> Result<Self>

Adds a target, which narrows the entry from its wildcard.

Trait Implementations§

Source§

impl<const S: usize, const T: usize> Clone for Entry<S, T>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<const S: usize, const T: usize> Debug for Entry<S, T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<const S: usize, const T: usize> Eq for Entry<S, T>

Source§

impl<const S: usize, const T: usize> PartialEq for Entry<S, T>

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl<const S: usize, const T: usize> StructuralPartialEq for Entry<S, T>

Auto Trait Implementations§

§

impl<const S: usize, const T: usize> Forget for Entry<S, T>

§

impl<const S: usize, const T: usize> Freeze for Entry<S, T>
where VecInner<NodeId, usize, VecStorageInner<[MaybeUninit<NodeId>; S]>>: Freeze, VecInner<Target, usize, VecStorageInner<[MaybeUninit<Target>; T]>>: Freeze,

§

impl<const S: usize, const T: usize> Move for Entry<S, T>

§

impl<const S: usize, const T: usize> RefUnwindSafe for Entry<S, T>
where VecInner<NodeId, usize, VecStorageInner<[MaybeUninit<NodeId>; S]>>: RefUnwindSafe, VecInner<Target, usize, VecStorageInner<[MaybeUninit<Target>; T]>>: RefUnwindSafe,

§

impl<const S: usize, const T: usize> Send for Entry<S, T>
where VecInner<NodeId, usize, VecStorageInner<[MaybeUninit<NodeId>; S]>>: Send, VecInner<Target, usize, VecStorageInner<[MaybeUninit<Target>; T]>>: Send,

§

impl<const S: usize, const T: usize> Sync for Entry<S, T>
where VecInner<NodeId, usize, VecStorageInner<[MaybeUninit<NodeId>; S]>>: Sync, VecInner<Target, usize, VecStorageInner<[MaybeUninit<Target>; T]>>: Sync,

§

impl<const S: usize, const T: usize> Unpin for Entry<S, T>
where VecInner<NodeId, usize, VecStorageInner<[MaybeUninit<NodeId>; S]>>: Unpin, VecInner<Target, usize, VecStorageInner<[MaybeUninit<Target>; T]>>: Unpin,

§

impl<const S: usize, const T: usize> UnsafeUnpin for Entry<S, T>
where VecInner<NodeId, usize, VecStorageInner<[MaybeUninit<NodeId>; S]>>: UnsafeUnpin, VecInner<Target, usize, VecStorageInner<[MaybeUninit<Target>; T]>>: UnsafeUnpin,

§

impl<const S: usize, const T: usize> UnwindSafe for Entry<S, T>
where VecInner<NodeId, usize, VecStorageInner<[MaybeUninit<NodeId>; S]>>: UnwindSafe, VecInner<Target, usize, VecStorageInner<[MaybeUninit<Target>; T]>>: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.