Skip to main content

CapabilityGrantV1

Struct CapabilityGrantV1 

Source
pub struct CapabilityGrantV1 { /* private fields */ }
Expand description

Complete bounded v1 grant persisted with a capability.

Implementations§

Source§

impl CapabilityGrantV1

Source

pub fn new( tenant_scope: TenantScope, partition_scope: PartitionScopeV1, permissions: CapabilityPermissionsV1, field_visibility: Vec<EntityFieldVisibilityV1>, max_scan_rows: NonZeroU16, approval_required: Vec<CapabilityPermissionKindV1>, ) -> Result<Self, CapabilityGrantError>

Constructs a canonically ordered complete grant.

Source

pub const fn tenant_scope(&self) -> &TenantScope

Returns the authorization-resolved tenant constraint.

Source

pub const fn partition_scope(&self) -> &PartitionScopeV1

Returns the complete partition constraint.

Source

pub const fn permissions(&self) -> &CapabilityPermissionsV1

Returns the canonical permission set.

Source

pub fn field_visibility(&self) -> &[EntityFieldVisibilityV1]

Returns canonical entity-field visibility entries.

Source

pub const fn max_scan_rows(&self) -> NonZeroU16

Returns the bounded maximum scan rows.

Source

pub fn approval_required(&self) -> &[CapabilityPermissionKindV1]

Returns canonical permission kinds requiring validated approval.

Source

pub fn with_row_policy( self, row_policy: CapabilityRowPolicyGrantV1, ) -> Result<Self, CapabilityGrantError>

Adds the exact V4 row-policy extension after checking the matching role identity.

Source

pub fn with_export( self, export: CapabilityExportGrantV1, ) -> Result<Self, CapabilityGrantError>

Adds the exact V5 export extension after checking scope prerequisites.

Source

pub fn with_reimport( self, reimport: CapabilityApplicationReimportGrantV1, ) -> Result<Self, CapabilityGrantError>

Adds distinct V7 reimport authority after checking its role and scope prerequisites.

Source

pub fn with_vector_inspection( self, inspection: CapabilityVectorInspectionGrantV1, ) -> Result<Self, CapabilityGrantError>

Adds exact V8 vector-inspection authority after checking role, permission, field visibility, and row-policy count-disclosure prerequisites.

Source

pub fn semantic_bytes(&self) -> Result<usize, CapabilityGrantError>

Returns the complete checked v1 semantic grant byte count.

Trait Implementations§

Source§

impl Clone for CapabilityGrantV1

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 Debug for CapabilityGrantV1

Source§

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

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

impl Eq for CapabilityGrantV1

Source§

impl PartialEq for CapabilityGrantV1

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 StructuralPartialEq for CapabilityGrantV1

Auto Trait Implementations§

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.