pub struct Entry {
pub primary_field: Field,
pub fields: HashMap<String, Field>,
pub last_timestamp: Option<SystemTime>,
}
Expand description
Entry represents all items that are contained within a Table
Fields§
§primary_field: Field
§fields: HashMap<String, Field>
§last_timestamp: Option<SystemTime>
Implementations§
Source§impl Entry
impl Entry
Sourcepub fn new() -> EntryBuilder
pub fn new() -> EntryBuilder
Returns an EntryBuilder Instance that will be used to create a new entry
use persistent_keystore_rs::Entry;
let entry = Entry::new();
Sourcepub fn get_field(&self, key: String) -> Option<Field>
pub fn get_field(&self, key: String) -> Option<Field>
Returns an Optional Field value for a given Entry
use persistent_keystore_rs::{Entry, Field};
use std::time::SystemTime;
let entry = Entry::new()
.set_primary_field(Field::String("MyFirstEntry".to_string())).unwrap()
.add_field("TimeStamp".to_string(), Field::Date(SystemTime::now())).unwrap()
.build().unwrap();
let exists = &entry.get_field("TimeStamp".to_string());
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Entry
impl<'de> Deserialize<'de> for Entry
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Entry
impl StructuralPartialEq for Entry
Auto Trait Implementations§
impl Freeze for Entry
impl RefUnwindSafe for Entry
impl Send for Entry
impl Sync for Entry
impl Unpin for Entry
impl UnwindSafe for Entry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more