pub struct Card { /* private fields */ }
Expand description
Represents a complete Anki card with all its data
Implementations§
Source§impl Card
impl Card
Sourcepub fn fields(&self) -> impl Iterator<Item = (&Field, &String)>
pub fn fields(&self) -> impl Iterator<Item = (&Field, &String)>
Gets the field values of this card
Sourcepub fn field_value(&self, field_name: &str) -> Option<&String>
pub fn field_value(&self, field_name: &str) -> Option<&String>
Gets a specific field value
Gets all tags on this card
Sourcepub fn media(
&self,
) -> impl Iterator<Item = &(MediaType, MediaSource, String, Field)>
pub fn media( &self, ) -> impl Iterator<Item = &(MediaType, MediaSource, String, Field)>
Gets media attached to this card
Sourcepub fn front_value(&self) -> Option<&String>
pub fn front_value(&self) -> Option<&String>
Gets the value for the front (question) field
Sourcepub fn back_value(&self) -> Option<&String>
pub fn back_value(&self) -> Option<&String>
Gets the value for the back (answer) field
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Card
impl RefUnwindSafe for Card
impl Send for Card
impl Sync for Card
impl Unpin for Card
impl UnwindSafe for Card
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