Struct lightning_invoice::Sha256
source · [−]pub struct Sha256(pub Hash);
Expand description
SHA-256 hash
Tuple Fields
0: Hash
(C-not exported) as the native hash types are not currently mapped
Trait Implementations
sourceimpl Base32Len for Sha256
impl Base32Len for Sha256
sourcefn base32_len(&self) -> usize
fn base32_len(&self) -> usize
Calculate the base32 serialized length
sourceimpl FromBase32 for Sha256
impl FromBase32 for Sha256
type Err = ParseError
type Err = ParseError
The associated error which can be returned from parsing (e.g. because of bad padding).
sourcefn from_base32(field_data: &[u5]) -> Result<Sha256, ParseError>
fn from_base32(field_data: &[u5]) -> Result<Sha256, ParseError>
Convert a base32 slice to Self
.
sourceimpl ToBase32 for Sha256
impl ToBase32 for Sha256
sourcefn 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. Read more
impl Eq for Sha256
impl StructuralEq for Sha256
impl StructuralPartialEq for Sha256
Auto Trait Implementations
impl RefUnwindSafe for Sha256
impl Send for Sha256
impl Sync for Sha256
impl Unpin for Sha256
impl UnwindSafe for Sha256
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more