pub struct Int(/* private fields */);Expand description
Int
Implementations§
Source§impl Int
impl Int
pub fn to_i128(&self) -> Option<i128>
pub fn to_i64(&self) -> Option<i64>
Sourcepub fn to_leb128(&self) -> Vec<u8> ⓘ
pub fn to_leb128(&self) -> Vec<u8> ⓘ
Serialize the arbitrary-precision integer to LEB128 bytes.
Sourcepub fn saturating_add(self, rhs: Int) -> Int
pub fn saturating_add(self, rhs: Int) -> Int
Saturating addition (unbounded; equivalent to normal addition).
Sourcepub fn saturating_sub(self, rhs: Int) -> Int
pub fn saturating_sub(self, rhs: Int) -> Int
Saturating subtraction (unbounded; equivalent to normal subtraction).
Trait Implementations§
Source§impl AddAssign for Int
impl AddAssign for Int
Source§fn add_assign(&mut self, __rhs: Int)
fn add_assign(&mut self, __rhs: Int)
Performs the
+= operation. Read moreSource§impl CandidType for Int
impl CandidType for Int
Source§impl<'de> Deserialize<'de> for Int
impl<'de> Deserialize<'de> for Int
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Int, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Int, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl DivAssign for Int
impl DivAssign for Int
Source§fn div_assign(&mut self, other: Int)
fn div_assign(&mut self, other: Int)
Performs the
/= operation. Read moreSource§impl FieldValue for Int
impl FieldValue for Int
Source§impl MulAssign for Int
impl MulAssign for Int
Source§fn mul_assign(&mut self, other: Int)
fn mul_assign(&mut self, other: Int)
Performs the
*= operation. Read moreSource§impl Ord for Int
impl Ord for Int
Source§impl PartialOrd for Int
impl PartialOrd for Int
Source§impl SanitizeAuto for Int
impl SanitizeAuto for Int
fn sanitize_self(&mut self, _ctx: &mut dyn VisitorContext)
Source§impl SanitizeCustom for Int
impl SanitizeCustom for Int
fn sanitize_custom(&mut self, _ctx: &mut dyn VisitorContext)
Source§impl Serialize for Int
impl Serialize for Int
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Source§impl SubAssign for Int
impl SubAssign for Int
Source§fn sub_assign(&mut self, __rhs: Int)
fn sub_assign(&mut self, __rhs: Int)
Performs the
-= operation. Read moreSource§impl UpdateView for Int
impl UpdateView for Int
Source§type UpdateViewType = Int
type UpdateViewType = Int
Payload accepted when updating this value.
Source§fn merge(
&mut self,
v: <Int as UpdateView>::UpdateViewType,
) -> Result<(), ViewPatchError>
fn merge( &mut self, v: <Int as UpdateView>::UpdateViewType, ) -> Result<(), ViewPatchError>
Merge the update payload into self.
Source§impl ValidateAuto for Int
impl ValidateAuto for Int
fn validate_self(&self, _ctx: &mut dyn VisitorContext)
Source§impl ValidateCustom for Int
impl ValidateCustom for Int
fn validate_custom(&self, _ctx: &mut dyn VisitorContext)
Source§impl Visitable for Int
impl Visitable for Int
fn drive(&self, _: &mut dyn VisitorCore)
fn drive_mut(&mut self, _: &mut dyn VisitorMutCore)
impl Eq for Int
impl StructuralPartialEq for Int
Auto Trait Implementations§
impl Freeze for Int
impl RefUnwindSafe for Int
impl Send for Int
impl Sync for Int
impl Unpin for Int
impl UnwindSafe for Int
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