pub struct Search;
Implementations§
Source§impl Search
impl Search
Sourcepub fn repos(&self) -> SearchRepositoriesBuilder
pub fn repos(&self) -> SearchRepositoriesBuilder
Searches for repositories based on the given search options. All fields in the [SearchRepositoriesOption] are optional. This method will return a list of repositories that match the search criteria.
§Example
let client = Client::new(
"https://gitea.example.com",
Auth::Token("your-token")
);
let repo = client
.search()
.repos()
.query("my-repo")
.send(&client)
.await
.unwrap();
This will search for repositories matching the keyword “my-repo”. The search will include the repository description and will return the first page of result.
Sourcepub fn users(&self) -> SearchUsersBuilder
pub fn users(&self) -> SearchUsersBuilder
Searches for users based on the given search options. This method will return a list of users that match the search criteria.
§Example
let client = Client::new(
"https://gitea.example.com",
Auth::Token("your-token")
);
let users = client
.search()
.users()
.query("my-user")
.send(&client)
.await
.unwrap();
Sourcepub fn issues(&self) -> SearchIssuesBuilder
pub fn issues(&self) -> SearchIssuesBuilder
Searches for issues based on the given search options. This method will return a list of issues that match the search criteria.
§Example
let client = Client::new(
"https://gitea.example.com",
Auth::Token("your-token")
);
let issues = client
.search()
.issues()
.query("my-issue")
.send(&client)
.await
.unwrap();
This will search for issues matching the keyword “my-issue”.
Auto Trait Implementations§
impl Freeze for Search
impl RefUnwindSafe for Search
impl Send for Search
impl Sync for Search
impl Unpin 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