pub struct ControlIdentity { /* private fields */ }Expand description
A stable, non-secret audit identity chosen by the deployment.
Implementations§
Source§impl ControlIdentity
impl ControlIdentity
Sourcepub fn new(name: impl Into<String>, role: Role) -> Result<Self, SecurityError>
pub fn new(name: impl Into<String>, role: Role) -> Result<Self, SecurityError>
An instance or operator identity named name. A provisioner needs its
limits, so it is built with ControlIdentity::provisioner.
§Errors
Returns a SecurityError for Role::Provisioner, or unless
name is 1 to 128 ASCII characters, each alphanumeric or one of
@ . _ : / -.
Sourcepub fn provisioner(
name: impl Into<String>,
limits: ProvisionerLimits,
) -> Result<Self, SecurityError>
pub fn provisioner( name: impl Into<String>, limits: ProvisionerLimits, ) -> Result<Self, SecurityError>
A provisioner identity named name, bounded by limits (#39).
§Errors
Returns a SecurityError for a name ControlIdentity::new
would refuse.
Sourcepub fn name(&self) -> &str
pub fn name(&self) -> &str
The audit name, recorded as the actor on authentication and administrative audit events.
Sourcepub fn provisioner_limits(&self) -> Option<ProvisionerLimits>
pub fn provisioner_limits(&self) -> Option<ProvisionerLimits>
The provisioner’s limits; None for every other role.
Trait Implementations§
Source§impl Clone for ControlIdentity
impl Clone for ControlIdentity
Source§impl Debug for ControlIdentity
impl Debug for ControlIdentity
impl Eq for ControlIdentity
Source§impl PartialEq for ControlIdentity
impl PartialEq for ControlIdentity
impl StructuralPartialEq for ControlIdentity
Auto Trait Implementations§
impl Freeze for ControlIdentity
impl RefUnwindSafe for ControlIdentity
impl Send for ControlIdentity
impl Sync for ControlIdentity
impl Unpin for ControlIdentity
impl UnsafeUnpin for ControlIdentity
impl UnwindSafe for ControlIdentity
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