pub struct ListOptions {
pub recursive: bool,
pub include_hidden: bool,
pub files_only: bool,
pub directories_only: bool,
pub pattern: Option<String>,
pub limit: usize,
pub sort_by: SortBy,
}Expand description
Options for listing files and directories.
Fields§
§recursive: bool§files_only: bool§directories_only: bool§pattern: Option<String>§limit: usize§sort_by: SortByImplementations§
Source§impl ListOptions
impl ListOptions
Sourcepub fn with_recursive(self, recursive: bool) -> ListOptions
pub fn with_recursive(self, recursive: bool) -> ListOptions
Sourcepub fn with_files_only(self, files_only: bool) -> ListOptions
pub fn with_files_only(self, files_only: bool) -> ListOptions
Sourcepub fn with_directories_only(self, directories_only: bool) -> ListOptions
pub fn with_directories_only(self, directories_only: bool) -> ListOptions
Returns options with directories-only filtering enabled or disabled.
§Panics
This method does not panic.
Sourcepub fn with_pattern(self, pattern: Option<String>) -> ListOptions
pub fn with_pattern(self, pattern: Option<String>) -> ListOptions
Sourcepub fn with_limit(self, limit: usize) -> ListOptions
pub fn with_limit(self, limit: usize) -> ListOptions
Sourcepub fn with_sort_by(self, sort_by: SortBy) -> ListOptions
pub fn with_sort_by(self, sort_by: SortBy) -> ListOptions
Trait Implementations§
Source§impl Clone for ListOptions
impl Clone for ListOptions
Source§fn clone(&self) -> ListOptions
fn clone(&self) -> ListOptions
Returns a duplicate of the value. Read more
1.0.0 · 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 ListOptions
impl Debug for ListOptions
Source§impl Default for ListOptions
impl Default for ListOptions
Source§fn default() -> ListOptions
fn default() -> ListOptions
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ListOptions
impl<'de> Deserialize<'de> for ListOptions
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ListOptions, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ListOptions, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for ListOptions
impl Serialize for ListOptions
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for ListOptions
impl RefUnwindSafe for ListOptions
impl Send for ListOptions
impl Sync for ListOptions
impl Unpin for ListOptions
impl UnwindSafe for ListOptions
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