Struct r2r::PublisherUntyped
source · pub struct PublisherUntyped { /* private fields */ }
Expand description
A ROS (untyped) publisher.
This contains a Weak Arc
to an “untyped” publisher. As such it is safe to
move between threads.
Implementations§
source§impl PublisherUntyped
impl PublisherUntyped
sourcepub fn publish(&self, msg: Value) -> Result<()>
pub fn publish(&self, msg: Value) -> Result<()>
Publish an “untyped” ROS message represented by a serde_json::Value
.
It is up to the user to make sure the fields are correct.
sourcepub fn publish_raw(&self, data: &[u8]) -> Result<()>
pub fn publish_raw(&self, data: &[u8]) -> Result<()>
Publish an pre-serialized ROS message represented by a &[u8]
.
It is up to the user to make sure data is a valid ROS serialized message.
sourcepub fn get_inter_process_subscription_count(&self) -> Result<usize>
pub fn get_inter_process_subscription_count(&self) -> Result<usize>
Gets the number of external subscribers (i.e. it doesn’t count subscribers from the same process).
Trait Implementations§
source§impl Clone for PublisherUntyped
impl Clone for PublisherUntyped
source§fn clone(&self) -> PublisherUntyped
fn clone(&self) -> PublisherUntyped
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 Debug for PublisherUntyped
impl Debug for PublisherUntyped
impl Send for PublisherUntyped
Auto Trait Implementations§
impl Freeze for PublisherUntyped
impl RefUnwindSafe for PublisherUntyped
impl !Sync for PublisherUntyped
impl Unpin for PublisherUntyped
impl UnwindSafe for PublisherUntyped
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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