pub struct RepoListCommand { /* private fields */ }Expand description
Command for listing repositories
Implementations§
Source§impl RepoListCommand
impl RepoListCommand
Sourcepub fn limit(self, limit: u32) -> Self
pub fn limit(self, limit: u32) -> Self
Limit the number of results
Examples found in repository?
examples/basic_usage.rs (line 11)
3fn main() -> Result<(), Box<dyn std::error::Error>> {
4 let client = GhClient::new();
5
6 // Check if gh CLI is installed
7 let version = client.check_installation()?;
8 println!("✓ GitHub CLI: {}", version.trim());
9
10 // List repositories
11 let repos = client.repo().list().limit(5).execute()?;
12 println!("{}", repos);
13
14 Ok(())
15}Sourcepub fn execute(&self) -> Result<String>
pub fn execute(&self) -> Result<String>
Execute and get raw output
Examples found in repository?
examples/basic_usage.rs (line 11)
3fn main() -> Result<(), Box<dyn std::error::Error>> {
4 let client = GhClient::new();
5
6 // Check if gh CLI is installed
7 let version = client.check_installation()?;
8 println!("✓ GitHub CLI: {}", version.trim());
9
10 // List repositories
11 let repos = client.repo().list().limit(5).execute()?;
12 println!("{}", repos);
13
14 Ok(())
15}Trait Implementations§
Source§impl GhCommand for RepoListCommand
impl GhCommand for RepoListCommand
Auto Trait Implementations§
impl Freeze for RepoListCommand
impl RefUnwindSafe for RepoListCommand
impl Send for RepoListCommand
impl Sync for RepoListCommand
impl Unpin for RepoListCommand
impl UnwindSafe for RepoListCommand
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