pub struct Context { /* private fields */ }

Implementations

Create node with empty namespace and default options

Examples
let ctx = rclrust::init().unwrap();
let node = ctx.create_node("test_node").unwrap();
assert_eq!(&node.fully_qualified_name(), "/test_node");

Create node with empty namespace and specified options

Examples
use rclrust::NodeOptions;

let ctx = rclrust::init().unwrap();
let options = NodeOptions::new();
let node = ctx.create_node_with_options("test_node", &options).unwrap();
assert_eq!(&node.fully_qualified_name(), "/test_node");

Create node with namespace and default options

Examples
let ctx = rclrust::init().unwrap();
let node = ctx.create_node_with_ns("test_node", "ns").unwrap();
assert_eq!(&node.fully_qualified_name(), "/ns/test_node");

Create node with empty namespace and specified options

Examples
use rclrust::NodeOptions;

let ctx = rclrust::init().unwrap();
let options = NodeOptions::new();
let node = ctx
    .create_node_with_ns_and_options("test_node", "ns", &options)
    .unwrap();
assert_eq!(&node.fully_qualified_name(), "/ns/test_node");

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.