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

# Struct PublicLogs

Module: `noir_aztec::protocol::abis::public_logs`

```rust
pub struct PublicLogs {
    pub length: u32,
    pub payload: [Field; 4096],
}
```

## Fields

```rust
length: u32
```

```rust
payload: [Field; 4096]
```

## Implementations

```rust
impl PublicLogs
```

```rust
pub fn new(payload: [Field; 4096], length: u32) -> Self
```

```rust
pub fn add_log<let N: u32>(&mut self, contract_address: AztecAddress, log: Log<N>)
```

Public logs are added in the avm. This function is only for tests.

## Trait implementations

```rust
impl Deserialize for PublicLogs
```

```rust
pub fn deserialize(fields: [Field; 4097]) -> Self
```

```rust
pub fn stream_deserialize<let K: u32>(reader: &mut Reader<K>) -> Self
```

```rust
impl Empty for PublicLogs
```

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

```rust
pub fn is_empty(self: Self) -> bool
where
    Self: Eq
```

```rust
pub fn assert_empty<let S: u32>(self: Self, msg: str<S>)
where
    Self: Eq
```

```rust
impl Eq for PublicLogs
```

```rust
pub fn eq(_self: Self, _other: Self) -> bool
```

```rust
impl Serialize for PublicLogs
```

```rust
pub fn serialize(self) -> [Field; 4097]
```

```rust
pub fn stream_serialize<let K: u32>(self, writer: &mut Writer<K>)
```
