pub struct NoteBuilder { /* private fields */ }
Expand description
Builder for creating Anki notes
Implementations§
Source§impl NoteBuilder
impl NoteBuilder
Sourcepub fn with_field(self, field_ref: FieldRef<'_>, content: &str) -> Self
pub fn with_field(self, field_ref: FieldRef<'_>, content: &str) -> Self
Add a field value with HTML escaping
Sourcepub fn with_field_raw(self, field_ref: FieldRef<'_>, content: &str) -> Self
pub fn with_field_raw(self, field_ref: FieldRef<'_>, content: &str) -> Self
Add a field value without HTML escaping
Sourcepub fn with_audio(
self,
field_ref: FieldRef<'_>,
source: MediaSource,
filename: &str,
) -> Self
pub fn with_audio( self, field_ref: FieldRef<'_>, source: MediaSource, filename: &str, ) -> Self
Add audio to a specific field
Sourcepub fn with_image(
self,
field_ref: FieldRef<'_>,
source: MediaSource,
filename: &str,
) -> Self
pub fn with_image( self, field_ref: FieldRef<'_>, source: MediaSource, filename: &str, ) -> Self
Add image to a specific field
Sourcepub fn with_video(
self,
field_ref: FieldRef<'_>,
source: MediaSource,
filename: &str,
) -> Self
pub fn with_video( self, field_ref: FieldRef<'_>, source: MediaSource, filename: &str, ) -> Self
Add video to a specific field
Sourcepub fn with_media(self, field_ref: FieldRef<'_>, media: Media) -> Self
pub fn with_media(self, field_ref: FieldRef<'_>, media: Media) -> Self
Add generic media to a specific field
Auto Trait Implementations§
impl Freeze for NoteBuilder
impl RefUnwindSafe for NoteBuilder
impl Send for NoteBuilder
impl Sync for NoteBuilder
impl Unpin for NoteBuilder
impl UnwindSafe for NoteBuilder
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