Struct rustc_target::abi::Scalar [−][src]
pub struct Scalar {
pub value: Primitive,
pub valid_range: RangeInclusive<u128>,
}Expand description
Information about one scalar component of a Rust type.
Fields
value: Primitivevalid_range: RangeInclusive<u128>Expand description
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.
Implementations
impl Scalar[src]
impl Scalar[src]pub fn is_bool(&self) -> bool[src]
pub fn valid_range_exclusive<C: HasDataLayout>(&self, cx: &C) -> Range<u128>[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<__CTX> HashStable<__CTX> for Scalar where
__CTX: HashStableContext, [src]
impl<__CTX> HashStable<__CTX> for Scalar where
__CTX: HashStableContext, [src]fn hash_stable(&self, __hcx: &mut __CTX, __hasher: &mut StableHasher)[src]
impl Eq 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> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<T> MaybeResult<T> for T[src]
impl<T> MaybeResult<T> for T[src]impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, [src]type Owned = T
type Owned = TThe resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn to_owned(&self) -> T[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)[src]
pub fn clone_into(&self, target: &mut T)[src]🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more