Struct Just
#[must_use = "strategies do nothing unless used"]
pub struct Just<T: Clone + Debug>(pub T);
A Strategy which always produces a single value and never
simplifies.
Fields
0: TThe value produced by this strategy.
Trait Implementations
impl<T: Clone + Clone + Debug> Clone for Just<T>
fn clone(&self) -> Self
impl<T: Clone + Debug> Strategy for Just<T>
type Tree = Just<T>;type Value = T;fn new_tree(&self, &mut TestRunner) -> NewTree<Self>
impl<T: Clone + Debug> ValueTree for Just<T>
type Value = T;fn simplify(&mut self) -> boolfn complicate(&mut self) -> boolfn current(&self) -> T
impl<T: Copy + Clone + Debug> Copy for Just<T>
impl<T: Debug + Clone + Debug> Debug for Just<T>
fn fmt(&self, f: &mut Formatter<'_>) -> Result
Auto Trait Implementations
impl<T> Freeze for Just<T>
where
T: Freeze,
impl<T> RefUnwindSafe for Just<T>
where
T: RefUnwindSafe,
impl<T> Send for Just<T>
where
T: Send,
impl<T> Sync for Just<T>
where
T: Sync,
impl<T> Unpin for Just<T>
where
T: Unpin,
impl<T> UnsafeUnpin for Just<T>
where
T: UnsafeUnpin,
impl<T> UnwindSafe for Just<T>
where
T: UnwindSafe,
Blanket Implementations
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for Just<T>
where
ST: ?Sized,
DT: ?Sized,
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for Just<T>
where
ST: ?Sized,
DT: ?Sized,
impl<T> Any for Just<T>
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for Just<T>
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for Just<T>
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for Just<T>
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for Just<T>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> Read<Exclusive, BecauseExclusive> for Just<T>
where
T: ?Sized,
impl<T> ToOwned for Just<T>
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T, U> Into<U> for Just<T>
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for Just<T>
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for Just<T>
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
impl<V, T> VZip<V> for Just<T>
where
V: MultiLane<T>,
fn vzip(self) -> V