pub struct CommandBuilder<S> { /* private fields */ }Implementations§
Source§impl CommandBuilder<EntityType>
impl CommandBuilder<EntityType>
pub fn new() -> CommandBuilder<EntityType>
pub fn ty(self, ty: &EntityTypeId) -> CommandBuilder<Scope>
Sourcepub fn singleton(self, ty: &EntityTypeId) -> CommandBuilder<Help>
pub fn singleton(self, ty: &EntityTypeId) -> CommandBuilder<Help>
Uses the type information to build a command. Useful for entity types with exactly one instance.
pub fn singleton_from_type<S1: Into<String>, S2: Into<String>>( self, namespace: S1, type_name: S2, ) -> CommandBuilder<Help>
Source§impl CommandBuilder<Scope>
impl CommandBuilder<Scope>
pub fn scope<S: Into<String>>(self, scope: S) -> CommandBuilder<Name>
pub fn scope_and_name<S1: Into<String>, S2: Into<String>>( self, scope: S1, name: S2, ) -> CommandBuilder<Help>
Source§impl CommandBuilder<Name>
impl CommandBuilder<Name>
Source§impl CommandBuilder<Label>
impl CommandBuilder<Label>
pub fn label<S: Into<String>>(self, label: S) -> CommandBuilder<Help>
pub fn no_label(self) -> CommandBuilder<Help>
Source§impl CommandBuilder<Help>
impl CommandBuilder<Help>
pub fn help<S: Into<String>>(self, help: S) -> CommandBuilder<Components>
pub fn no_help(self) -> CommandBuilder<Components>
Source§impl CommandBuilder<Components>
impl CommandBuilder<Components>
pub fn component(self, ty: &ComponentTypeId) -> CommandBuilder<Components>
pub fn component_from_type<S1: Into<String>, S2: Into<String>>( self, namespace: S1, type_name: S2, ) -> CommandBuilder<Components>
pub fn arguments(self) -> CommandBuilder<Arguments>
pub fn no_arguments(self) -> CommandBuilder<Executor>
Source§impl CommandBuilder<Arguments>
impl CommandBuilder<Arguments>
pub fn argument<A: Into<CommandArg>>( self, arg: A, value: Value, ) -> CommandBuilder<Arguments>
pub fn properties(self) -> CommandBuilder<Properties>
pub fn no_properties(self) -> CommandBuilder<Executor>
Source§impl CommandBuilder<Properties>
impl CommandBuilder<Properties>
pub fn property<S: Into<String>>( self, property_name: S, value: Value, ) -> CommandBuilder<Properties>
pub fn no_more_properties(self) -> CommandBuilder<Executor>
Source§impl CommandBuilder<Executor>
impl CommandBuilder<Executor>
pub fn executor<F>(self, subscriber: F) -> CommandBuilder<Finish>
pub fn executor_with_handle<F>( self, subscriber: F, handle_id: Option<u128>, ) -> CommandBuilder<Finish>
Source§impl CommandBuilder<Finish>
impl CommandBuilder<Finish>
pub fn id(self, id: Uuid) -> CommandBuilder<Finish>
pub fn build(self) -> Result<Command, CommandBuilderError>
pub fn build_with_type( self, ) -> Result<(Command, EntityType), CommandBuilderError>
Auto Trait Implementations§
impl<S> Freeze for CommandBuilder<S>
impl<S> !RefUnwindSafe for CommandBuilder<S>
impl<S> Send for CommandBuilder<S>where
S: Send,
impl<S> !Sync for CommandBuilder<S>
impl<S> Unpin for CommandBuilder<S>where
S: Unpin,
impl<S> !UnwindSafe for CommandBuilder<S>
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more