pub trait Absorb {
// Required methods
fn to_sponge_bytes(&self, dest: &mut Vec<u8>);
fn to_sponge_field_elements<F: PrimeField>(&self, dest: &mut Vec<F>);
// Provided methods
fn to_sponge_bytes_as_vec(&self) -> Vec<u8> ⓘ { ... }
fn to_sponge_field_elements_as_vec<F: PrimeField>(&self) -> Vec<F> { ... }
fn batch_to_sponge_bytes(batch: &[Self], dest: &mut Vec<u8>)
where Self: Sized { ... }
fn batch_to_sponge_bytes_as_vec(batch: &[Self]) -> Vec<u8> ⓘ
where Self: Sized { ... }
fn batch_to_sponge_field_elements<F: PrimeField>(
batch: &[Self],
dest: &mut Vec<F>,
)
where Self: Sized { ... }
fn batch_to_sponge_field_elements_as_vec<F: PrimeField>(
batch: &[Self],
) -> Vec<F>
where Self: Sized { ... }
}Expand description
An interface for objects that can be absorbed by a CryptographicSponge.
Required Methods§
Sourcefn to_sponge_bytes(&self, dest: &mut Vec<u8>)
fn to_sponge_bytes(&self, dest: &mut Vec<u8>)
Converts the object into a list of bytes that can be absorbed by a CryptographicSponge.
Append the list to dest.
Sourcefn to_sponge_field_elements<F: PrimeField>(&self, dest: &mut Vec<F>)
fn to_sponge_field_elements<F: PrimeField>(&self, dest: &mut Vec<F>)
Converts the object into field elements that can be absorbed by a CryptographicSponge.
Append the list to dest
Provided Methods§
Sourcefn to_sponge_bytes_as_vec(&self) -> Vec<u8> ⓘ
fn to_sponge_bytes_as_vec(&self) -> Vec<u8> ⓘ
Converts the object into a list of bytes that can be absorbed by a CryptographicSponge.
Return the list as Vec.
Sourcefn to_sponge_field_elements_as_vec<F: PrimeField>(&self) -> Vec<F>
fn to_sponge_field_elements_as_vec<F: PrimeField>(&self) -> Vec<F>
Converts the object into field elements that can be absorbed by a CryptographicSponge.
Return the list as Vec
Sourcefn batch_to_sponge_bytes(batch: &[Self], dest: &mut Vec<u8>)where
Self: Sized,
fn batch_to_sponge_bytes(batch: &[Self], dest: &mut Vec<u8>)where
Self: Sized,
Specifies the conversion into a list of bytes for a batch. Append the list to dest.
Sourcefn batch_to_sponge_bytes_as_vec(batch: &[Self]) -> Vec<u8> ⓘwhere
Self: Sized,
fn batch_to_sponge_bytes_as_vec(batch: &[Self]) -> Vec<u8> ⓘwhere
Self: Sized,
Specifies the conversion into a list of bytes for a batch. Return the list as Vec.
Sourcefn batch_to_sponge_field_elements<F: PrimeField>(
batch: &[Self],
dest: &mut Vec<F>,
)where
Self: Sized,
fn batch_to_sponge_field_elements<F: PrimeField>(
batch: &[Self],
dest: &mut Vec<F>,
)where
Self: Sized,
Specifies the conversion into a list of field elements for a batch. Append the list to dest.
Sourcefn batch_to_sponge_field_elements_as_vec<F: PrimeField>(
batch: &[Self],
) -> Vec<F>where
Self: Sized,
fn batch_to_sponge_field_elements_as_vec<F: PrimeField>(
batch: &[Self],
) -> Vec<F>where
Self: Sized,
Specifies the conversion into a list of field elements for a batch. Append the list to dest.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.