Struct neovim_lib::Integer
[−]
pub struct Integer { /* fields omitted */ }Represents a MessagePack integer, whether signed or unsigned.
A Value or ValueRef that contains integer can be constructed using From trait.
Methods
impl Integer
fn is_i64(&self) -> bool
Returns true if the integer can be represented as i64.
fn is_u64(&self) -> bool
Returns true if the integer can be represented as u64.
fn as_i64(&self) -> Option<i64>
Returns the integer represented as i64 if possible, or else None.
fn as_u64(&self) -> Option<u64>
Returns the integer represented as u64 if possible, or else None.
fn as_f64(&self) -> Option<f64>
Returns the integer represented as f64 if possible, or else None.
Trait Implementations
impl PartialEq<Integer> for Integer
fn eq(&self, __arg_0: &Integer) -> bool
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, __arg_0: &Integer) -> bool
This method tests for !=.
impl Copy for Integer
impl Display for Integer
fn fmt(&self, fmt: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter. Read more
impl From<u8> for Integer
impl From<u16> for Integer
impl From<u32> for Integer
impl From<u64> for Integer
impl From<usize> for Integer
impl From<i8> for Integer
impl From<i16> for Integer
impl From<i32> for Integer
impl From<i64> for Integer
impl From<isize> for Integer
impl Debug for Integer
fn fmt(&self, fmt: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter.
impl Clone for Integer
fn clone(&self) -> Integer
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0
Performs copy-assignment from source. Read more