Enum Dest
pub enum Dest<A: Arch> {
Reg(A::Reg, Size),
Mem(usize, Size),
}Expand description
A destination in a dataflow.
Variants§
Reg(A::Reg, Size)
A specific area of a register.
Mem(usize, Size)
A specific area of a memory access.
Implementations§
§impl<A: Arch> Dest<A>
impl<A: Arch> Dest<A>
pub fn with_size(&self, size: Size) -> Self
pub fn with_size(&self, size: Size) -> Self
Replaces the size of the destination with the provided size.
pub fn contains(&self, other: &Dest<A>) -> bool
pub fn contains(&self, other: &Dest<A>) -> bool
Returns true if the destination fully contains other.
pub fn mask(&self) -> Option<u64>
pub fn mask(&self) -> Option<u64>
Returns the mask of the destination, if it has one. The value of the destination must always be masked with the mask before setting it.
pub fn kind(&self) -> LocationKind
pub fn kind(&self) -> LocationKind
Returns the LocationKind of the destination.
pub fn overlaps(&self, other: &Dest<A>) -> bool
pub fn overlaps(&self, other: &Dest<A>) -> bool
Returns true if the destination (partially or completely) overlaps with other.
Destinations overlap if both destinations are the same register or the same memory access, and the size overlaps.
pub fn overlapping_area(&self, other: &Dest<A>) -> Option<Size>
pub fn overlapping_area(&self, other: &Dest<A>) -> Option<Size>
Returns the overlapping area between this destination and other.
Returns None if there is no overlap.
pub fn value_type(&self) -> ValueType
pub fn value_type(&self) -> ValueType
Returns the ValueType of the destination.
Trait Implementations§
§impl<'de, A: Arch> Deserialize<'de> for Dest<A>
impl<'de, A: Arch> Deserialize<'de> for Dest<A>
§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl<A> JsonSchema for Dest<A>
impl<A> JsonSchema for Dest<A>
§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
§fn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref keyword. Read more§impl<A: Ord + Arch> Ord for Dest<A>
impl<A: Ord + Arch> Ord for Dest<A>
§impl<A: PartialOrd + Arch> PartialOrd for Dest<A>where
A::Reg: PartialOrd,
impl<A: PartialOrd + Arch> PartialOrd for Dest<A>where
A::Reg: PartialOrd,
impl<A: Copy + Arch> Copy for Dest<A>
impl<A: Eq + Arch> Eq for Dest<A>
impl<A: Arch> StructuralPartialEq for Dest<A>
Auto Trait Implementations§
impl<A> Freeze for Dest<A>
impl<A> RefUnwindSafe for Dest<A>
impl<A> Send for Dest<A>
impl<A> Sync for Dest<A>
impl<A> Unpin for Dest<A>
impl<A> UnwindSafe for Dest<A>
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more