pub struct IntegralTypeSet(/* private fields */);Expand description
The source-level primitive types still compatible with an integral JVM value.
The JVM verifier uses one integral category for boolean, byte, char,
short, and int. This set preserves the narrower information supplied by
descriptors and instructions without inventing a single source type when
the bytecode cannot prove one.
Integer constants retain only types whose value ranges contain the constant;
zero and one remain ambiguous between boolean and numeric uses.
Implementations§
Source§impl IntegralTypeSet
impl IntegralTypeSet
Sourcepub const ALL: Self
pub const ALL: Self
Every source-level type represented by the JVM integral verification category.
Sourcepub const fn contains(self, primitive: PrimitiveType) -> bool
pub const fn contains(self, primitive: PrimitiveType) -> bool
Returns whether primitive remains a candidate.
Sourcepub const fn exact_type(self) -> Option<PrimitiveType>
pub const fn exact_type(self) -> Option<PrimitiveType>
Returns the exact primitive type when this set has one candidate.
Trait Implementations§
Source§impl Clone for IntegralTypeSet
impl Clone for IntegralTypeSet
impl Copy for IntegralTypeSet
Source§impl Debug for IntegralTypeSet
impl Debug for IntegralTypeSet
impl Eq for IntegralTypeSet
Source§impl Hash for IntegralTypeSet
impl Hash for IntegralTypeSet
Source§impl Ord for IntegralTypeSet
impl Ord for IntegralTypeSet
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for IntegralTypeSet
impl PartialEq for IntegralTypeSet
Source§impl PartialOrd for IntegralTypeSet
impl PartialOrd for IntegralTypeSet
impl StructuralPartialEq for IntegralTypeSet
Auto Trait Implementations§
impl Freeze for IntegralTypeSet
impl RefUnwindSafe for IntegralTypeSet
impl Send for IntegralTypeSet
impl Sync for IntegralTypeSet
impl Unpin for IntegralTypeSet
impl UnsafeUnpin for IntegralTypeSet
impl UnwindSafe for IntegralTypeSet
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.