Skip to main content

BearDb

Struct BearDb 

Source
pub struct BearDb { /* private fields */ }

Implementations§

Source§

impl BearDb

Source

pub fn open(path: PathBuf) -> Result<Self>

Source

pub fn find_note( &self, id: Option<&str>, title: Option<&str>, exclude_trashed: bool, ) -> Result<NoteRecord>

Source

pub fn tags(&self) -> Result<Vec<String>>

Source

pub fn notes_for_tags( &self, tags: &[String], include_trashed: bool, ) -> Result<Vec<NoteListItem>>

Source

pub fn search( &self, term: Option<&str>, tag: Option<&str>, include_trashed: bool, since: Option<i64>, before: Option<i64>, ) -> Result<Vec<SearchResult>>

Source

pub fn export_notes(&self, tag: Option<&str>) -> Result<Vec<ExportNote>>

Source

pub fn note_title(&self, note_id: &str) -> Result<Option<String>>

Returns the title of the note with the given identifier, or None if the note does not exist.

Source

pub fn duplicate_titles(&self) -> Result<Vec<DuplicateGroup>>

Source

pub fn stats_summary(&self) -> Result<StatsSummary>

Source

pub fn health_summary(&self) -> Result<HealthSummary>

Source

pub fn untagged(&self, search: Option<&str>) -> Result<Vec<NoteListItem>>

Source

pub fn todo(&self, search: Option<&str>) -> Result<Vec<NoteListItem>>

Source

pub fn today(&self, search: Option<&str>) -> Result<Vec<NoteListItem>>

Source

pub fn locked(&self, search: Option<&str>) -> Result<Vec<NoteListItem>>

Source

pub fn note_files(&self, note_id: &str) -> Result<Vec<NoteFile>>

Returns all file attachments for the note with the given identifier. The file_uuid field can be used to locate the file on disk: Application Data/Local Files/Note Images/{file_uuid}/{filename}

Auto Trait Implementations§

§

impl !Freeze for BearDb

§

impl !RefUnwindSafe for BearDb

§

impl Send for BearDb

§

impl !Sync for BearDb

§

impl Unpin for BearDb

§

impl UnsafeUnpin for BearDb

§

impl !UnwindSafe for BearDb

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.