pub struct EntityId {
pub entity_type: EntityType,
pub id: String,
}Expand description
Unique identifier for any entity in the system.
Fields§
§entity_type: EntityTypeType of the entity
id: StringUnique identifier within the type
Implementations§
Source§impl EntityId
impl EntityId
Sourcepub fn new(entity_type: EntityType, id: impl Into<String>) -> Self
pub fn new(entity_type: EntityType, id: impl Into<String>) -> Self
Create a new entity ID.
Sourcepub fn fixed_asset(id: impl Into<String>) -> Self
pub fn fixed_asset(id: impl Into<String>) -> Self
Create a fixed asset entity ID.
Sourcepub fn cost_center(id: impl Into<String>) -> Self
pub fn cost_center(id: impl Into<String>) -> Self
Create a cost center entity ID.
Sourcepub fn profit_center(id: impl Into<String>) -> Self
pub fn profit_center(id: impl Into<String>) -> Self
Create a profit center entity ID.
Sourcepub fn gl_account(id: impl Into<String>) -> Self
pub fn gl_account(id: impl Into<String>) -> Self
Create a GL account entity ID.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for EntityId
impl<'de> Deserialize<'de> for EntityId
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 EntityId
impl StructuralPartialEq for EntityId
Auto Trait Implementations§
impl Freeze for EntityId
impl RefUnwindSafe for EntityId
impl Send for EntityId
impl Sync for EntityId
impl Unpin for EntityId
impl UnwindSafe for EntityId
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.