pub trait ServiceBase: Send + Sync {
// Required methods
fn handle(&self) -> &ServiceHandle;
fn execute(&self) -> Result<(), RclrsError>;
}
Expand description
Trait to be implemented by concrete Service structs.
See Service<T>
for an example
Required Methods§
Sourcefn handle(&self) -> &ServiceHandle
fn handle(&self) -> &ServiceHandle
Internal function to get a reference to the rcl
handle.
Sourcefn execute(&self) -> Result<(), RclrsError>
fn execute(&self) -> Result<(), RclrsError>
Tries to take a new request and run the callback with it.