pub struct PowersOfBetaG<E: PairingEngine> { /* private fields */ }
Implementations§
Source§impl<E: PairingEngine> PowersOfBetaG<E>
impl<E: PairingEngine> PowersOfBetaG<E>
Sourcepub fn num_powers(&self) -> usize
pub fn num_powers(&self) -> usize
Returns the number of contiguous powers of beta G starting from the 0-th power.
Sourcepub fn available_powers(&self) -> (Range<usize>, Range<usize>)
pub fn available_powers(&self) -> (Range<usize>, Range<usize>)
Returns the range of powers of beta G. In detail, it returns the range of the available “normal” powers of beta G, i.e. the contiguous range of powers of beta G starting from G, and, the range of shifted_powers.
For example, if the output of this function is (0..8, 24..32)
, then self
contains the powers
beta^0 * G, beta^1 * G, ..., beta^7 * G
, andbeta^24 * G, ..., beta^31 * G
.
pub fn download_powers_for(&mut self, range: &Range<usize>) -> Result<()>
Trait Implementations§
Source§impl<E: PairingEngine> CanonicalDeserialize for PowersOfBetaG<E>
impl<E: PairingEngine> CanonicalDeserialize for PowersOfBetaG<E>
fn deserialize_with_mode<R: Read>( reader: R, compress: Compress, validate: Validate, ) -> Result<Self, SerializationError>
fn deserialize_compressed<R>(reader: R) -> Result<Self, SerializationError>where
R: Read,
fn deserialize_compressed_unchecked<R>(
reader: R,
) -> Result<Self, SerializationError>where
R: Read,
fn deserialize_uncompressed<R>(reader: R) -> Result<Self, SerializationError>where
R: Read,
fn deserialize_uncompressed_unchecked<R>(
reader: R,
) -> Result<Self, SerializationError>where
R: Read,
Source§impl<E: PairingEngine> CanonicalSerialize for PowersOfBetaG<E>
impl<E: PairingEngine> CanonicalSerialize for PowersOfBetaG<E>
fn serialize_with_mode<W: Write>( &self, writer: W, compress: Compress, ) -> Result<(), SerializationError>
fn serialized_size(&self, compress: Compress) -> usize
fn serialize_compressed<W>(&self, writer: W) -> Result<(), SerializationError>where
W: Write,
fn compressed_size(&self) -> usize
fn serialize_uncompressed<W>(&self, writer: W) -> Result<(), SerializationError>where
W: Write,
fn uncompressed_size(&self) -> usize
Source§impl<E: Debug + PairingEngine> Debug for PowersOfBetaG<E>
impl<E: Debug + PairingEngine> Debug for PowersOfBetaG<E>
Source§impl<E: PairingEngine> FromBytes for PowersOfBetaG<E>
impl<E: PairingEngine> FromBytes for PowersOfBetaG<E>
Source§impl<E: PairingEngine> ToBytes for PowersOfBetaG<E>
impl<E: PairingEngine> ToBytes for PowersOfBetaG<E>
Source§impl<E: PairingEngine> Valid for PowersOfBetaG<E>
impl<E: PairingEngine> Valid for PowersOfBetaG<E>
fn check(&self) -> Result<(), SerializationError>
fn batch_check<'a>(
batch: impl Iterator<Item = &'a Self> + Send,
) -> Result<(), SerializationError>where
Self: 'a,
Auto Trait Implementations§
impl<E> Freeze for PowersOfBetaG<E>
impl<E> RefUnwindSafe for PowersOfBetaG<E>
impl<E> Send for PowersOfBetaG<E>
impl<E> Sync for PowersOfBetaG<E>
impl<E> Unpin for PowersOfBetaG<E>
impl<E> UnwindSafe for PowersOfBetaG<E>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more