# Struct permissions::Requirement

> What a command requires (permissions the protocol, the protocol).

`zaun_community_protocol::permissions::Requirement` · Struct

```rust
pub struct Requirement { … }
```

What a command requires (permissions the protocol, the protocol).

## Fields

### `access: Access`

Who may send it.

### `scope: Scope`

Where the bits are evaluated.

### `all: Permissions`

Bits that must all be effective.

### `any: Permissions`

When non-empty, at least one of these must be effective as well.

### `others: Option<Permissions>`

When acting on another member's object (message, reaction, nickname, invitation,
report), these bits replace `all`.

### `conditional: Permissions`

Bits needed only for some bodies: the engine passes the ones that apply (attachments,
links, a new emoji, a pre-approved invitation, a channel stream, a full record).

### `not_timed_out: bool`

Refused with `TIMED_OUT` while timed out, even when the bits survive the timeout.

### `not_waiting: bool`

Refused with `FORBIDDEN{reason:"probation"}` during the waiting period.

### `reserved: bool`

Reserved (P1/P2): a v1 host answers `UNSUPPORTED_FEATURE` before any check.

## Methods

### `access`

```rust
pub const fn access(access: Access) -> Self
```

A row with no bits.

### `bits`

```rust
pub const fn bits(scope: Scope, all: Permissions) -> Self
```

A member command needing `all` in `scope`.

### `check`

```rust
pub fn check(&self, resolved: &Resolved, other: bool, conditional: Permissions) -> Result<(), Denial>
```

Checks the resolved permissions in the requirement's scope. `other` is true when the
actor acts on another member's object; `conditional` holds the conditional bits the
body needs (masked by `Requirement::conditional`).

## Trait implementations

`Clone`, `Copy`, `Debug`, `Eq`, `Hash`, `PartialEq`, `StructuralPartialEq`

[Full rustdoc page](/docs/api/rust/zaun-community-protocol/zaun_community_protocol/permissions/requirement/struct.Requirement.html)
