Type Alias RepoWriteCapSecret

Source
pub type RepoWriteCapSecret = SymKey;
Expand description

Write capability secret (for a whole repo)

Aliased Type§

pub enum RepoWriteCapSecret {
    ChaCha20Key([u8; 32]),
}

Variants§

§

ChaCha20Key([u8; 32])

Implementations

Source§

impl SymKey

Source

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

Source

pub fn random() -> Self

Source

pub fn from_array(array: [u8; 32]) -> Self

Source

pub fn nil() -> Self

Trait Implementations

Source§

impl Clone for SymKey

Source§

fn clone(&self) -> SymKey

Returns a duplicate of the value. Read more
1.0.0 · Source§

const fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SymKey

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for SymKey

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Display for SymKey

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Drop for SymKey

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl Hash for SymKey

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for SymKey

Source§

fn eq(&self, other: &SymKey) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

const fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for SymKey

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl TryFrom<&[u8]> for SymKey

Source§

type Error = NgError

The type returned in the event of a conversion error.
Source§

fn try_from(buf: &[u8]) -> Result<Self, NgError>

Performs the conversion.
Source§

impl Zeroize for SymKey

Source§

fn zeroize(&mut self)

Zero out this object from memory using Rust intrinsics which ensure the zeroization operation is not “optimized away” by the compiler.
Source§

impl Eq for SymKey

Source§

impl StructuralPartialEq for SymKey