#[non_exhaustive]pub struct SearchResult {
pub entry: Option<Entry>,
/* private fields */
}Expand description
Client-facing representation of a search result entry.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.entry: Option<Entry>The entry’s contents.
Implementations§
Source§impl SearchResult
impl SearchResult
pub fn new() -> Self
Sourcepub fn set_entry<T: Into<Option<Entry>>>(self, v: T) -> Self
pub fn set_entry<T: Into<Option<Entry>>>(self, v: T) -> Self
Sets the value of entry.
Note that all the setters affecting entry are mutually
exclusive.
Sourcepub fn file(&self) -> Option<&Box<FileSearchResult>>
pub fn file(&self) -> Option<&Box<FileSearchResult>>
The value of entry
if it holds a File, None if the field is not set or
holds a different branch.
Sourcepub fn set_file<T: Into<Box<FileSearchResult>>>(self, v: T) -> Self
pub fn set_file<T: Into<Box<FileSearchResult>>>(self, v: T) -> Self
Sets the value of entry
to hold a File.
Note that all the setters affecting entry are
mutually exclusive.
Sourcepub fn directory(&self) -> Option<&Box<DirectorySearchResult>>
pub fn directory(&self) -> Option<&Box<DirectorySearchResult>>
The value of entry
if it holds a Directory, None if the field is not set or
holds a different branch.
Sourcepub fn set_directory<T: Into<Box<DirectorySearchResult>>>(self, v: T) -> Self
pub fn set_directory<T: Into<Box<DirectorySearchResult>>>(self, v: T) -> Self
Sets the value of entry
to hold a Directory.
Note that all the setters affecting entry are
mutually exclusive.
Trait Implementations§
Source§impl Clone for SearchResult
impl Clone for SearchResult
Source§fn clone(&self) -> SearchResult
fn clone(&self) -> SearchResult
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 SearchResult
impl Debug for SearchResult
Source§impl Default for SearchResult
impl Default for SearchResult
Source§fn default() -> SearchResult
fn default() -> SearchResult
Returns the “default value” for a type. Read more
Source§impl Message for SearchResult
impl Message for SearchResult
Source§impl PartialEq for SearchResult
impl PartialEq for SearchResult
impl StructuralPartialEq for SearchResult
Auto Trait Implementations§
impl Freeze for SearchResult
impl RefUnwindSafe for SearchResult
impl Send for SearchResult
impl Sync for SearchResult
impl Unpin for SearchResult
impl UnwindSafe for SearchResult
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