eclipse-iceoryx / iceoryx2

Eclipse iceoryx2™ - true zero-copy inter-process-communication in pure Rust
https://iceoryx.io
Apache License 2.0
783 stars 28 forks source link

Implement `TryInto` for `NodeName` and `ServiceName` #243

Closed elfenpiff closed 3 months ago

elfenpiff commented 3 months ago

(Code) Example Of Cumbersome API

Instead of writing:

NodeBuilder::new().name(&NodeName::new("whatever")?);

we could write

NodeBuilder::new().name("whatever".try_into()?);

which is much cleaner.

Improvement Suggestion

Implement TryInto for NodeName and ServiceName