pub struct Note {
pub deck_name: String,
pub model_name: String,
pub fields: HashMap<String, String>,
pub tags: Vec<String>,
pub audio: Option<Vec<MediaAttachment>>,
pub video: Option<Vec<MediaAttachment>>,
pub picture: Option<Vec<MediaAttachment>>,
pub options: Option<NoteOptions>,
}Expand description
A new note to be added to Anki.
Use NoteBuilder for a more ergonomic way to construct notes.
§Field Values
Field values are HTML. If you need literal < or >, use < and >.
Field names are case-sensitive and must match the model’s field names exactly.
Fields§
§deck_name: StringThe deck to add the note to.
model_name: StringThe note type (model) name.
fields: HashMap<String, String>Field values, keyed by field name.
Tags for the note.
audio: Option<Vec<MediaAttachment>>Audio attachments.
video: Option<Vec<MediaAttachment>>Video attachments.
picture: Option<Vec<MediaAttachment>>Picture attachments.
options: Option<NoteOptions>Options for duplicate handling, etc.
Trait Implementations§
Source§impl Serialize for Note
impl Serialize for Note
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for Note
impl RefUnwindSafe for Note
impl Send for Note
impl Sync for Note
impl Unpin for Note
impl UnwindSafe for Note
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