Skip to main content

KeyDelivery

Trait KeyDelivery 

Source
pub trait KeyDelivery {
    // Required method
    fn keys_for(&self, collection: &str, to: &Subject) -> Vec<(u32, String)>;

    // Provided methods
    fn mint(&self, _collection: &str, _epoch: u32) -> bool { ... }
    fn take(&self, _collection: &str, _keys: &[(u32, String)]) -> usize { ... }
    fn discard(&self, _collection: &str, _epoch: u32) { ... }
    fn held(&self, _collection: &str) -> Vec<u32> { ... }
    fn ring(&self, _collection: &str) -> KeyRing { ... }
}
Expand description

Seals the collection’s keys to a new member’s box key: one sealed key for each epoch the member needs.

Required Methods§

Source

fn keys_for(&self, collection: &str, to: &Subject) -> Vec<(u32, String)>

Provided Methods§

Source

fn mint(&self, _collection: &str, _epoch: u32) -> bool

Makes and keeps the key of an epoch before a change that starts it is signed: false if it could not be made.

Source

fn take(&self, _collection: &str, _keys: &[(u32, String)]) -> usize

Opens keys another member sealed to this machine and keeps them: how many were taken.

Source

fn discard(&self, _collection: &str, _epoch: u32)

Forgets the key this machine made for an epoch whose removal lost a fork to another entry.

Source

fn held(&self, _collection: &str) -> Vec<u32>

The epochs this machine holds a key for.

Source

fn ring(&self, _collection: &str) -> KeyRing

The keys this machine holds for a collection, to open what it wrote at an older epoch and seal it again.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§