pub struct Ros { /* private fields */ }
Implementations§
source§impl Ros
impl Ros
pub fn new(name: &str) -> Result<Ros>
pub fn uri(&self) -> &str
pub fn name(&self) -> &str
pub fn hostname(&self) -> &str
pub fn bind_address(&self) -> &str
pub fn now(&self) -> Time
pub fn delay(&self, d: Duration) -> Delay
pub fn shutdown_sender(&self) -> Arc<ShutdownManager>
pub fn rate(&self, rate: f64) -> Rate
pub fn is_ok(&self) -> bool
pub fn spin(&self) -> Spinner
pub fn param(&self, name: &str) -> Option<Parameter>
pub fn parameters(&self) -> Result<Vec<String>, ResponseError>
pub fn state(&self) -> Result<SystemState, ResponseError>
pub fn topics(&self) -> Result<Vec<Topic>, ResponseError>
pub fn client<T: ServicePair>(&self, service: &str) -> Result<Client<T>>
pub fn wait_for_service( &self, service: &str, timeout: Option<Duration>, ) -> Result<()>
pub fn service<T, F>(&self, service: &str, handler: F) -> Result<Service>
pub fn subscribe<T, F>( &self, topic: &str, queue_size: usize, callback: F, ) -> Result<Subscriber>
pub fn subscribe_with_ids<T, F>( &self, topic: &str, queue_size: usize, callback: F, ) -> Result<Subscriber>
pub fn subscribe_with_ids_and_headers<T, F, G>( &self, topic: &str, queue_size: usize, on_message: F, on_connect: G, ) -> Result<Subscriber>
pub fn subscribe_with<T, H>(
&self,
topic: &str,
queue_size: usize,
handler: H,
) -> Result<Subscriber>where
T: Message,
H: SubscriptionHandler<T>,
pub fn publish<T>(&self, topic: &str, queue_size: usize) -> Result<Publisher<T>>where
T: Message,
pub fn publish_with_description<T>(
&self,
topic: &str,
queue_size: usize,
message_description: RawMessageDescription,
) -> Result<Publisher<T>>where
T: Message,
pub fn log(&self, level: i8, msg: String, file: &str, line: u32)
pub fn log_once(&self, level: i8, msg: String, file: &str, line: u32)
pub fn log_throttle( &self, period: f64, level: i8, msg: String, file: &str, line: u32, )
pub fn log_throttle_identical( &self, period: f64, level: i8, msg: String, file: &str, line: u32, )
Auto Trait Implementations§
impl Freeze for Ros
impl !RefUnwindSafe for Ros
impl Send for Ros
impl Sync for Ros
impl Unpin for Ros
impl !UnwindSafe for Ros
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