Struct git_config::values::Integer[][src]

pub struct Integer {
    pub value: i64,
    pub suffix: Option<IntegerSuffix>,
}

Any value that can be interpreted as an integer.

This supports any numeric value that can fit in a i64, excluding the suffix. The suffix is parsed separately from the value itself, so if you wish to obtain the true value of the integer, you must account for the suffix after fetching the value. IntegerSuffix provides bitwise_offset to help with the math, but do be warned that if the value is very large, you may run into overflows.

Fields

value: i64

The value, without any suffix modification

suffix: Option<IntegerSuffix>

A provided suffix, if any.

Implementations

impl Integer[src]

#[must_use]pub fn to_vec(&self) -> Vec<u8>[src]

Generates a byte representation of the value. This should be used when non-UTF-8 sequences are present or a UTF-8 representation can’t be guaranteed.

Trait Implementations

impl Clone for Integer[src]

impl Copy for Integer[src]

impl Debug for Integer[src]

impl Display for Integer[src]

impl Eq for Integer[src]

impl FromStr for Integer[src]

type Err = String

The associated error which can be returned from parsing.

impl Hash for Integer[src]

impl Into<Vec<u8, Global>> for Integer[src]

impl Into<Vec<u8, Global>> for &Integer[src]

impl Ord for Integer[src]

impl PartialEq<Integer> for Integer[src]

impl PartialOrd<Integer> for Integer[src]

impl StructuralEq for Integer[src]

impl StructuralPartialEq for Integer[src]

impl TryFrom<&'_ [u8]> for Integer[src]

type Error = ()

The type returned in the event of a conversion error.

impl TryFrom<Cow<'_, [u8]>> for Integer[src]

type Error = ()

The type returned in the event of a conversion error.

impl TryFrom<Vec<u8, Global>> for Integer[src]

type Error = ()

The type returned in the event of a conversion error.

Auto Trait Implementations

impl RefUnwindSafe for Integer

impl Send for Integer

impl Sync for Integer

impl Unpin for Integer

impl UnwindSafe for Integer

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Conv for T

impl<T> Conv for T

impl<T> FmtForward for T

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pipe for T where
    T: ?Sized

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Tap for T

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> TryConv for T

impl<T> TryConv for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.