1#[must_use]
6pub fn new(object: &str) -> Show<'_> {
7 Show::new(object)
8}
9
10#[derive(Debug)]
14pub struct Show<'a> {
15 base: crate::RepoBase<'a>,
16 object: &'a str,
17}
18
19crate::impl_repo_base!(Show);
20
21impl<'a> Show<'a> {
22 #[must_use]
23 fn new(object: &'a str) -> Self {
24 Self {
25 base: crate::RepoBase::default(),
26 object,
27 }
28 }
29}
30
31impl crate::Build for Show<'_> {
32 fn build(self) -> Result<cmd_proc::Command, crate::EnvError> {
33 Ok(self.base.command()?.argument("show").argument(self.object))
34 }
35}
36
37#[cfg(feature = "test-utils")]
38impl Show<'_> {
39 pub fn test_eq(&self, other: &cmd_proc::Command) {
41 let command = crate::Build::build(Self {
42 base: self.base,
43 object: self.object,
44 })
45 .unwrap();
46 command.test_eq(other);
47 }
48}