pub struct Note {
pub id: NoteId,
pub content: String,
pub tags: BTreeSet<String>,
pub fields: BTreeMap<String, NoteField>,
pub links: BTreeSet<NoteId>,
}Expand description
Fields§
§id: NoteId§content: String§fields: BTreeMap<String, NoteField>§links: BTreeSet<NoteId>Implementations§
Source§impl Note
impl Note
pub fn new(previous_tip: Option<&NoteId>, content: impl Into<String>) -> Self
pub fn with_metadata( previous_tip: Option<&NoteId>, content: impl Into<String>, tags: BTreeSet<String>, fields: BTreeMap<String, NoteField>, links: BTreeSet<NoteId>, ) -> Self
pub fn set_content(&mut self, content: impl Into<String>)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Note
impl<'de> Deserialize<'de> for Note
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl DslArg for Note
impl DslArg for Note
Source§const KIND: ArgKind = ArgKind::Struct
const KIND: ArgKind = ArgKind::Struct
How the generic machinery handles this argument’s shape.
Source§const SLUG: &'static str = "note"
const SLUG: &'static str = "note"
The stable wire slug a schema/UI switches on, finer than the JSON type.
impl Eq for Note
impl StructuralPartialEq for Note
Auto Trait Implementations§
impl Forget for Note
impl Freeze for Note
impl Move for Note
impl RefUnwindSafe for Note
impl Send for Note
impl Sync for Note
impl Unpin for Note
impl UnsafeUnpin 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