pub enum NotionSearch {
Query(String),
Sort {
timestamp: SortTimestamp,
direction: SortDirection,
},
Filter {
property: FilterProperty,
value: FilterValue,
},
}
Variants§
Query(String)
When supplied, limits which pages are returned by comparing the query to the page title.
Sort
When supplied, sorts the results based on the provided criteria.
Limitation: Currently only a single sort is allowed and is limited to last_edited_time
Filter
When supplied, filters the results based on the provided criteria.
Limitation: Currently the only filter allowed is object
which will filter by type of object (either page or database)
Fields
§
property: FilterProperty
The name of the property to filter by.
Currently the only property you can filter by is the object
type.
§
value: FilterValue
The value of the property to filter the results by.
Possible values for object type include page
or database
.
Implementations§
Source§impl NotionSearch
impl NotionSearch
pub fn filter_by_databases() -> Self
Trait Implementations§
Source§impl Debug for NotionSearch
impl Debug for NotionSearch
Source§impl From<NotionSearch> for SearchRequest
impl From<NotionSearch> for SearchRequest
Source§fn from(search: NotionSearch) -> Self
fn from(search: NotionSearch) -> Self
Converts to this type from the input type.
Source§impl PartialEq for NotionSearch
impl PartialEq for NotionSearch
impl Eq for NotionSearch
impl StructuralPartialEq for NotionSearch
Auto Trait Implementations§
impl Freeze for NotionSearch
impl RefUnwindSafe for NotionSearch
impl Send for NotionSearch
impl Sync for NotionSearch
impl Unpin for NotionSearch
impl UnwindSafe for NotionSearch
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
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.