aztec-nr - std::append

Trait Append

pub trait Append {
    // Required methods
    pub fn empty() -> Self;
    pub fn append(self, other: Self) -> Self;
}

Appends two values together, returning the result.

An alternate name for this trait is Monoid if that is familiar. If not, it can be ignored.

It is expected that for any implementation:

  • T::empty().append(x) == x
  • x.append(T::empty()) == x

Required methods

pub fn empty() -> Self pub fn append(self, other: Self) -> Self

Implementors

impl Append for CtString

impl Append for Quoted

impl<T> Append for [T]