Struct ros2_client::Name
source · pub struct Name { /* private fields */ }
Expand description
Names for Topics, Services
See Names for ROS 1. and topic and Service name mapping to DDS in ROS 2 documentation.
Implementations§
source§impl Name
impl Name
sourcepub fn new(namespace: &str, base_name: &str) -> Result<Name, NameError>
pub fn new(namespace: &str, base_name: &str) -> Result<Name, NameError>
Construct a new Name
from namespace and base name.
If the namespace begins with a slash (/
) character, the Name will be
absolute, otherwise it will be relative.
The namespace may consist of several components, separated by slashes.
Tha namespace must not end in a slash, unless the namespace is just "/"
.
Do not put slashes in the base_name
.
Base name is not allowed to be empty, but the namespace may be empty.
Tilde or brace substitutions are not (yet) supported.
sourcepub fn parse(full_name: &str) -> Result<Name, NameError>
pub fn parse(full_name: &str) -> Result<Name, NameError>
Construct a new Name
from slash-separated namespace and base name.
e.g. myspace/some_name
pub fn to_dds_name( &self, kind_prefix: &str, node: &NodeName, suffix: &str, ) -> String
pub fn is_absolute(&self) -> bool
Trait Implementations§
impl Eq for Name
impl StructuralPartialEq for Name
Auto Trait Implementations§
impl Freeze for Name
impl RefUnwindSafe for Name
impl Send for Name
impl Sync for Name
impl Unpin for Name
impl UnwindSafe for Name
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
)