Struct CompressedString
pub struct CompressedString<let N: u32, let M: u32>
{ /* private fields */ }
Implementations
impl<let M: u32, let N: u32> CompressedString<N, M>
Trait implementations
impl<let M: u32, let N: u32> Deserialize for CompressedString<N, M>
pub fn deserialize(serialized: [Field; N * 1]) -> Self
impl<let M: u32, let N: u32> Eq for CompressedString<N, M>
pub fn eq(_self: Self, _other: Self) -> bool
impl<let M: u32, let N: u32> Packable for CompressedString<N, M>
impl<let M: u32, let N: u32> Serialize for CompressedString<N, M>
pub fn serialize(self) -> [Field; N * 1]
Convenience struct for capturing a string of type
str<M>, and converting it into other basic Noir types. Notably: converts to[Field; N]or[u8; M]. This particular conversion process tightly-packs the M bytes of the inputstrinto 31-byte chunks, with each chunk being put into a field. Each field can store 31 characters, so N should be M/31 rounded up. Can be used for longer strings that don't fit into a single field.