pub struct CustomEntity {
pub kind: String,
pub display_name: String,
pub category: String,
pub icon: String,
pub attrs: Json,
}Expand description
A user-defined entity kind with arbitrary metadata.
Library consumers can create custom entity kinds without modifying moire source. All fields are user-controlled; the runtime treats them opaquely.
Fields§
§kind: StringCanonical kind identifier (e.g. “database_pool”). snake_case, non-empty.
display_name: StringHuman-readable display name (e.g. “Database Pool”).
category: StringCategory for UI grouping (“async”/“sync”/“channel”/“rpc”/“net”/“fs”/“time”/“meta”).
icon: StringPhosphor icon name (e.g. “Database”, “Cpu”). Empty string = default icon.
attrs: JsonArbitrary structured metadata as a JSON object string.
Trait Implementations§
Source§impl EntityBodySlot for CustomEntity
impl EntityBodySlot for CustomEntity
const KIND_NAME: &'static str = "Custom"
type Value = CustomEntity
fn project(body: &EntityBody) -> Option<&Self::Value>
fn project_mut(body: &mut EntityBody) -> Option<&mut Self::Value>
Source§impl<'ʄ> Facet<'ʄ> for CustomEntity
impl<'ʄ> Facet<'ʄ> for CustomEntity
Source§impl From<CustomEntity> for EntityBody
impl From<CustomEntity> for EntityBody
Source§fn from(value: CustomEntity) -> Self
fn from(value: CustomEntity) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for CustomEntity
impl RefUnwindSafe for CustomEntity
impl Send for CustomEntity
impl Sync for CustomEntity
impl Unpin for CustomEntity
impl UnsafeUnpin for CustomEntity
impl UnwindSafe for CustomEntity
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