Enum ros_message::Error
source · pub enum Error {
InvalidMessagePath {
name: String,
reason: String,
},
UnsupportedDataType {
name: String,
reason: String,
},
BadMessageContent(String),
MessageDependencyMissing {
package: String,
name: String,
},
BadConstant {
name: String,
datatype: String,
value: String,
},
}
Expand description
Enumeration of all errors that can be returned.
Variants§
InvalidMessagePath
Message doesn’t have a valid format.
Message names must follow the package_name/MessageName
format.
Packages must follow REP 144 rules.
Fields
UnsupportedDataType
Field in the msg
or srv
file has a name that doesn’t fit any data type category.
Fields
BadMessageContent(String)
The msg
or srv
file being parsed has invalid content.
MessageDependencyMissing
Certain operations on a msg
or srv
file require first handling all messages it depends upon.
For example, to calculate an MD5 sum for a message, you first need to calculate it for all messages it depends upon, and passing them into the calculation call.
Fields
BadConstant
Passed in constant value is not parsable as its data type.
Trait Implementations§
source§impl Error for Error
impl Error for Error
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
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> 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