pub struct Grant {Show 14 fields
pub contract_version: u32,
pub id: String,
pub issuer: Subject,
pub subject: Subject,
pub tenant_id: String,
pub application_id: String,
pub capabilities: BTreeSet<String>,
pub resources: Vec<ResourceScope>,
pub constraints: GrantConstraints,
pub issued_at: i64,
pub expires_at: i64,
pub parent_grant: Option<String>,
pub revision: u64,
pub status: GrantStatus,
}Fields§
§contract_version: u32§id: String§issuer: Subject§subject: Subject§tenant_id: String§application_id: String§capabilities: BTreeSet<String>§resources: Vec<ResourceScope>§constraints: GrantConstraints§issued_at: i64§expires_at: i64§parent_grant: Option<String>§revision: u64§status: GrantStatusImplementations§
Source§impl Grant
impl Grant
pub fn is_subset_of(&self, parent: &Grant) -> bool
pub fn canonical_bytes(&self) -> Result<Vec<u8>, AuthorizationError>
pub fn digest(&self) -> Result<String, AuthorizationError>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Grant
impl<'de> Deserialize<'de> for Grant
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Grant
impl StructuralPartialEq for Grant
Auto Trait Implementations§
impl Freeze for Grant
impl RefUnwindSafe for Grant
impl Send for Grant
impl Sync for Grant
impl Unpin for Grant
impl UnsafeUnpin for Grant
impl UnwindSafe for Grant
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