pub struct NoteDb {
pub notes: Notes,
pub global: NoteGlobalIndex,
/* private fields */
}Expand description
Note storage and indexes sharing one ID namespace.
Fields§
§notes: Notes§global: NoteGlobalIndexImplementations§
Source§impl NoteDb
impl NoteDb
pub fn tip(&self) -> Option<NoteId>
pub fn create(&mut self, content: impl Into<String>) -> Note
pub fn get(&self, id: &NoteId) -> Option<&Note>
pub fn get_by_path(&self, path: &NotePath) -> Option<&Note>
pub fn address_index(&self, space: AddressSpace) -> Option<&NoteAddressIndex>
pub fn set_address( &mut self, space: AddressSpace, range: AddressRange, note: Note, )
pub fn set_global(&mut self, path: NotePath, note: Note)
pub fn clear(&mut self, id: &NoteId) -> Option<Note>
pub fn clear_address( &mut self, id: &NoteId, ) -> Option<(AddressSpace, AddressRange, Note)>
pub fn note_range( &self, space: AddressSpace, id: &NoteId, ) -> Option<AddressRange>
pub fn get_notes_overlapping( &self, space: AddressSpace, range: impl RangeBounds<AddressValue>, ) -> Vec<&Note>
pub fn get_notes_inside( &self, space: AddressSpace, range: impl RangeBounds<AddressValue>, ) -> Vec<&Note>
Trait Implementations§
impl Eq for NoteDb
impl StructuralPartialEq for NoteDb
Auto Trait Implementations§
impl Freeze for NoteDb
impl RefUnwindSafe for NoteDb
impl Send for NoteDb
impl Sync for NoteDb
impl Unpin for NoteDb
impl UnsafeUnpin for NoteDb
impl UnwindSafe for NoteDb
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