[][src]Struct rustc_target::abi::Scalar

pub struct Scalar {
    pub value: Primitive,
    pub valid_range: RangeInclusive<u128>,
}

Information about one scalar component of a Rust type.

Fields

value: Primitivevalid_range: RangeInclusive<u128>

Inclusive wrap-around range of valid values, that is, if start > end, it represents start..=max_value(), followed by 0..=end.

That is, for an i8 primitive, a range of 254..=2 means following sequence:

254 (-2), 255 (-1), 0, 1, 2

This is intended specifically to mirror LLVM’s !range metadata, semantics.

Methods

impl Scalar[src]

pub fn is_bool(&self) -> bool[src]

pub fn valid_range_exclusive<C: HasDataLayout>(&self, cx: &C) -> Range<u128>[src]

Returns the valid range as a x..y range.

If x and y are equal, the range is full, not empty.

Trait Implementations

impl Eq for Scalar[src]

impl Clone for Scalar[src]

impl PartialEq<Scalar> for Scalar[src]

impl Hash for Scalar[src]

impl Debug for Scalar[src]

Auto Trait Implementations

impl Unpin for Scalar

impl Sync for Scalar

impl Send for Scalar

impl UnwindSafe for Scalar

impl RefUnwindSafe for Scalar

Blanket Implementations

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

type Owned = T

The resulting type after obtaining ownership.

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

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

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.

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

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

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

impl<T> Erased for T[src]

impl<E> SpecializationError for E[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]