pub struct ValueRegistry {
pub registry_name: String,
pub entries: Vec<Entry>,
}Expand description
A named registry with entries.
Fields§
§registry_name: StringRegistry name (for error messages and publication).
entries: Vec<Entry>The entries.
Implementations§
Source§impl ValueRegistry
impl ValueRegistry
Sourcepub fn contains(&self, name: &str) -> bool
pub fn contains(&self, name: &str) -> bool
Whether the entry exists with the given status usable by new attestations (active or deprecated).
Sourcepub fn usable(&self, name: &str) -> Option<&Entry>
pub fn usable(&self, name: &str) -> Option<&Entry>
Returns the entry when it can be used for new attestations; retired entries cannot sign new artifacts.
Sourcepub fn set_status(&mut self, name: &str, status: Status) -> SignatifResult<()>
pub fn set_status(&mut self, name: &str, status: Status) -> SignatifResult<()>
Transition an entry’s status (the deprecation process §20).
§Errors
Returns a registry error when the entry is unknown.
Trait Implementations§
Source§impl Clone for ValueRegistry
impl Clone for ValueRegistry
Source§fn clone(&self) -> ValueRegistry
fn clone(&self) -> ValueRegistry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ValueRegistry
impl Debug for ValueRegistry
Source§impl<'de> Deserialize<'de> for ValueRegistry
impl<'de> Deserialize<'de> for ValueRegistry
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
Auto Trait Implementations§
impl Freeze for ValueRegistry
impl RefUnwindSafe for ValueRegistry
impl Send for ValueRegistry
impl Sync for ValueRegistry
impl Unpin for ValueRegistry
impl UnsafeUnpin for ValueRegistry
impl UnwindSafe for ValueRegistry
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