pub struct HostDelegation {
pub community_id: CommunityId,
pub host_id: HostId,
pub host_public_key: PublicKey,
pub host_addresses: Vec<String>,
pub scopes: Scopes,
pub epoch: u64,
pub not_before: u64,
pub expires_at: Option<u64>,
pub issued_at: u64,
}Expand description
The root key’s authorisation of one host to operate the community.
Fields§
§community_id: CommunityId2: the community.
host_id: HostId3: MUST equal the derivation from host_public_key.
host_public_key: PublicKey4: the host key.
host_addresses: Vec<String>5: 1–4 SimpleX contact addresses of the host, each ≤ 2 048 bytes.
scopes: Scopes6: scopes.
epoch: u647: ≥ 1.
not_before: u648: ms.
expires_at: Option<u64>9: ms; none = until replaced or revoked.
issued_at: u6410: ms.
Implementations§
Trait Implementations§
Source§impl Clone for HostDelegation
impl Clone for HostDelegation
Source§fn clone(&self) -> HostDelegation
fn clone(&self) -> HostDelegation
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 HostDelegation
impl Debug for HostDelegation
Source§impl Decode for HostDelegation
impl Decode for HostDelegation
Source§impl Encode for HostDelegation
impl Encode for HostDelegation
impl Eq for HostDelegation
Source§impl PartialEq for HostDelegation
impl PartialEq for HostDelegation
Source§impl SignedObject for HostDelegation
impl SignedObject for HostDelegation
Source§const CONTEXT: Context = Context::Delegation
const CONTEXT: Context = Context::Delegation
The context the verifier supplies for this type (§3.5).
Source§fn decode_unverified(bytes: &[u8]) -> Result<Self, DecodeError>
fn decode_unverified(bytes: &[u8]) -> Result<Self, DecodeError>
Decodes canonical bytes without verifying them. Receivers use
Signed::verify_and_decode. Read moreSource§fn sign(self, sk: &SecretKey) -> Result<Signed<Self>, SignedError>
fn sign(self, sk: &SecretKey) -> Result<Signed<Self>, SignedError>
Encodes and signs (hedged). Read more
Source§fn sign_deterministic(self, sk: &SecretKey) -> Result<Signed<Self>, SignedError>
fn sign_deterministic(self, sk: &SecretKey) -> Result<Signed<Self>, SignedError>
Encodes and signs deterministically. Golden test vectors only. Read more
impl StructuralPartialEq for HostDelegation
Auto Trait Implementations§
impl Freeze for HostDelegation
impl RefUnwindSafe for HostDelegation
impl Send for HostDelegation
impl Sync for HostDelegation
impl Unpin for HostDelegation
impl UnsafeUnpin for HostDelegation
impl UnwindSafe for HostDelegation
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