pub struct Members { /* private fields */ }Expand description
The members file.
Implementations§
Source§impl Members
impl Members
Sourcepub fn new() -> Members
pub fn new() -> Members
An empty list for a NEW repository: at Level::NEW, quantum-safe.
Sourcepub fn at(level: Level) -> Members
pub fn at(level: Level) -> Members
An empty list at level (Members::at(Level::Classic): the opt-out).
Sourcepub fn to_quantum_safe(
&self,
keys: &BTreeMap<String, String>,
) -> Result<Members, UpgradeRefusal>
pub fn to_quantum_safe( &self, keys: &BTreeMap<String, String>, ) -> Result<Members, UpgradeRefusal>
The same members, quantum-safe (gunnar crypt level quantum-safe):
every member’s key replaced by the age1pq1… key keys gives for their
name. Refused, naming them, while any member has none (a classic key is
none). A quantum-safe file comes back as it is. The caller rotates the
ring and wraps it to the result.
Sourcepub fn set_level(&mut self, level: Level) -> Result<(), MembersError>
pub fn set_level(&mut self, level: Level) -> Result<(), MembersError>
Change the level. Refused while a listed key does not belong at the
new one (an upgrade replaces the keys: Members::to_quantum_safe).
Sourcepub fn retain(&mut self, keep: impl FnMut(&MemberKey) -> bool)
pub fn retain(&mut self, keep: impl FnMut(&MemberKey) -> bool)
Keep only the keys keep says yes to.
Sourcepub fn add(&mut self, name: &str, key: &str) -> Result<(), MembersError>
pub fn add(&mut self, name: &str, key: &str) -> Result<(), MembersError>
Add one key for name. Refuses keys that cannot be recipients and a
key already listed.
Trait Implementations§
impl Eq for Members
impl StructuralPartialEq for Members
Auto Trait Implementations§
impl Freeze for Members
impl RefUnwindSafe for Members
impl Send for Members
impl Sync for Members
impl Unpin for Members
impl UnsafeUnpin for Members
impl UnwindSafe for Members
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