# Struct permissions::Lockdown

> The community's lockdown row.

`zaun_community_protocol::permissions::Lockdown` · Struct

```rust
pub struct Lockdown { … }
```

The community's lockdown row.

## Fields

### `restrictions: LockdownRestrictions`

The named restrictions.

### `expires_at_ms: u64`

Expiry in ms since the epoch; the lockdown is active while `now < expires_at_ms`.

### `newcomer_window_ms: u64`

`newcomer_window_s` in ms: `restrict_newcomers` covers members admitted this recently.

## Methods

### `is_active`

```rust
pub const fn is_active(&self, now_ms: u64) -> bool
```

Whether the lockdown is in force at `now_ms`.

### `limits_expensive`

```rust
pub const fn limits_expensive(&self, is_owner: bool, now_ms: u64) -> bool
```

Whether `restrict_expensive` binds a member at `now_ms`: the lockdown is in force,
names it, and the member is not the owner (the only exemption, ADR-0016).

### `max_mask`

```rust
pub fn max_mask(restrictions: LockdownRestrictions, newcomers: Permissions) -> Permissions
```

The whole permission mask the lockdown can remove from anyone, given the policy's
newcomer mask. H3 checks a lockdown enable against this (permissions the protocol).

### `mask_for`

```rust
pub fn mask_for(&self, admitted_at_ms: u64, newcomers: Permissions, now_ms: u64) -> Permissions
```

The mask for one member admitted at `admitted_at_ms`; empty once expired.

## Trait implementations

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

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