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
impl RefUnwindSafe for EntryBuilder
impl Send for EntryBuilder
impl Sync for EntryBuilder
impl Unpin for EntryBuilder
impl UnwindSafe for EntryBuilder
Blanket Implementations
Mutably borrows from an owned value. Read more
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