pub struct RunCommand<TParameter, TResponse> { /* private fields */ }
Expand description
The RunCommand is a query request that will run a named command with a parameter, returning the result as a stream of responses to a target
Implementations§
Source§impl<TParameter, TResponse> RunCommand<TParameter, TResponse>
impl<TParameter, TResponse> RunCommand<TParameter, TResponse>
Sourcepub fn new(
target: impl Into<StreamTarget>,
name: impl Into<String>,
parameter: impl Into<TParameter>,
) -> Self
pub fn new( target: impl Into<StreamTarget>, name: impl Into<String>, parameter: impl Into<TParameter>, ) -> Self
Creates a new ‘run command’ request. The command with the specified name will be run, and will send its response to the target.
Sourcepub fn target(&self) -> StreamTarget
pub fn target(&self) -> StreamTarget
Returns the program that the response to the command should be setn to
Sourcepub fn parameter(&self) -> &TParameter
pub fn parameter(&self) -> &TParameter
The parameter to the command
Trait Implementations§
Source§impl<TParameter: Clone, TResponse: Clone> Clone for RunCommand<TParameter, TResponse>
impl<TParameter: Clone, TResponse: Clone> Clone for RunCommand<TParameter, TResponse>
Source§fn clone(&self) -> RunCommand<TParameter, TResponse>
fn clone(&self) -> RunCommand<TParameter, TResponse>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'de, TParameter, TResponse> Deserialize<'de> for RunCommand<TParameter, TResponse>where
TParameter: Deserialize<'de>,
impl<'de, TParameter, TResponse> Deserialize<'de> for RunCommand<TParameter, TResponse>where
TParameter: Deserialize<'de>,
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
Source§impl<TParameter: PartialEq, TResponse: PartialEq> PartialEq for RunCommand<TParameter, TResponse>
impl<TParameter: PartialEq, TResponse: PartialEq> PartialEq for RunCommand<TParameter, TResponse>
Source§fn eq(&self, other: &RunCommand<TParameter, TResponse>) -> bool
fn eq(&self, other: &RunCommand<TParameter, TResponse>) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.Source§impl<TParameter, TResponse> QueryRequest for RunCommand<TParameter, TResponse>where
for<'de> TParameter: 'static + Unpin + Send + Serialize + Deserialize<'de>,
for<'de> TResponse: 'static + Unpin + Send + Serialize + Deserialize<'de>,
impl<TParameter, TResponse> QueryRequest for RunCommand<TParameter, TResponse>where
for<'de> TParameter: 'static + Unpin + Send + Serialize + Deserialize<'de>,
for<'de> TResponse: 'static + Unpin + Send + Serialize + Deserialize<'de>,
Source§type ResponseData = TResponse
type ResponseData = TResponse
An object receiving this query request will send back a
QueryResponse<Self::ResponseData>
Source§fn with_new_target(self, new_target: StreamTarget) -> Self
fn with_new_target(self, new_target: StreamTarget) -> Self
Updates this request to use a different target
Source§impl<TParameter, TResponse> SceneMessage for RunCommand<TParameter, TResponse>where
for<'de> TParameter: 'static + Unpin + Send + Serialize + Deserialize<'de>,
for<'de> TResponse: 'static + Unpin + Send + Serialize + Deserialize<'de>,
impl<TParameter, TResponse> SceneMessage for RunCommand<TParameter, TResponse>where
for<'de> TParameter: 'static + Unpin + Send + Serialize + Deserialize<'de>,
for<'de> TResponse: 'static + Unpin + Send + Serialize + Deserialize<'de>,
Source§fn message_type_name() -> String
fn message_type_name() -> String
A string that identifies this message type uniquely when serializing Read more
Source§fn default_target() -> StreamTarget
fn default_target() -> StreamTarget
The default target for this message type Read more
Source§fn initialise(init_context: &impl SceneInitialisationContext)
fn initialise(init_context: &impl SceneInitialisationContext)
Sets up this message type in a scene. This can be an opportunity to set up default filters and connections for a
particular message type. This is called the first time that a message is referenced in a scene.
Source§fn allow_thread_stealing_by_default() -> bool
fn allow_thread_stealing_by_default() -> bool
True if input streams for this message type should allow thread stealing by default Read more
Source§fn serializable() -> bool
fn serializable() -> bool
True if this message supports serialization Read more
Source§impl<TParameter, TResponse> Serialize for RunCommand<TParameter, TResponse>where
TParameter: Serialize,
impl<TParameter, TResponse> Serialize for RunCommand<TParameter, TResponse>where
TParameter: Serialize,
impl<TParameter: Eq, TResponse: Eq> Eq for RunCommand<TParameter, TResponse>
impl<TParameter, TResponse> StructuralPartialEq for RunCommand<TParameter, TResponse>
Auto Trait Implementations§
impl<TParameter, TResponse> Freeze for RunCommand<TParameter, TResponse>where
TParameter: Freeze,
impl<TParameter, TResponse> !RefUnwindSafe for RunCommand<TParameter, TResponse>
impl<TParameter, TResponse> Send for RunCommand<TParameter, TResponse>
impl<TParameter, TResponse> Sync for RunCommand<TParameter, TResponse>
impl<TParameter, TResponse> Unpin for RunCommand<TParameter, TResponse>
impl<TParameter, TResponse> !UnwindSafe for RunCommand<TParameter, TResponse>
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