Struct resp_protocol::ArrayBuilder[][src]

pub struct ArrayBuilder { /* fields omitted */ }

Implementations

Builad a new Array Builder

Example
use resp_protocol::{Array, ArrayBuilder};

let array_builder: ArrayBuilder = ArrayBuilder::new();
let array: Array = array_builder.build();

Add a new value to Array Builder

Example
use resp_protocol::{RespType, Array, ArrayBuilder, SimpleString};

let mut array_builder: ArrayBuilder = ArrayBuilder::new();

let simple_string: SimpleString = SimpleString::new(b"OK");

array_builder.insert(RespType::SimpleString(simple_string));

let array: Array = array_builder.build();

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.