Struct argdata::IntValue [−][src]
pub struct IntValue<'a> { /* fields omitted */ }
Represents a signed integer value of any size.
An integer that fits in a u64
or i64
is directly stored in the object.
Anything bigger is stored somewhere else (with lifetime 'a
) as a 2's complement big-endian
integer in the form of an [u8]
.
Methods
impl<'a> IntValue<'a>
[src]
impl<'a> IntValue<'a>
pub fn from_bigint(data: &'a [u8]) -> IntValue<'a>
[src]
pub fn from_bigint(data: &'a [u8]) -> IntValue<'a>
pub fn is_negative(&self) -> bool
[src]
pub fn is_negative(&self) -> bool
impl<'a> IntValue<'a>
[src]
impl<'a> IntValue<'a>
pub fn serialized_length(&self) -> usize
[src]
pub fn serialized_length(&self) -> usize
pub fn serialize(&self, writer: &mut Write) -> Result<()>
[src]
pub fn serialize(&self, writer: &mut Write) -> Result<()>
Trait Implementations
impl<'a> Clone for IntValue<'a>
[src]
impl<'a> Clone for IntValue<'a>
fn clone(&self) -> IntValue<'a>
[src]
fn clone(&self) -> IntValue<'a>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl<'a> Copy for IntValue<'a>
[src]
impl<'a> Copy for IntValue<'a>
impl<'a> PartialEq for IntValue<'a>
[src]
impl<'a> PartialEq for IntValue<'a>
fn eq(&self, other: &IntValue<'a>) -> bool
[src]
fn eq(&self, other: &IntValue<'a>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &IntValue<'a>) -> bool
[src]
fn ne(&self, other: &IntValue<'a>) -> bool
This method tests for !=
.
impl<'a> Eq for IntValue<'a>
[src]
impl<'a> Eq for IntValue<'a>
impl<'a> From<i8> for IntValue<'a>
[src]
impl<'a> From<i8> for IntValue<'a>
impl<'a> TryFrom<IntValue<'a>> for i8
[src]
impl<'a> TryFrom<IntValue<'a>> for i8
type Error = TryFromIntError
try_from
)The type returned in the event of a conversion error.
fn try_from(value: IntValue<'a>) -> Result<i8, Self::Error>
[src]
fn try_from(value: IntValue<'a>) -> Result<i8, Self::Error>
try_from
)Performs the conversion.
impl<'a> From<i16> for IntValue<'a>
[src]
impl<'a> From<i16> for IntValue<'a>
impl<'a> TryFrom<IntValue<'a>> for i16
[src]
impl<'a> TryFrom<IntValue<'a>> for i16
type Error = TryFromIntError
try_from
)The type returned in the event of a conversion error.
fn try_from(value: IntValue<'a>) -> Result<i16, Self::Error>
[src]
fn try_from(value: IntValue<'a>) -> Result<i16, Self::Error>
try_from
)Performs the conversion.
impl<'a> From<i32> for IntValue<'a>
[src]
impl<'a> From<i32> for IntValue<'a>
impl<'a> TryFrom<IntValue<'a>> for i32
[src]
impl<'a> TryFrom<IntValue<'a>> for i32
type Error = TryFromIntError
try_from
)The type returned in the event of a conversion error.
fn try_from(value: IntValue<'a>) -> Result<i32, Self::Error>
[src]
fn try_from(value: IntValue<'a>) -> Result<i32, Self::Error>
try_from
)Performs the conversion.
impl<'a> From<i64> for IntValue<'a>
[src]
impl<'a> From<i64> for IntValue<'a>
impl<'a> TryFrom<IntValue<'a>> for i64
[src]
impl<'a> TryFrom<IntValue<'a>> for i64
type Error = TryFromIntError
try_from
)The type returned in the event of a conversion error.
fn try_from(value: IntValue<'a>) -> Result<i64, Self::Error>
[src]
fn try_from(value: IntValue<'a>) -> Result<i64, Self::Error>
try_from
)Performs the conversion.
impl<'a> From<u8> for IntValue<'a>
[src]
impl<'a> From<u8> for IntValue<'a>
impl<'a> TryFrom<IntValue<'a>> for u8
[src]
impl<'a> TryFrom<IntValue<'a>> for u8
type Error = TryFromIntError
try_from
)The type returned in the event of a conversion error.
fn try_from(value: IntValue<'a>) -> Result<u8, Self::Error>
[src]
fn try_from(value: IntValue<'a>) -> Result<u8, Self::Error>
try_from
)Performs the conversion.
impl<'a> From<u16> for IntValue<'a>
[src]
impl<'a> From<u16> for IntValue<'a>
impl<'a> TryFrom<IntValue<'a>> for u16
[src]
impl<'a> TryFrom<IntValue<'a>> for u16
type Error = TryFromIntError
try_from
)The type returned in the event of a conversion error.
fn try_from(value: IntValue<'a>) -> Result<u16, Self::Error>
[src]
fn try_from(value: IntValue<'a>) -> Result<u16, Self::Error>
try_from
)Performs the conversion.
impl<'a> From<u32> for IntValue<'a>
[src]
impl<'a> From<u32> for IntValue<'a>
impl<'a> TryFrom<IntValue<'a>> for u32
[src]
impl<'a> TryFrom<IntValue<'a>> for u32
type Error = TryFromIntError
try_from
)The type returned in the event of a conversion error.
fn try_from(value: IntValue<'a>) -> Result<u32, Self::Error>
[src]
fn try_from(value: IntValue<'a>) -> Result<u32, Self::Error>
try_from
)Performs the conversion.
impl<'a> From<u64> for IntValue<'a>
[src]
impl<'a> From<u64> for IntValue<'a>
impl<'a> TryFrom<IntValue<'a>> for u64
[src]
impl<'a> TryFrom<IntValue<'a>> for u64
type Error = TryFromIntError
try_from
)The type returned in the event of a conversion error.
fn try_from(value: IntValue<'a>) -> Result<u64, Self::Error>
[src]
fn try_from(value: IntValue<'a>) -> Result<u64, Self::Error>
try_from
)Performs the conversion.
impl<'a> PartialOrd<IntValue<'a>> for IntValue<'a>
[src]
impl<'a> PartialOrd<IntValue<'a>> for IntValue<'a>
fn partial_cmp(&self, other: &IntValue<'a>) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &IntValue<'a>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
fn gt(&self, other: &Rhs) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
fn ge(&self, other: &Rhs) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl<'a> Ord for IntValue<'a>
[src]
impl<'a> Ord for IntValue<'a>
fn cmp(&self, other: &Self) -> Ordering
[src]
fn cmp(&self, other: &Self) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
impl<'a> Debug for IntValue<'a>
[src]
impl<'a> Debug for IntValue<'a>