Struct persistent_keystore_rs::EntryBuilder[][src]

pub struct EntryBuilder { /* fields omitted */ }
Expand description

Builder Pattern for creating new Entry items to be inserted into a Table

Implementations

Sets the primary_field of the Entry

use persistent_keystore_rs::{Entry, Field};
let mut entry_builder = Entry::new()
    .set_primary_field(Field::String("MyFirstEntry".to_string())).unwrap();

Add a field to the Entry. This can include both required and optional fields.

use persistent_keystore_rs::{Entry, Field};
let mut entry_builder = Entry::new()
    .set_primary_field(Field::String("MyFirstEntry".to_string())).unwrap()
    .add_field("Count".to_string(), Field::I32(0)).unwrap();

Validates the Entry is properly formatted with a primary field and contains at least one value field.

use persistent_keystore_rs::{Entry, Field};
let entry =  Entry::new()
    .set_primary_field(Field::String("MyFirstEntry".to_string())).unwrap()
    .add_field("Count".to_string(), Field::I32(3)).unwrap()
    .build().unwrap();

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.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

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.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more