pub struct Visitor<T>(pub T);Tuple Fields§
§0: TImplementations§
Source§impl<T> Visitor<T>
impl<T> Visitor<T>
pub fn visit_instruction( &mut self, inst: &mut Instruction, analyses: &GlobalAnalyses, visit_read: impl FnMut(&mut T, &mut Value), visit_write: impl FnMut(&mut T, &mut Value), )
pub fn visit_out( &mut self, out: &mut Option<Value>, visit_write: impl FnMut(&mut T, &mut Value), )
Sourcepub fn visit_operation(
&mut self,
op: &mut Operation,
analyses: &GlobalAnalyses,
visit_read: impl FnMut(&mut T, &mut Value),
)
pub fn visit_operation( &mut self, op: &mut Operation, analyses: &GlobalAnalyses, visit_read: impl FnMut(&mut T, &mut Value), )
Visit an operation with a set of read and write visitors. Each visitor will be called with each read or written to variable.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Visitor<T>where
T: Freeze,
impl<T> RefUnwindSafe for Visitor<T>where
T: RefUnwindSafe,
impl<T> Send for Visitor<T>where
T: Send,
impl<T> Sync for Visitor<T>where
T: Sync,
impl<T> Unpin for Visitor<T>where
T: Unpin,
impl<T> UnsafeUnpin for Visitor<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Visitor<T>where
T: UnwindSafe,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<R> CryptoRng for R
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 moreimpl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
impl<R> RngCore for Rwhere
R: Rng,
Source§impl<R> RngExt for R
impl<R> RngExt for R
Source§fn random<T>(&mut self) -> Twhere
StandardUniform: Distribution<T>,
fn random<T>(&mut self) -> Twhere
StandardUniform: Distribution<T>,
Return a random value via the
StandardUniform distribution. Read moreSource§fn random_iter<T>(self) -> Iter<StandardUniform, Self, T>
fn random_iter<T>(self) -> Iter<StandardUniform, Self, T>
Source§fn random_range<T, R>(&mut self, range: R) -> Twhere
T: SampleUniform,
R: SampleRange<T>,
fn random_range<T, R>(&mut self, range: R) -> Twhere
T: SampleUniform,
R: SampleRange<T>,
Generate a random value in the given range. Read more
Source§fn random_bool(&mut self, p: f64) -> bool
fn random_bool(&mut self, p: f64) -> bool
Return a bool with a probability
p of being true. Read moreSource§fn random_ratio(&mut self, numerator: u32, denominator: u32) -> bool
fn random_ratio(&mut self, numerator: u32, denominator: u32) -> bool
Return a bool with a probability of
numerator/denominator of being
true. Read moreSource§fn sample<T, D>(&mut self, distr: D) -> Twhere
D: Distribution<T>,
fn sample<T, D>(&mut self, distr: D) -> Twhere
D: Distribution<T>,
Sample a new value, using the given distribution. Read more
Source§fn sample_iter<T, D>(self, distr: D) -> Iter<D, Self, T>where
D: Distribution<T>,
Self: Sized,
fn sample_iter<T, D>(self, distr: D) -> Iter<D, Self, T>where
D: Distribution<T>,
Self: Sized,
Create an iterator that generates values using the given distribution. Read more