pub struct Search { /* private fields */ }Implementations§
Source§impl Search
The implementation of the Search structures methods.
impl Search
The implementation of the Search structures methods.
The default search types are: Target, User, and Service.
On linux-keyutils these all default to searching the ‘session’
keyring. If searching in a different keyring, utilize the
platform specific search_by_keyring function
Sourcepub fn new() -> Result<Search>
pub fn new() -> Result<Search>
Create a new instance of the Credential Search.
The default credential search is used.
Sourcepub fn by_target(&self, query: &str) -> CredentialSearchResult
pub fn by_target(&self, query: &str) -> CredentialSearchResult
Specifies searching by target and the query string
Can return: SearchError NoResults Unexpected
§Example
let search = keyring_search::Search::new().unwrap();
let results = search.by_target("Foo.app");Sourcepub fn by_user(&self, query: &str) -> CredentialSearchResult
pub fn by_user(&self, query: &str) -> CredentialSearchResult
Specifies searching by user and the query string
Can return: SearchError NoResults Unexpected
§Example
let search = keyring_search::Search::new().unwrap();
let results = search.by_user("Mr. Foo Bar");Sourcepub fn by_service(&self, query: &str) -> CredentialSearchResult
pub fn by_service(&self, query: &str) -> CredentialSearchResult
Specifies searching by service and the query string
Can return: SearchError NoResults Unexpected
§Example
let search = keyring_search::Search::new().unwrap();
let results = search.by_service("Bar inc.");Auto Trait Implementations§
impl Freeze for Search
impl !RefUnwindSafe for Search
impl Send for Search
impl Sync for Search
impl Unpin for Search
impl UnsafeUnpin for Search
impl !UnwindSafe for Search
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