# CapRights0
<span class="source-link">[[Source]](src/capsicum/cap_rights.md#L5)</span>

Version 0 of the capsicum cap_rights_t structure.


```pony
class ref CapRights0
```

## Constructors

### create
<span class="source-link">[[Source]](src/capsicum/cap_rights.md#L12)</span>


Initialises with no rights.


```pony
new ref create()
: CapRights0 ref^
```

#### Returns

* [CapRights0](capsicum-CapRights0) ref^

---

### from
<span class="source-link">[[Source]](src/capsicum/cap_rights.md#L18)</span>


Initialises with the rights from a FileCaps.


```pony
new ref from(
  caps: Flags[(FileCreate val | FileChmod val | FileChown val | FileLink val | FileLookup val | FileMkdir val | FileRead val | FileRemove val | FileRename val | FileSeek val | FileStat val | FileSync val | FileTime val | FileTruncate val | FileWrite val | FileExec val), U32 val] box)
: CapRights0 ref^
```
#### Parameters

*   caps: [Flags](collections-Flags)\[([FileCreate](files-FileCreate) val | [FileChmod](files-FileChmod) val | [FileChown](files-FileChown) val | [FileLink](files-FileLink) val | [FileLookup](files-FileLookup) val | [FileMkdir](files-FileMkdir) val | [FileRead](files-FileRead) val | [FileRemove](files-FileRemove) val | [FileRename](files-FileRename) val | [FileSeek](files-FileSeek) val | [FileStat](files-FileStat) val | [FileSync](files-FileSync) val | [FileTime](files-FileTime) val | [FileTruncate](files-FileTruncate) val | [FileWrite](files-FileWrite) val | [FileExec](files-FileExec) val), [U32](builtin-U32) val\] box

#### Returns

* [CapRights0](capsicum-CapRights0) ref^

---

### descriptor
<span class="source-link">[[Source]](src/capsicum/cap_rights.md#L52)</span>


Initialises with the rights on the given file descriptor.


```pony
new ref descriptor(
  fd: I32 val)
: CapRights0 ref^
```
#### Parameters

*   fd: [I32](builtin-I32) val

#### Returns

* [CapRights0](capsicum-CapRights0) ref^

---

## Public Functions

### set
<span class="source-link">[[Source]](src/capsicum/cap_rights.md#L60)</span>


```pony
fun ref set(
  cap: U64 val)
: None val
```
#### Parameters

*   cap: [U64](builtin-U64) val

#### Returns

* [None](builtin-None) val

---

### unset
<span class="source-link">[[Source]](src/capsicum/cap_rights.md#L65)</span>


```pony
fun ref unset(
  cap: U64 val)
: None val
```
#### Parameters

*   cap: [U64](builtin-U64) val

#### Returns

* [None](builtin-None) val

---

### limit
<span class="source-link">[[Source]](src/capsicum/cap_rights.md#L70)</span>


Limits the fd to the encoded rights.


```pony
fun box limit(
  fd: I32 val)
: Bool val
```
#### Parameters

*   fd: [I32](builtin-I32) val

#### Returns

* [Bool](builtin-Bool) val

---

### merge
<span class="source-link">[[Source]](src/capsicum/cap_rights.md#L80)</span>


Merge the rights in that into this.


```pony
fun ref merge(
  that: CapRights0 ref)
: None val
```
#### Parameters

*   that: [CapRights0](capsicum-CapRights0) ref

#### Returns

* [None](builtin-None) val

---

### remove
<span class="source-link">[[Source]](src/capsicum/cap_rights.md#L88)</span>


Remove the rights in that from this.


```pony
fun ref remove(
  that: CapRights0 ref)
: None val
```
#### Parameters

*   that: [CapRights0](capsicum-CapRights0) ref

#### Returns

* [None](builtin-None) val

---

### clear
<span class="source-link">[[Source]](src/capsicum/cap_rights.md#L96)</span>


Clear all rights.


```pony
fun ref clear()
: None val
```

#### Returns

* [None](builtin-None) val

---

### contains
<span class="source-link">[[Source]](src/capsicum/cap_rights.md#L104)</span>


Check that this is a superset of the rights in that.


```pony
fun box contains(
  that: CapRights0 ref)
: Bool val
```
#### Parameters

*   that: [CapRights0](capsicum-CapRights0) ref

#### Returns

* [Bool](builtin-Bool) val

---

## Private Functions

### _version
<span class="source-link">[[Source]](src/capsicum/cap_rights.md#L114)</span>


```pony
fun box _version()
: I32 val
```

#### Returns

* [I32](builtin-I32) val

---

