Struct stacks_common::util::secp256k1::MessageSignature
source · pub struct MessageSignature(pub [u8; 65]);
Tuple Fields§
§0: [u8; 65]
Implementations§
source§impl MessageSignature
impl MessageSignature
pub fn empty() -> MessageSignature
pub fn from_secp256k1_recoverable( sig: &LibSecp256k1RecoverableSignature ) -> MessageSignature
pub fn to_secp256k1_recoverable( &self ) -> Option<LibSecp256k1RecoverableSignature>
source§impl MessageSignature
impl MessageSignature
source§impl MessageSignature
impl MessageSignature
sourcepub fn from_hex(hex_str: &str) -> Result<MessageSignature, HexError>
pub fn from_hex(hex_str: &str) -> Result<MessageSignature, HexError>
Instantiates from a hex string
sourcepub fn from_bytes(inp: &[u8]) -> Option<MessageSignature>
pub fn from_bytes(inp: &[u8]) -> Option<MessageSignature>
Instantiates from a slice of bytes
sourcepub fn from_bytes_be(inp: &[u8]) -> Option<MessageSignature>
pub fn from_bytes_be(inp: &[u8]) -> Option<MessageSignature>
Instantiates from a slice of bytes, converting to host byte order
sourcepub fn from_vec_be(b: &Vec<u8>) -> Option<MessageSignature>
pub fn from_vec_be(b: &Vec<u8>) -> Option<MessageSignature>
Instantiates from a big-endian vector of bytes, converting to host byte order
Trait Implementations§
source§impl AsRef<[u8]> for MessageSignature
impl AsRef<[u8]> for MessageSignature
source§impl Clone for MessageSignature
impl Clone for MessageSignature
source§fn clone(&self) -> MessageSignature
fn clone(&self) -> MessageSignature
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 MessageSignature
impl Debug for MessageSignature
source§impl<'de> Deserialize<'de> for MessageSignature
impl<'de> Deserialize<'de> for MessageSignature
source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<MessageSignature, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<MessageSignature, D::Error>
Deserialize this value from the given Serde deserializer. Read more
source§impl Display for MessageSignature
impl Display for MessageSignature
source§impl<'a> From<&'a [u8]> for MessageSignature
impl<'a> From<&'a [u8]> for MessageSignature
source§fn from(data: &'a [u8]) -> MessageSignature
fn from(data: &'a [u8]) -> MessageSignature
Converts to this type from the input type.
source§impl FromSql for MessageSignature
impl FromSql for MessageSignature
source§fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>
fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>
Converts SQLite value into Rust value.
source§impl Hash for MessageSignature
impl Hash for MessageSignature
source§impl Index<RangeFull> for MessageSignature
impl Index<RangeFull> for MessageSignature
source§impl Index<usize> for MessageSignature
impl Index<usize> for MessageSignature
source§impl Ord for MessageSignature
impl Ord for MessageSignature
source§fn cmp(&self, other: &MessageSignature) -> Ordering
fn cmp(&self, other: &MessageSignature) -> 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<MessageSignature> for MessageSignature
impl PartialEq<MessageSignature> for MessageSignature
source§fn eq(&self, other: &MessageSignature) -> bool
fn eq(&self, other: &MessageSignature) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<MessageSignature> for MessageSignature
impl PartialOrd<MessageSignature> for MessageSignature
source§fn partial_cmp(&self, other: &MessageSignature) -> Option<Ordering>
fn partial_cmp(&self, other: &MessageSignature) -> 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 moresource§impl Serialize for MessageSignature
impl Serialize for MessageSignature
source§impl StacksMessageCodec for MessageSignature
impl StacksMessageCodec for MessageSignature
source§impl ToSql for MessageSignature
impl ToSql for MessageSignature
source§fn to_sql(&self) -> Result<ToSqlOutput<'_>>
fn to_sql(&self) -> Result<ToSqlOutput<'_>>
Converts Rust value to SQLite value
impl Copy for MessageSignature
impl Eq for MessageSignature
Auto Trait Implementations§
impl RefUnwindSafe for MessageSignature
impl Send for MessageSignature
impl Sync for MessageSignature
impl Unpin for MessageSignature
impl UnwindSafe for MessageSignature
Blanket Implementations§
source§impl<T> Base32Len for Twhere
T: AsRef<[u8]>,
impl<T> Base32Len for Twhere T: AsRef<[u8]>,
source§fn base32_len(&self) -> usize
fn base32_len(&self) -> usize
Calculate the base32 serialized length
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
source§impl<T> ToBase32 for Twhere
T: AsRef<[u8]>,
impl<T> ToBase32 for Twhere T: AsRef<[u8]>,
source§fn write_base32<W>(&self, writer: &mut W) -> Result<(), <W as WriteBase32>::Err>where
W: WriteBase32,
fn write_base32<W>(&self, writer: &mut W) -> Result<(), <W as WriteBase32>::Err>where W: WriteBase32,
Encode as base32 and write it to the supplied writer
Implementations shouldn’t allocate.