# Struct `kurogane::SecondInstance`

```rust
pub struct SecondInstance { /* private fields */ }
```

A launch of the application while another instance is already running.

Chromium allows one instance per profile. The new launch passes its
arguments and working directory to the running instance and exits.

Passed to the closure given to [`App::on_second_instance`].

[`App::on_second_instance`]: https://kurogane-rs.org/docs/api/app/app.md#method.on_second_instance

## Methods

### `args`

```rust
pub fn args(&self) -> &[String]
```

Returns the launch arguments that are not switches.

The arguments contain the files or links named by the launch, in order.
The program name is not included.

### `switch`

```rust
pub fn switch(&self, name: &str) -> Option<&str>
```

Returns the value of the `--name` switch.

Returns an empty string when the switch has no value and `None` when the
switch was not present.

### `working_dir`

```rust
pub fn working_dir(&self) -> Option<&Path>
```

The directory the launch was started in, which the relative paths
among its arguments are relative to.

## Trait implementations

- `impl Clone for SecondInstance`
- `impl Debug for SecondInstance`

Source: https://github.com/0x48piraj/kurogane/blob/584c586118ee53cc04604007ee038557bd859092/kurogane/src/app.rs#L81
