[][src]Struct vocage::VocaData

pub struct VocaData {
    pub session: VocaSession,
    pub cards: Vec<VocaCard>,
    pub comments: Vec<(usize, String)>,
}

Fields

session: VocaSessioncards: Vec<VocaCard>comments: Vec<(usize, String)>

Implementations

impl VocaData[src]

pub fn from_file(filename: &str, reset: bool) -> Result<Self, Error>[src]

pub fn random_index(
    &self,
    rng: &mut impl Rng,
    decks: Option<&Vec<u8>>,
    due_only: bool,
    seen_only: bool
) -> Option<(usize, usize)>
[src]

pub fn next_index(
    &self,
    index: usize,
    decks: Option<&Vec<u8>>,
    due_only: bool,
    seen_only: bool,
    inclusive: bool
) -> Option<(usize, usize)>
[src]

pub fn pick_card<'a>(
    &'a self,
    rng: &mut impl Rng,
    decks: Option<&Vec<u8>>,
    due_only: bool,
    seen_only: bool
) -> Option<&'a VocaCard>
[src]

pub fn pick_card_mut<'a>(
    &'a mut self,
    rng: &mut impl Rng,
    decks: Option<&Vec<u8>>,
    due_only: bool,
    seen_only: bool
) -> Option<&'a mut VocaCard>
[src]

pub fn pick_next_card<'a>(
    &'a self,
    index: usize,
    decks: Option<&Vec<u8>>,
    due_only: bool,
    seen_only: bool,
    inclusive: bool
) -> Option<&'a VocaCard>
[src]

pub fn pick_next_card_mut<'a>(
    &'a mut self,
    index: usize,
    decks: Option<&Vec<u8>>,
    due_only: bool,
    seen_only: bool,
    inclusive: bool
) -> Option<&'a mut VocaCard>
[src]

pub fn write(&self, reset: bool) -> Result<(), Error>[src]

Auto Trait Implementations

Blanket Implementations

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

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,