pub struct Bls12381Signature(/* private fields */);
Expand description
A bls12381 min-sig signature.
§BCS
The BCS serialized form for this type is defined by the following ABNF:
bls-signature = 48OCTECT
Implementations§
Source§impl Bls12381Signature
impl Bls12381Signature
pub const fn new(bytes: [u8; 48]) -> Self
pub fn generate<R>(rng: R) -> Self
Available on crate feature
rand
only.Sourcepub const fn into_inner(self) -> [u8; 48]
pub const fn into_inner(self) -> [u8; 48]
Return the underlying byte array of an Bls12381Signature.
pub const fn inner(&self) -> &[u8; 48]
pub const fn as_bytes(&self) -> &[u8] ⓘ
pub fn from_bytes<T: AsRef<[u8]>>(bytes: T) -> Result<Self, TryFromSliceError>
Trait Implementations§
Source§impl Arbitrary for Bls12381Signature
impl Arbitrary for Bls12381Signature
Source§type Parameters = ()
type Parameters = ()
The type of parameters that
arbitrary_with
accepts for configuration
of the generated Strategy
. Parameters must implement Default
.Source§type Strategy = BoxedStrategy<Bls12381Signature>
type Strategy = BoxedStrategy<Bls12381Signature>
The type of
Strategy
used to generate values of type Self
.Source§fn arbitrary_with(args: <Self as Arbitrary>::Parameters) -> Self::Strategy
fn arbitrary_with(args: <Self as Arbitrary>::Parameters) -> Self::Strategy
Source§impl AsRef<[u8]> for Bls12381Signature
impl AsRef<[u8]> for Bls12381Signature
Source§impl Clone for Bls12381Signature
impl Clone for Bls12381Signature
Source§fn clone(&self) -> Bls12381Signature
fn clone(&self) -> Bls12381Signature
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for Bls12381Signature
impl Debug for Bls12381Signature
Source§impl<'de> Deserialize<'de> for Bls12381Signature
impl<'de> Deserialize<'de> for Bls12381Signature
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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 Bls12381Signature
impl Display for Bls12381Signature
Source§impl From<Bls12381Signature> for [u8; 48]
impl From<Bls12381Signature> for [u8; 48]
Source§fn from(signature: Bls12381Signature) -> Self
fn from(signature: Bls12381Signature) -> Self
Converts to this type from the input type.
Source§impl FromStr for Bls12381Signature
impl FromStr for Bls12381Signature
Source§impl Hash for Bls12381Signature
impl Hash for Bls12381Signature
Source§impl Ord for Bls12381Signature
impl Ord for Bls12381Signature
Source§fn cmp(&self, other: &Bls12381Signature) -> Ordering
fn cmp(&self, other: &Bls12381Signature) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for Bls12381Signature
impl PartialEq for Bls12381Signature
Source§impl PartialOrd for Bls12381Signature
impl PartialOrd for Bls12381Signature
Source§impl Serialize for Bls12381Signature
impl Serialize for Bls12381Signature
impl Copy for Bls12381Signature
impl Eq for Bls12381Signature
impl StructuralPartialEq for Bls12381Signature
Auto Trait Implementations§
impl Freeze for Bls12381Signature
impl RefUnwindSafe for Bls12381Signature
impl Send for Bls12381Signature
impl Sync for Bls12381Signature
impl Unpin for Bls12381Signature
impl UnwindSafe for Bls12381Signature
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
Casts
self
to type T
. The semantics of numeric casting with the as
operator are followed, so <T as As>::as_::<U>
can be used in the same way as T as U
for numeric conversions. Read moreSource§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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> ToHex for T
impl<T> ToHex for T
Source§fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self
into the result. Lower case
letters are used (e.g. f9b4ca
)Source§fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self
into the result. Upper case
letters are used (e.g. F9B4CA
)