Struct distant_core::data::SearchQueryOptions
source · [−]pub struct SearchQueryOptions {
pub allowed_file_types: HashSet<FileType>,
pub include: Option<SearchQueryCondition>,
pub exclude: Option<SearchQueryCondition>,
pub follow_symbolic_links: bool,
pub limit: Option<u64>,
pub min_depth: Option<u64>,
pub max_depth: Option<u64>,
pub pagination: Option<u64>,
}
Expand description
Options associated with a search query
Fields
allowed_file_types: HashSet<FileType>
Restrict search to only these file types (otherwise all are allowed)
include: Option<SearchQueryCondition>
Regex to use to filter paths being searched to only those that match the include condition
exclude: Option<SearchQueryCondition>
Regex to use to filter paths being searched to only those that do not match the exclude condition
follow_symbolic_links: bool
Search should follow symbolic links
limit: Option<u64>
Maximum results to return before stopping the query
min_depth: Option<u64>
Minimum depth (directories) to search
The smallest depth is 0 and always corresponds to the path given to the new function on this type. Its direct descendents have depth 1, and their descendents have depth 2, and so on.
max_depth: Option<u64>
Maximum depth (directories) to search
The smallest depth is 0 and always corresponds to the path given to the new function on this type. Its direct descendents have depth 1, and their descendents have depth 2, and so on.
Note that this will not simply filter the entries of the iterator, but it will actually avoid descending into directories when the depth is exceeded.
pagination: Option<u64>
Amount of results to batch before sending back excluding final submission that will always include the remaining results even if less than pagination request
Trait Implementations
sourceimpl Clone for SearchQueryOptions
impl Clone for SearchQueryOptions
sourcefn clone(&self) -> SearchQueryOptions
fn clone(&self) -> SearchQueryOptions
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for SearchQueryOptions
impl Debug for SearchQueryOptions
sourceimpl Default for SearchQueryOptions
impl Default for SearchQueryOptions
sourcefn default() -> SearchQueryOptions
fn default() -> SearchQueryOptions
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for SearchQueryOptions
impl<'de> Deserialize<'de> for SearchQueryOptions
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl PartialEq<SearchQueryOptions> for SearchQueryOptions
impl PartialEq<SearchQueryOptions> for SearchQueryOptions
sourcefn eq(&self, other: &SearchQueryOptions) -> bool
fn eq(&self, other: &SearchQueryOptions) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourceimpl Serialize for SearchQueryOptions
impl Serialize for SearchQueryOptions
impl Eq for SearchQueryOptions
impl StructuralEq for SearchQueryOptions
impl StructuralPartialEq for SearchQueryOptions
Auto Trait Implementations
impl RefUnwindSafe for SearchQueryOptions
impl Send for SearchQueryOptions
impl Sync for SearchQueryOptions
impl Unpin for SearchQueryOptions
impl UnwindSafe for SearchQueryOptions
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more