pub struct GameShare(_);
Expand description
Display the share card for this game
use cl_wordle::game::Game;
let mut game = Game::from_day(0, cl_wordle::words::NYTIMES);
game.guess("crane").unwrap();
game.guess("carts").unwrap();
game.guess("chair").unwrap();
game.guess("cigar").unwrap();
let share = game.share();
let score_card = format!("{}", share);
assert_eq!(score_card, r"Wordle 0 4/6
🟩🟨🟨⬛⬛
🟩🟨🟨⬛⬛
🟩⬛🟨🟨🟩
🟩🟩🟩🟩🟩");
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for GameShare
impl Send for GameShare
impl Sync for GameShare
impl Unpin for GameShare
impl UnwindSafe for GameShare
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more