pub struct RandomChoice<T> {
pub items: Vec<T>,
}Expand description
随机选择器 - 从列表中随机选择
Fields§
§items: Vec<T>可选项列表
Implementations§
Source§impl<T: Clone> RandomChoice<T>
impl<T: Clone> RandomChoice<T>
Trait Implementations§
Source§impl<T: Clone> Clone for RandomChoice<T>
impl<T: Clone> Clone for RandomChoice<T>
Source§fn clone(&self) -> RandomChoice<T>
fn clone(&self) -> RandomChoice<T>
Returns a duplicate 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 moreAuto Trait Implementations§
impl<T> Freeze for RandomChoice<T>
impl<T> RefUnwindSafe for RandomChoice<T>where
T: RefUnwindSafe,
impl<T> Send for RandomChoice<T>where
T: Send,
impl<T> Sync for RandomChoice<T>where
T: Sync,
impl<T> Unpin for RandomChoice<T>where
T: Unpin,
impl<T> UnsafeUnpin for RandomChoice<T>
impl<T> UnwindSafe for RandomChoice<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