Struct cranelift_control::ControlPlane
source · pub struct ControlPlane { /* private fields */ }
Expand description
A shim for ControlPlane when chaos mode is disabled. Please see the crate-level documentation.
Implementations§
source§impl ControlPlane
impl ControlPlane
sourcepub fn set_fuel(&mut self, _fuel: u8)
pub fn set_fuel(&mut self, _fuel: u8)
Set the fuel limit. This variant is used when chaos mode is disabled. It doesn’t do anything.
sourcepub fn get_decision(&mut self) -> bool
pub fn get_decision(&mut self) -> bool
Returns a pseudo-random boolean. This variant is used when chaos
mode is disabled. It always returns false
.
sourcepub fn get_arbitrary<T: for<'a> Arbitrary<'a> + Default>(&mut self) -> T
pub fn get_arbitrary<T: for<'a> Arbitrary<'a> + Default>(&mut self) -> T
Returns an arbitrary value. This variant is used when chaos mode is disabled. It always returns the default value.
Trait Implementations§
source§impl Arbitrary<'_> for ControlPlane
impl Arbitrary<'_> for ControlPlane
A shim for ControlPlane’s Arbitrary
implementation when chaos mode is
disabled. It doesn’t consume any bytes and always returns a default
control plane.
source§fn arbitrary(_u: &mut Unstructured<'_>) -> Result<Self>
fn arbitrary(_u: &mut Unstructured<'_>) -> Result<Self>
Generate an arbitrary value of
Self
from the given unstructured data. Read moresource§fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
Generate an arbitrary value of
Self
from the entirety of the given
unstructured data. Read moresource§impl Clone for ControlPlane
impl Clone for ControlPlane
source§fn clone(&self) -> ControlPlane
fn clone(&self) -> ControlPlane
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ControlPlane
impl Debug for ControlPlane
source§impl Default for ControlPlane
impl Default for ControlPlane
source§fn default() -> ControlPlane
fn default() -> ControlPlane
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ControlPlane
impl RefUnwindSafe for ControlPlane
impl Send for ControlPlane
impl Sync for ControlPlane
impl Unpin for ControlPlane
impl UnwindSafe for ControlPlane
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