# session.Session.refresh

- **Module:** session.Session
- **Package:** libtmux
- **Language:** Rust
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-rs/blob/8a648c0894dfffc9303583f753b6c8ae01f2fe76/crates/libtmux/src/session.rs#L486
- **Page:** https://libtmux.org/reference/rs/session-session-refresh/

```
session.Session.refresh(mut) -> Result<&mut Self, Error>
```

Replace this handle's snapshot with the session's current state.

Only the receiver changes. Clones keep the snapshot they were taken
with, because each handle owns its own.

# Errors

Returns [`Error::ObjectGone`] when the session no longer exists, or a
listing error when tmux could not be read.
