pub enum Entity {
Component(Component),
API(ApiEntity),
Resource(ResourceEntity),
System(SystemEntity),
Group(GroupEntity),
Location(LocationEntity),
Domain(DomainEntity),
Template(TemplateEntity),
User(UserEntity),
}
Variants§
Component(Component)
API(ApiEntity)
Resource(ResourceEntity)
System(SystemEntity)
Group(GroupEntity)
Location(LocationEntity)
Domain(DomainEntity)
Template(TemplateEntity)
User(UserEntity)
Implementations§
Source§impl Entity
impl Entity
Sourcepub fn relations(&self) -> Option<&Vec<Relation>>
pub fn relations(&self) -> Option<&Vec<Relation>>
Returns the relations of the entity if available.
Sourcepub fn namespace(&self) -> &str
pub fn namespace(&self) -> &str
Returns the namespace of the entity, defaulting to “default” if not specified.
Sourcepub fn entity_ref(&self) -> String
pub fn entity_ref(&self) -> String
Returns the fully qualified entity reference in the format “kind:namespace/name”.
Sourcepub fn description(&self) -> Option<&str>
pub fn description(&self) -> Option<&str>
Returns the description of the entity if available.
Returns the tags associated with the entity.
Sourcepub fn annotations(&self) -> Option<&HashMap<String, String>>
pub fn annotations(&self) -> Option<&HashMap<String, String>>
Returns the annotations associated with the entity.
Sourcepub fn get_annotation(&self, key: &str) -> Option<&str>
pub fn get_annotation(&self, key: &str) -> Option<&str>
Gets an annotation value by key.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Entity
impl<'de> Deserialize<'de> for Entity
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
Auto Trait Implementations§
impl Freeze for Entity
impl RefUnwindSafe for Entity
impl Send for Entity
impl Sync for Entity
impl Unpin 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