[][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.


value: Primitivevalid_range: RangeInclusive<u128>

Inclusive wrap-around range of valid values, that is, if start > end, it represents start..=MAX, 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.


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 Clone for Scalar[src]

impl Debug for Scalar[src]

impl Eq for Scalar[src]

impl Hash for Scalar[src]

impl<__CTX> HashStable<__CTX> for Scalar where
    __CTX: HashStableContext

impl PartialEq<Scalar> for Scalar[src]

impl StructuralEq for Scalar[src]

impl StructuralPartialEq for Scalar[src]

Auto Trait Implementations

impl RefUnwindSafe for Scalar

impl Send for Scalar

impl Sync for Scalar

impl Unpin for Scalar

impl UnwindSafe for Scalar

Blanket Implementations

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

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

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

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

impl<T, U> Into<U> for T where
    U: From<T>, 

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

type Error = !

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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

The type returned in the event of a conversion error.