pub struct Delegation { /* private fields */ }Expand description
A delegated targets role.
Implementations§
Source§impl Delegation
impl Delegation
Sourcepub fn builder(role: MetadataPath) -> DelegationBuilder
pub fn builder(role: MetadataPath) -> DelegationBuilder
Create a new DelegationBuilder for a delegation named role.
Sourcepub fn new(
name: MetadataPath,
terminating: bool,
threshold: u32,
key_ids: HashSet<KeyId>,
paths: HashSet<TargetPath>,
) -> Result<Self>
pub fn new( name: MetadataPath, terminating: bool, threshold: u32, key_ids: HashSet<KeyId>, paths: HashSet<TargetPath>, ) -> Result<Self>
Create a new delegation.
Sourcepub fn name(&self) -> &MetadataPath
pub fn name(&self) -> &MetadataPath
An immutable reference to the delegations’s metadata path (role).
Sourcepub fn terminating(&self) -> bool
pub fn terminating(&self) -> bool
Whether or not this delegation is terminating.
Sourcepub fn key_ids(&self) -> &HashSet<KeyId>
pub fn key_ids(&self) -> &HashSet<KeyId>
An immutable reference to the delegations’s trusted key IDs.
Sourcepub fn paths(&self) -> &HashSet<TargetPath>
pub fn paths(&self) -> &HashSet<TargetPath>
An immutable reference to the delegation’s authorized paths.
Trait Implementations§
Source§impl Clone for Delegation
impl Clone for Delegation
Source§fn clone(&self) -> Delegation
fn clone(&self) -> Delegation
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Delegation
impl Debug for Delegation
Source§impl<'de> Deserialize<'de> for Delegation
impl<'de> Deserialize<'de> for Delegation
Source§fn deserialize<D: Deserializer<'de>>(de: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(de: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for Delegation
impl PartialEq for Delegation
Source§impl Serialize for Delegation
impl Serialize for Delegation
impl Eq for Delegation
impl StructuralPartialEq for Delegation
Auto Trait Implementations§
impl Freeze for Delegation
impl RefUnwindSafe for Delegation
impl Send for Delegation
impl Sync for Delegation
impl Unpin for Delegation
impl UnsafeUnpin for Delegation
impl UnwindSafe for Delegation
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