Enum wasmflow_entity::Entity
source · [−]pub enum Entity {
Invalid,
System(SystemEntity),
Test(String),
Client(String),
Host(String),
Component(String, String),
Collection(String),
Reference(String),
}Expand description
The entity being referenced across systems or services.
Variants
Invalid
A SystemEntity with the name “invalid”. Used only for situations where a default is necessary.
System(SystemEntity)
The SystemEntity is used when communicating to or from the internals of another component. Used mostly by library developers.
Test(String)
A SystemEntity with the name “test”. Used as the originating entity for tests.
Client(String)
A client entity used for requests.
Host(String)
A Host entity used for entities that serve responses to requests.
Component(String, String)
A component or anything that can be invoked like a component.
Collection(String)
A collection of components.
Reference(String)
A reference to an instance of an entity.
Implementations
sourceimpl Entity
impl Entity
sourcepub fn component<T: AsRef<str>, U: AsRef<str>>(ns: T, name: U) -> Self
pub fn component<T: AsRef<str>, U: AsRef<str>>(ns: T, name: U) -> Self
Constructor for Entity::Component.
sourcepub fn local<T: AsRef<str>>(name: T) -> Self
pub fn local<T: AsRef<str>>(name: T) -> Self
Constructor for Entity::Component on the local namespace, used when the namespace is irrelevant. Caution: this is not portable.
sourcepub fn component_direct<T: AsRef<str>>(name: T) -> Self
👎 Deprecated: please use local() instead
pub fn component_direct<T: AsRef<str>>(name: T) -> Self
please use local() instead
Constructor for Entity::Component without a namespace, used when the namespace is irrelevant. Caution: this is not portable.
sourcepub fn system<T: AsRef<str>, U: AsRef<str>>(name: T, value: U) -> Self
pub fn system<T: AsRef<str>, U: AsRef<str>>(name: T, value: U) -> Self
Constructor for Entity::System.
sourcepub fn test<T: AsRef<str>>(msg: T) -> Self
pub fn test<T: AsRef<str>>(msg: T) -> Self
Constructor for an Entity::Test.
sourcepub fn collection<T: AsRef<str>>(id: T) -> Self
pub fn collection<T: AsRef<str>>(id: T) -> Self
Constructor for an Entity::Collection.
sourcepub fn host<T: AsRef<str>>(id: T) -> Self
pub fn host<T: AsRef<str>>(id: T) -> Self
Constructor for Entity::Host.
sourcepub fn client<T: AsRef<str>>(id: T) -> Self
pub fn client<T: AsRef<str>>(id: T) -> Self
Constructor for Entity::Client.
sourcepub fn reference<T: AsRef<str>>(id: T) -> Self
pub fn reference<T: AsRef<str>>(id: T) -> Self
Constructor for Entity::Client.
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Entity
impl<'de> Deserialize<'de> for Entity
sourcefn 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 StructuralPartialEq for Entity
Auto Trait Implementations
impl RefUnwindSafe for Entity
impl Send for Entity
impl Sync for Entity
impl Unpin for Entity
impl UnwindSafe for Entity
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more