parent
0203107360
commit
4a6a12011d
|
@ -458,7 +458,7 @@ fn fmt_satoshi_in(
|
|||
|
||||
/// Amount
|
||||
///
|
||||
/// The [Amount] type can be used to express Bitcoin amounts that supports
|
||||
/// The [Amount] type can be used to express Bitcoin amounts that support
|
||||
/// arithmetic and conversion to various denominations.
|
||||
///
|
||||
///
|
||||
|
@ -802,7 +802,7 @@ enum DisplayStyle {
|
|||
|
||||
/// SignedAmount
|
||||
///
|
||||
/// The [SignedAmount] type can be used to express Bitcoin amounts that supports
|
||||
/// The [SignedAmount] type can be used to express Bitcoin amounts that support
|
||||
/// arithmetic and conversion to various denominations.
|
||||
///
|
||||
///
|
||||
|
|
|
@ -159,7 +159,7 @@ pub trait WriteExt : io::Write {
|
|||
fn emit_u32(&mut self, v: u32) -> Result<(), io::Error>;
|
||||
/// Outputs a 16-bit unsigned integer.
|
||||
fn emit_u16(&mut self, v: u16) -> Result<(), io::Error>;
|
||||
/// Outputs a 8-bit unsigned integer.
|
||||
/// Outputs an 8-bit unsigned integer.
|
||||
fn emit_u8(&mut self, v: u8) -> Result<(), io::Error>;
|
||||
|
||||
/// Outputs a 64-bit signed integer.
|
||||
|
@ -168,7 +168,7 @@ pub trait WriteExt : io::Write {
|
|||
fn emit_i32(&mut self, v: i32) -> Result<(), io::Error>;
|
||||
/// Outputs a 16-bit signed integer.
|
||||
fn emit_i16(&mut self, v: i16) -> Result<(), io::Error>;
|
||||
/// Outputs a 8-bit signed integer.
|
||||
/// Outputs an 8-bit signed integer.
|
||||
fn emit_i8(&mut self, v: i8) -> Result<(), io::Error>;
|
||||
|
||||
/// Outputs a boolean.
|
||||
|
@ -186,7 +186,7 @@ pub trait ReadExt : io::Read {
|
|||
fn read_u32(&mut self) -> Result<u32, Error>;
|
||||
/// Reads a 16-bit unsigned integer.
|
||||
fn read_u16(&mut self) -> Result<u16, Error>;
|
||||
/// Reads a 8-bit unsigned integer.
|
||||
/// Reads an 8-bit unsigned integer.
|
||||
fn read_u8(&mut self) -> Result<u8, Error>;
|
||||
|
||||
/// Reads a 64-bit signed integer.
|
||||
|
@ -195,7 +195,7 @@ pub trait ReadExt : io::Read {
|
|||
fn read_i32(&mut self) -> Result<i32, Error>;
|
||||
/// Reads a 16-bit signed integer.
|
||||
fn read_i16(&mut self) -> Result<i16, Error>;
|
||||
/// Reads a 8-bit signed integer.
|
||||
/// Reads an 8-bit signed integer.
|
||||
fn read_i8(&mut self) -> Result<i8, Error>;
|
||||
|
||||
/// Reads a boolean.
|
||||
|
|
|
@ -38,14 +38,14 @@ pub const MAX_MSG_SIZE: usize = 5_000_000;
|
|||
pub struct CommandString(Cow<'static, str>);
|
||||
|
||||
impl CommandString {
|
||||
/// Convert `&'static str` to `CommandString`
|
||||
/// Converts `&'static str` to `CommandString`
|
||||
///
|
||||
/// This is more efficient for string literals than non-static conversions because it avoids
|
||||
/// allocation.
|
||||
///
|
||||
/// # Errors
|
||||
///
|
||||
/// Returns an error if and only if the string is
|
||||
/// Returns an error if, and only if, the string is
|
||||
/// larger than 12 characters in length.
|
||||
pub fn try_from_static(s: &'static str) -> Result<CommandString, CommandStringError> {
|
||||
Self::try_from_static_cow(s.into())
|
||||
|
|
Loading…
Reference in New Issue