> Aztec.nr API reference, v6.0.0 (mainnet and testnet). Index: https://docs.aztec.network/aztec-nr-api/v6.0.0/llms.txt

# Primitive type bool

Module: `std`

The boolean type.

The `bool` represents a value, which could only be either `true` or `false`. If you cast a `bool` into an integer, `true` will be `1` and `false` will be `0`.

## Trait implementations

```rust
impl AsPrimitive<Field> for bool
```

```rust
pub fn as_(self) -> Field
```

```rust
impl AsPrimitive<bool> for bool
```

```rust
pub fn as_(self) -> Self
```

```rust
impl AsPrimitive<i16> for bool
```

```rust
pub fn as_(self) -> i16
```

```rust
impl AsPrimitive<i32> for bool
```

```rust
pub fn as_(self) -> i32
```

```rust
impl AsPrimitive<i64> for bool
```

```rust
pub fn as_(self) -> i64
```

```rust
impl AsPrimitive<i8> for bool
```

```rust
pub fn as_(self) -> i8
```

```rust
impl AsPrimitive<u128> for bool
```

```rust
pub fn as_(self) -> u128
```

```rust
impl AsPrimitive<u16> for bool
```

```rust
pub fn as_(self) -> u16
```

```rust
impl AsPrimitive<u32> for bool
```

```rust
pub fn as_(self) -> u32
```

```rust
impl AsPrimitive<u64> for bool
```

```rust
pub fn as_(self) -> u64
```

```rust
impl AsPrimitive<u8> for bool
```

```rust
pub fn as_(self) -> u8
```

```rust
impl BitAnd for bool
```

```rust
pub fn bitand(self, other: Self) -> Self
```

```rust
impl BitOr for bool
```

```rust
pub fn bitor(self, other: Self) -> Self
```

```rust
impl BitXor for bool
```

```rust
pub fn bitxor(self, other: Self) -> Self
```

```rust
impl Default for bool
```

```rust
pub fn default() -> Self
```

```rust
impl Eq for bool
```

```rust
pub fn eq(self, other: Self) -> Self
```

```rust
impl Hash for bool
```

```rust
pub fn hash<H>(self, state: &mut H)
where
    H: Hasher
```

```rust
impl Not for bool
```

```rust
pub fn not(self) -> Self
```

```rust
impl Ord for bool
```

```rust
pub fn cmp(self, other: Self) -> Ordering
```
