Struct cardano_serialization_lib::crypto::KESSignature
source · pub struct KESSignature(_);
Implementations§
source§impl KESSignature
impl KESSignature
source§impl KESSignature
impl KESSignature
pub const BYTE_COUNT: usize = 448usize
source§impl KESSignature
impl KESSignature
sourcepub fn from_bytes(bytes: Vec<u8>) -> Result<KESSignature, DeserializeError>
pub fn from_bytes(bytes: Vec<u8>) -> Result<KESSignature, DeserializeError>
Examples found in repository?
src/crypto.rs (line 1193)
1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where
D: serde::de::Deserializer<'de>,
{
let s = <String as serde::de::Deserialize>::deserialize(deserializer)?;
if let Ok(hex_bytes) = hex::decode(s.clone()) {
if let Ok(sig) = KESSignature::from_bytes(hex_bytes) {
return Ok(sig);
}
}
Err(serde::de::Error::invalid_value(
serde::de::Unexpected::Str(&s),
&"hex bytes for KESSignature",
))
}
Trait Implementations§
source§impl Clone for KESSignature
impl Clone for KESSignature
source§fn clone(&self) -> KESSignature
fn clone(&self) -> KESSignature
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 KESSignature
impl Debug for KESSignature
source§impl<'de> Deserialize<'de> for KESSignature
impl<'de> Deserialize<'de> for KESSignature
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 Deserialize for KESSignature
impl Deserialize for KESSignature
fn deserialize<R: BufRead>(
raw: &mut Deserializer<R>
) -> Result<Self, DeserializeError>
source§impl Hash for KESSignature
impl Hash for KESSignature
source§impl JsonSchema for KESSignature
impl JsonSchema for KESSignature
source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
source§fn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref
keyword. Read moresource§impl Ord for KESSignature
impl Ord for KESSignature
source§fn cmp(&self, other: &KESSignature) -> Ordering
fn cmp(&self, other: &KESSignature) -> 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<KESSignature> for KESSignature
impl PartialEq<KESSignature> for KESSignature
source§fn eq(&self, other: &KESSignature) -> bool
fn eq(&self, other: &KESSignature) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<KESSignature> for KESSignature
impl PartialOrd<KESSignature> for KESSignature
source§fn partial_cmp(&self, other: &KESSignature) -> Option<Ordering>
fn partial_cmp(&self, other: &KESSignature) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more