Struct lightning_invoice::Sha256
source · pub struct Sha256(pub Hash);
Expand description
SHA-256 hash
Tuple Fields§
§0: Hash
This is not exported to bindings users as the native hash types are not currently mapped
Trait Implementations§
source§impl Base32Len for Sha256
impl Base32Len for Sha256
source§fn base32_len(&self) -> usize
fn base32_len(&self) -> usize
Calculate the base32 serialized length
source§impl FromBase32 for Sha256
impl FromBase32 for Sha256
source§type Err = Bolt11ParseError
type Err = Bolt11ParseError
The associated error which can be returned from parsing (e.g. because of bad padding).
source§fn from_base32(field_data: &[u5]) -> Result<Sha256, Bolt11ParseError>
fn from_base32(field_data: &[u5]) -> Result<Sha256, Bolt11ParseError>
Convert a base32 slice to
Self
.source§impl Ord for Sha256
impl Ord for Sha256
source§impl PartialOrd for Sha256
impl PartialOrd for Sha256
source§impl ToBase32 for Sha256
impl ToBase32 for Sha256
source§fn write_base32<W: WriteBase32>(
&self,
writer: &mut W,
) -> Result<(), <W as WriteBase32>::Err>
fn write_base32<W: WriteBase32>( &self, writer: &mut W, ) -> Result<(), <W as WriteBase32>::Err>
Encode as base32 and write it to the supplied writer
Implementations shouldn’t allocate.
impl Eq for Sha256
impl StructuralPartialEq for Sha256
Auto Trait Implementations§
impl Freeze for Sha256
impl RefUnwindSafe for Sha256
impl Send for Sha256
impl Sync for Sha256
impl Unpin for Sha256
impl UnwindSafe for Sha256
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)