pub enum Effect {
Nothing,
Reads,
Writes,
}Expand description
What a function does to one part of memory.
Ordered weakest first, so that adding up what a body does is a maximum and narrowing what was promised against what was worked out is a minimum. There is no fourth value for writing without reading: a summary that claimed it would have to be believed by a load as well as by a store, and nothing at this granularity has earned that.
Variants§
Nothing
Never touched.
Reads
Read and not written.
Writes
Written, and read as far as anything here can tell.
Implementations§
Source§impl Effect
impl Effect
Sourcepub fn as_well_as(self, other: Self) -> Self
pub fn as_well_as(self, other: Self) -> Self
Both of these are true of the same function, so the tighter one is.
Trait Implementations§
impl Copy for Effect
impl Eq for Effect
Source§impl Ord for Effect
impl Ord for Effect
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 PartialOrd for Effect
impl PartialOrd for Effect
impl StructuralPartialEq for Effect
Auto Trait Implementations§
impl Freeze for Effect
impl RefUnwindSafe for Effect
impl Send for Effect
impl Sync for Effect
impl Unpin for Effect
impl UnsafeUnpin for Effect
impl UnwindSafe for Effect
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