Enum wick_packet::Entity
source · pub enum Entity {
Invalid,
System(SystemEntity),
Test(String),
Client(String),
Host(String),
Operation(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.
Operation(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§
source§impl Entity
impl Entity
sourcepub fn operation<T: AsRef<str>, U: AsRef<str>>(ns: T, name: U) -> Self
pub fn operation<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
local() insteadConstructor 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.