pub struct Entity { /* private fields */ }Implementations§
Source§impl Entity
impl Entity
pub fn new(entity_type: &str, id: &str) -> Self
pub fn new_with_id(entity_type: &str, key: &str, id: EntityIdValue) -> Self
pub fn from_fields( entity_type: &str, id: &str, fields: HashMap<String, Value>, ) -> Self
pub fn id(&self) -> &str
pub fn entity_type(&self) -> &str
pub fn set<V: IntoEntityValue>(&mut self, field: &str, value: V)
pub fn get(&self, field: &str) -> Option<&Value>
pub fn get_bigint(&self, field: &str) -> BigInt
pub fn get_bigdecimal(&self, field: &str) -> BigDecimal
pub fn get_string(&self, field: &str) -> String
pub fn get_bytes(&self, field: &str) -> Vec<u8> ⓘ
pub fn get_bool(&self, field: &str) -> bool
pub fn get_i32(&self, field: &str) -> i32
pub fn fields(&self) -> &HashMap<String, Value>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Entity
impl RefUnwindSafe for Entity
impl Send for Entity
impl Sync for Entity
impl Unpin for Entity
impl UnsafeUnpin for Entity
impl UnwindSafe for Entity
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more