pub struct MemFlags { /* fields omitted */ }Flags for memory operations like load/store.
Each of these flags introduce a limited form of undefined behavior. The flags each enable
certain optimizations that need to make additional assumptions. Generally, the semantics of a
program does not change when a flag is removed, but adding a flag will.
Create a new empty set of flags.
Create a set of flags representing an access from a "trusted" address, meaning it's
known to be aligned and non-trapping.
Set a flag bit by name.
Returns true if the flag was found and set, false for an unknown flag name.
Test if the notrap flag is set.
Normally, trapping is part of the semantics of a load/store operation. If the platform
would cause a trap when accessing the effective address, the Cranelift memory operation is
also required to trap.
The notrap flag tells Cranelift that the memory is accessible, which means that
accesses will not trap. This makes it possible to delete an unused load or a dead store
instruction.
Test if the aligned flag is set.
By default, Cranelift memory instructions work with any unaligned effective address. If the
aligned flag is set, the instruction is permitted to trap or return a wrong result if the
effective address is misaligned.
Test if the readonly flag is set.
Loads with this flag have no memory dependencies.
This results in undefined behavior if the dereferenced memory is mutated at any time
between when the function is called and when it is exited.
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=.
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
Feeds this value into the given [Hasher]. Read more
Feeds a slice of this type into the given [Hasher]. Read more
🔬 This is a nightly-only experimental API. (try_from)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from)
🔬 This is a nightly-only experimental API. (try_from)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from)
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (get_type_id)
this method will likely be replaced by an associated static
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
Converts the given value to a String. Read more