pub struct SdkDec { /* private fields */ }
Expand description
SdkDec: Decimal string representing the protobuf string for
"cosmossdk.io/math".LegacyDec
.
See https://pkg.go.dev/cosmossdk.io/math@v1.2.0#LegacyDec.
Implementations§
Trait Implementations§
Source§impl FromStr for SdkDec
impl FromStr for SdkDec
Source§fn from_str(s: &str) -> Result<Self, Self::Err>
fn from_str(s: &str) -> Result<Self, Self::Err>
Converts the decimal string to an SdkDec
compatible for use with
protobuf strings corresponding to "cosmossdk.io/math".LegacyDec
See https://pkg.go.dev/cosmossdk.io/math@v1.2.0#LegacyDec.
Possible inputs: “-69”, “-420.69”, “1.23”, “1”, “0012”, “1.123000”, Disallowed: “”, “.23”
Auto Trait Implementations§
impl Freeze for SdkDec
impl RefUnwindSafe for SdkDec
impl Send for SdkDec
impl Sync for SdkDec
impl Unpin for SdkDec
impl UnwindSafe for SdkDec
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more