# command.CommandSummary

- **Module:** command
- **Package:** libtmux
- **Language:** Rust
- **Kind:** struct
- **Source:** https://github.com/libtmux/libtmux-rs/blob/f0e37052c232636b61d095817046e6bfc8f2ca40/crates/libtmux/src/command.rs#L556
- **Page:** https://libtmux.org/en/rs/latest/reference/command-commandsummary/

A rendering of a dispatched command that is safe to log.

Every public token is ASCII escaped. Sensitive arguments are represented by
a fixed marker that discloses neither their bytes nor their length.

## Example

```rust
use libtmux::Command;

let guard = libtmux::test::TestServer::new().await?;
let result = guard
    .server()
    .cmd(
        Command::new("set-environment")
            .arg("-g")
            .arg("TOKEN")
            .sensitive_arg("hunter2"),
    )
    .await?;

// The subcommand is not an argument, so this counts `-g`, `TOKEN`, and
// the secret.
let summary = result.command();
assert_eq!(summary.argument_count(), 3);
assert_eq!(summary.public_argument_count(), 2);

// The secret is neither shown nor measurable from what is shown.
let rendered = summary.to_string();
assert!(!rendered.contains("hunter2"), "{rendered}");
assert!(!format!("{summary:?}").contains("hunter2"));

guard.shutdown().await?;
```

## Members

- `argument_count` (method): Return the number of logical arguments after the subcommand.
- `public_argument_count` (method): Return the number of public logical arguments.
- `sensitive_argument_count` (method): Return the number of sensitive logical arguments.
