Struct miniscript::descriptor::checksum::Formatter
source · pub struct Formatter<'f, 'a> { /* private fields */ }
Expand description
A wrapper around a fmt::Formatter
which provides checksumming ability.
Implementations§
source§impl<'f, 'a> Formatter<'f, 'a>
impl<'f, 'a> Formatter<'f, 'a>
sourcepub fn new(f: &'f mut Formatter<'a>) -> Self
pub fn new(f: &'f mut Formatter<'a>) -> Self
Contructs a new Formatter
, wrapping a given fmt::Formatter
.
sourcepub fn write_checksum(&mut self) -> Result
pub fn write_checksum(&mut self) -> Result
Writes the checksum into the underlying fmt::Formatter
.
sourcepub fn write_checksum_if_not_alt(&mut self) -> Result
pub fn write_checksum_if_not_alt(&mut self) -> Result
Writes the checksum into the underlying fmt::Formatter
, unless it has “alternate” display on.
Trait Implementations§
Auto Trait Implementations§
impl<'f, 'a> !RefUnwindSafe for Formatter<'f, 'a>
impl<'f, 'a> !Send for Formatter<'f, 'a>
impl<'f, 'a> !Sync for Formatter<'f, 'a>
impl<'f, 'a> Unpin for Formatter<'f, 'a>
impl<'f, 'a> !UnwindSafe for Formatter<'f, 'a>
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