# server.discovery.SessionTreeFields

- **Module:** server.discovery
- **Package:** libtmux
- **Language:** Rust
- **Kind:** struct
- **Source:** https://github.com/libtmux/libtmux-rs/blob/f0e37052c232636b61d095817046e6bfc8f2ca40/crates/libtmux/src/server/discovery.rs#L397
- **Page:** https://libtmux.org/en/rs/latest/reference/server-discovery-sessiontreefields/

Typed filter handles for [`SessionTree`].

The session's own fields sit under [`session`], and [`windows`] is the
relation that makes a question about a session's contents expressible.

## Example

```rust
use libtmux::query::Filterable as _;
use libtmux::{SessionTree, WindowTree};

let sessions = SessionTree::filter_fields();
let windows = WindowTree::filter_fields();

// The session's own fields sit beside the relation rather than behind it, so
// a question about the session and a question about what it contains compose.
let building = sessions
    .session
    .session_name
    .starts_with("build")
    .and(sessions.windows.any(windows.window.window_name.eq("editor")));
```

## Members

- `session` (attribute): The session's own fields, the same set [`Session`] filters on.
- `windows` (attribute): The windows under this session.
