[−][src]Struct eight_ball::EightBall
The crate's entry point, holdding the current possible answers
Fields
answers: Vec<Answer>
Methods
impl EightBall
[src]
pub fn new() -> Self
[src]
Constructs a new EightBall, the possibe answers are matching the original answers
pub fn with_answers(answers: Vec<Answer>) -> Self
[src]
Sets the possible answers the crate can return, this allows for custom answers
pub fn ask(&self, _question: &str) -> Option<Answer>
[src]
Asks the magic ball a question returns a possible answer randomly it picks a random answer from the possible ones
Auto Trait Implementations
impl Unpin for EightBall
impl Sync for EightBall
impl Send for EightBall
impl RefUnwindSafe for EightBall
impl UnwindSafe for EightBall
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,