pub struct Service<Srv> where
    Srv: ServiceT
{ /* private fields */ }
Expand description

Service server

Implementations

Get the service name.

Examples
let subscription =
    node.create_service::<Empty, _>("service", callback, &QoSProfile::default())?;
assert_eq!(subscription.service_name().unwrap(), "/service");

Check if this service is valid or not. Normally, a return value should be true.

Examples
let subscription =
    node.create_service::<Empty, _>("service", callback, &QoSProfile::default())?;
assert!(subscription.is_valid());

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.