pub struct BasicPoints(/* private fields */);
Expand description
Implementations§
Source§impl BasicPoints
impl BasicPoints
pub const MAX: u16 = 10_000u16
pub fn checked_add(self, rhs: Self) -> Result<Self, StdError>
pub fn from_ratio( numerator: Uint128, denominator: Uint128, ) -> Result<Self, StdError>
pub fn percent(percent: u16) -> BasicPoints
pub fn reverse(self) -> BasicPoints
pub fn decimal(self) -> Decimal
pub fn div_decimal(self, rhs: Self) -> Decimal
pub const fn max() -> Self
pub const fn one() -> Self
pub const fn zero() -> Self
pub const fn u16(self) -> u16
pub const fn is_max(self) -> bool
pub const fn is_zero(self) -> bool
Trait Implementations§
Source§impl Clone for BasicPoints
impl Clone for BasicPoints
Source§fn clone(&self) -> BasicPoints
fn clone(&self) -> BasicPoints
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for BasicPoints
impl Debug for BasicPoints
Source§impl Default for BasicPoints
impl Default for BasicPoints
Source§fn default() -> BasicPoints
fn default() -> BasicPoints
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for BasicPoints
impl<'de> Deserialize<'de> for BasicPoints
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<BasicPoints> for Uint128
impl From<BasicPoints> for Uint128
Source§fn from(value: BasicPoints) -> Self
fn from(value: BasicPoints) -> Self
Converts to this type from the input type.
Source§impl From<BasicPoints> for u16
impl From<BasicPoints> for u16
Source§fn from(value: BasicPoints) -> Self
fn from(value: BasicPoints) -> Self
Converts to this type from the input type.
Source§impl JsonSchema for BasicPoints
impl JsonSchema for BasicPoints
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref
keyword. Read moreSource§impl Mul<Decimal> for BasicPoints
impl Mul<Decimal> for BasicPoints
Source§impl Mul<Uint128> for BasicPoints
impl Mul<Uint128> for BasicPoints
Source§impl PartialEq for BasicPoints
impl PartialEq for BasicPoints
Source§impl Serialize for BasicPoints
impl Serialize for BasicPoints
Source§impl TryFrom<Decimal> for BasicPoints
impl TryFrom<Decimal> for BasicPoints
Source§impl TryFrom<u128> for BasicPoints
impl TryFrom<u128> for BasicPoints
Source§impl TryFrom<u16> for BasicPoints
impl TryFrom<u16> for BasicPoints
impl Copy for BasicPoints
impl StructuralPartialEq for BasicPoints
Auto Trait Implementations§
impl Freeze for BasicPoints
impl RefUnwindSafe for BasicPoints
impl Send for BasicPoints
impl Sync for BasicPoints
impl Unpin for BasicPoints
impl UnwindSafe for BasicPoints
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