Skip to content

Struct ids::CommunityId

zaun_community_protocol::ids::CommunityId · Struct

pub struct CommunityId(…)

SHA3-256("zaun/community-id/v1" ‖ 0x00 ‖ genesis root public key).

pub const fn from_bytes(bytes: [u8; 32]) -> Self

Wraps raw bytes.

pub const fn as_bytes(&self) -> &[u8; 32]

The raw bytes.

pub fn from_slice(bytes: &[u8]) -> Option<Self>

Parses a byte slice of exactly Self::LEN bytes.

pub fn from_b64(text: &str) -> Result<Self, B64Error>

Strict base64url.

A non-canonical encoding or a wrong length.

pub fn to_b64(&self) -> String

Base64url without padding.

Clone, Copy, Debug, Decode, Deserialize<'de>, Display, Encode, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize, StructuralPartialEq

Full rustdoc page