pub struct NotesQuery { /* private fields */ }Expand description
Query options for filtering notes.
Use this builder to configure how notes are retrieved from Bear. By default, returns the 10 most recently modified notes, excluding trashed and archived notes.
§Examples
let db = BearDb::new()?;
// Default: 10 most recent notes, exclude trashed/archived
let notes = db.notes(NotesQuery::default())?;
// Get 20 notes
let notes = db.notes(NotesQuery::new().limit(20))?;
// Get all notes including trashed and archived
let notes = db.notes(NotesQuery::new().no_limit().include_all())?;
// Get all non-trashed notes (including archived)
let notes = db.notes(NotesQuery::new().no_limit().include_archived())?;Implementations§
Source§impl NotesQuery
impl NotesQuery
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new NotesQuery with default settings (limit: 10, exclude trashed and archived)
Sourcepub fn include_trashed(self) -> Self
pub fn include_trashed(self) -> Self
Include trashed notes in results
Sourcepub fn include_archived(self) -> Self
pub fn include_archived(self) -> Self
Include archived notes in results
Sourcepub fn include_all(self) -> Self
pub fn include_all(self) -> Self
Include both trashed and archived notes in results
Trait Implementations§
Source§impl Clone for NotesQuery
impl Clone for NotesQuery
Source§fn clone(&self) -> NotesQuery
fn clone(&self) -> NotesQuery
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NotesQuery
impl Debug for NotesQuery
Auto Trait Implementations§
impl Freeze for NotesQuery
impl RefUnwindSafe for NotesQuery
impl Send for NotesQuery
impl Sync for NotesQuery
impl Unpin for NotesQuery
impl UnsafeUnpin for NotesQuery
impl UnwindSafe for NotesQuery
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more