Struct cov::raw::BlockAttr [−]
pub struct BlockAttr { /* fields omitted */ }
Attributes about a basic block.
Methods
impl BlockAttr
impl BlockAttr
pub const UNEXPECTED: BlockAttr
UNEXPECTED: BlockAttr = BlockAttr{bits: 2,}
The block is unexpected.
Equivalent to the GCOV_BLOCK_UNEXPECTED
flag.
pub const CALL_SITE: BlockAttr
CALL_SITE: BlockAttr = BlockAttr{bits: 4096,}
The block ends with a function call which may throw an exception.
pub const CALL_RETURN: BlockAttr
CALL_RETURN: BlockAttr = BlockAttr{bits: 8192,}
The block starts with the return from a function call.
pub const NONLOCAL_RETURN: BlockAttr
NONLOCAL_RETURN: BlockAttr = BlockAttr{bits: 16384,}
The block is the landing pad for longjmp
.
pub const EXCEPTIONAL: BlockAttr
EXCEPTIONAL: BlockAttr = BlockAttr{bits: 32768,}
The block starts as a catch block.
pub fn empty() -> BlockAttr
pub fn empty() -> BlockAttr
Returns an empty set of flags.
pub fn all() -> BlockAttr
pub fn all() -> BlockAttr
Returns the set containing all flags.
pub fn bits(&self) -> u16
pub fn bits(&self) -> u16
Returns the raw value of the flags currently stored.
pub fn from_bits(bits: u16) -> Option<BlockAttr>
pub fn from_bits(bits: u16) -> Option<BlockAttr>
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
pub fn from_bits_truncate(bits: u16) -> BlockAttr
pub fn from_bits_truncate(bits: u16) -> BlockAttr
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
pub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Returns true
if no flags are currently stored.
pub fn is_all(&self) -> bool
pub fn is_all(&self) -> bool
Returns true
if all flags are currently set.
pub fn intersects(&self, other: BlockAttr) -> bool
pub fn intersects(&self, other: BlockAttr) -> bool
Returns true
if there are flags common to both self
and other
.
pub fn contains(&self, other: BlockAttr) -> bool
pub fn contains(&self, other: BlockAttr) -> bool
Returns true
all of the flags in other
are contained within self
.
pub fn insert(&mut self, other: BlockAttr)
pub fn insert(&mut self, other: BlockAttr)
Inserts the specified flags in-place.
pub fn remove(&mut self, other: BlockAttr)
pub fn remove(&mut self, other: BlockAttr)
Removes the specified flags in-place.
pub fn toggle(&mut self, other: BlockAttr)
pub fn toggle(&mut self, other: BlockAttr)
Toggles the specified flags in-place.
pub fn set(&mut self, other: BlockAttr, value: bool)
pub fn set(&mut self, other: BlockAttr, value: bool)
Inserts or removes the specified flags depending on the passed value.
impl BlockAttr
[src]
impl BlockAttr
pub fn from_gcno(flags: u32) -> Result<BlockAttr>
[src]
pub fn from_gcno(flags: u32) -> Result<BlockAttr>
Converts an integer read from GCNO to this attribute.
Errors
Returns UnsupportedAttr
if the GCNO flag is unrecognized.
Trait Implementations
impl Copy for BlockAttr
impl Copy for BlockAttr
impl PartialEq for BlockAttr
impl PartialEq for BlockAttr
fn eq(&self, other: &BlockAttr) -> bool
fn eq(&self, other: &BlockAttr) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &BlockAttr) -> bool
fn ne(&self, other: &BlockAttr) -> bool
This method tests for !=
.
impl Eq for BlockAttr
impl Eq for BlockAttr
impl Clone for BlockAttr
impl Clone for BlockAttr
fn clone(&self) -> BlockAttr
fn clone(&self) -> BlockAttr
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl PartialOrd for BlockAttr
impl PartialOrd for BlockAttr
fn partial_cmp(&self, other: &BlockAttr) -> Option<Ordering>
fn partial_cmp(&self, other: &BlockAttr) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &BlockAttr) -> bool
fn lt(&self, other: &BlockAttr) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &BlockAttr) -> bool
fn le(&self, other: &BlockAttr) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &BlockAttr) -> bool
fn gt(&self, other: &BlockAttr) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &BlockAttr) -> bool
fn ge(&self, other: &BlockAttr) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Ord for BlockAttr
impl Ord for BlockAttr
fn cmp(&self, other: &BlockAttr) -> Ordering
fn cmp(&self, other: &BlockAttr) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
impl Hash for BlockAttr
impl Hash for BlockAttr
fn hash<__H: Hasher>(&self, state: &mut __H)
fn hash<__H: Hasher>(&self, state: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Default for BlockAttr
[src]
impl Default for BlockAttr
impl Debug for BlockAttr
impl Debug for BlockAttr
impl Binary for BlockAttr
impl Binary for BlockAttr
impl Octal for BlockAttr
impl Octal for BlockAttr
impl LowerHex for BlockAttr
impl LowerHex for BlockAttr
impl UpperHex for BlockAttr
impl UpperHex for BlockAttr
impl BitOr for BlockAttr
impl BitOr for BlockAttr
type Output = BlockAttr
The resulting type after applying the |
operator.
fn bitor(self, other: BlockAttr) -> BlockAttr
fn bitor(self, other: BlockAttr) -> BlockAttr
Returns the union of the two sets of flags.
impl BitOrAssign for BlockAttr
impl BitOrAssign for BlockAttr
fn bitor_assign(&mut self, other: BlockAttr)
fn bitor_assign(&mut self, other: BlockAttr)
Adds the set of flags.
impl BitXor for BlockAttr
impl BitXor for BlockAttr
type Output = BlockAttr
The resulting type after applying the ^
operator.
fn bitxor(self, other: BlockAttr) -> BlockAttr
fn bitxor(self, other: BlockAttr) -> BlockAttr
Returns the left flags, but with all the right flags toggled.
impl BitXorAssign for BlockAttr
impl BitXorAssign for BlockAttr
fn bitxor_assign(&mut self, other: BlockAttr)
fn bitxor_assign(&mut self, other: BlockAttr)
Toggles the set of flags.
impl BitAnd for BlockAttr
impl BitAnd for BlockAttr
type Output = BlockAttr
The resulting type after applying the &
operator.
fn bitand(self, other: BlockAttr) -> BlockAttr
fn bitand(self, other: BlockAttr) -> BlockAttr
Returns the intersection between the two sets of flags.
impl BitAndAssign for BlockAttr
impl BitAndAssign for BlockAttr
fn bitand_assign(&mut self, other: BlockAttr)
fn bitand_assign(&mut self, other: BlockAttr)
Disables all flags disabled in the set.
impl Sub for BlockAttr
impl Sub for BlockAttr
type Output = BlockAttr
The resulting type after applying the -
operator.
fn sub(self, other: BlockAttr) -> BlockAttr
fn sub(self, other: BlockAttr) -> BlockAttr
Returns the set difference of the two sets of flags.
impl SubAssign for BlockAttr
impl SubAssign for BlockAttr
fn sub_assign(&mut self, other: BlockAttr)
fn sub_assign(&mut self, other: BlockAttr)
Disables all flags enabled in the set.
impl Not for BlockAttr
impl Not for BlockAttr
type Output = BlockAttr
The resulting type after applying the !
operator.
fn not(self) -> BlockAttr
fn not(self) -> BlockAttr
Returns the complement of this set of flags.
impl Extend<BlockAttr> for BlockAttr
impl Extend<BlockAttr> for BlockAttr
fn extend<T: IntoIterator<Item = BlockAttr>>(&mut self, iterator: T)
fn extend<T: IntoIterator<Item = BlockAttr>>(&mut self, iterator: T)
Extends a collection with the contents of an iterator. Read more
impl FromIterator<BlockAttr> for BlockAttr
impl FromIterator<BlockAttr> for BlockAttr
fn from_iter<T: IntoIterator<Item = BlockAttr>>(iterator: T) -> BlockAttr
fn from_iter<T: IntoIterator<Item = BlockAttr>>(iterator: T) -> BlockAttr
Creates a value from an iterator. Read more
impl Serialize for BlockAttr
[src]
impl Serialize for BlockAttr
fn serialize<S: Serializer>(&self, serializer: S) -> StdResult<S::Ok, S::Error>
[src]
fn serialize<S: Serializer>(&self, serializer: S) -> StdResult<S::Ok, S::Error>
Serialize this value into the given Serde serializer. Read more
impl<'de> Deserialize<'de> for BlockAttr
[src]
impl<'de> Deserialize<'de> for BlockAttr
fn deserialize<D: Deserializer<'de>>(
deserializer: D
) -> StdResult<Self, D::Error>
[src]
fn deserialize<D: Deserializer<'de>>(
deserializer: D
) -> StdResult<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl SerializeWithInterner for BlockAttr
[src]
impl SerializeWithInterner for BlockAttr
fn serialize_with_interner<S: Serializer>(
&self,
serializer: S,
_: &Interner
) -> Result<S::Ok, S::Error>
[src]
fn serialize_with_interner<S: Serializer>(
&self,
serializer: S,
_: &Interner
) -> Result<S::Ok, S::Error>
Serializes this value with help from an [Interner
] that writes [Symbol
]s as strings. Read more
fn with_interner<'si>(
&self,
interner: &'si Interner
) -> WithInterner<'si, &Self>
[src]
fn with_interner<'si>(
&self,
interner: &'si Interner
) -> WithInterner<'si, &Self>
Adorns this object with a string interner. Read more