[][src]Struct vocab::Translation

pub struct Translation {
    pub local: String,
    pub foreign: String,
    pub guesses_local_total: i32,
    pub guesses_local_correct: i32,
    pub guesses_foreign_total: i32,
    pub guesses_foreign_correct: i32,


local: Stringforeign: Stringguesses_local_total: i32guesses_local_correct: i32guesses_foreign_total: i32guesses_foreign_correct: i32


impl Translation[src]

pub fn new(local: &str, foreign: &str) -> Translation[src]

pub fn get_total_percent(&self) -> f64[src]

pub fn guess_local(&mut self, guess: &str) -> bool[src]

pub fn guess_foreign(&mut self, guess: &str) -> bool[src]

pub fn reconcile(
    other: Translation
) -> Result<Translation, VocabStoreError>

Trait Implementations

impl Debug for Translation[src]

impl Default for Translation[src]

impl PartialEq<Translation> for Translation[src]

impl<__DB: Backend, __ST> Queryable<__ST, __DB> for Translation where
    (String, String, i32, i32, i32, i32): Queryable<__ST, __DB>, 

type Row = <(String, String, i32, i32, i32, i32) as Queryable<__ST, __DB>>::Row

The Rust type you'd like to map from. Read more

impl StructuralPartialEq for Translation[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T> IntoSql for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.