pub struct Note {
pub title: String,
pub author: String,
pub time_sent: String,
pub contents: String,
pub comments: Vec<Comment>,
pub index: String,
}
Expand description
A struct that represents a Note from a Notebook
Fields§
§title: String
§time_sent: String
§contents: String
§comments: Vec<Comment>
§index: String
Implementations§
Source§impl Note
impl Note
Sourcepub fn new(
title: &str,
author: &str,
time_sent: &str,
contents: &str,
comments: &Vec<Comment>,
index: &str,
) -> Note
pub fn new( title: &str, author: &str, time_sent: &str, contents: &str, comments: &Vec<Comment>, index: &str, ) -> Note
Create a new Note
Sourcepub fn from_node(node: &Node, revision: Option<String>) -> Result<Note>
pub fn from_node(node: &Node, revision: Option<String>) -> Result<Note>
Convert from a Node
to a Note
Sourcepub fn content_as_markdown(&self) -> Vec<String>
pub fn content_as_markdown(&self) -> Vec<String>
Convert the contents of the latest revision of the Note to
a series of markdown String
s
Trait Implementations§
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