pub struct Notes { /* private fields */ }Expand description
All notes keyed by opaque ID.
Implementations§
Source§impl Notes
impl Notes
pub fn insert(&mut self, note: Note) -> Option<Note>
pub fn remove(&mut self, id: &NoteId) -> Option<Note>
pub fn get(&self, id: &NoteId) -> Option<&Note>
pub fn tip(&self) -> Option<NoteId>
pub fn create(&mut self, content: impl Into<String>) -> Note
pub fn iter(&self) -> impl Iterator<Item = (&NoteId, &Note)>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Trait Implementations§
impl Eq for Notes
impl StructuralPartialEq for Notes
Auto Trait Implementations§
impl Forget for Notes
impl Freeze for Notes
impl Move for Notes
impl RefUnwindSafe for Notes
impl Send for Notes
impl Sync for Notes
impl Unpin for Notes
impl UnsafeUnpin for Notes
impl UnwindSafe for Notes
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