pub enum Error {
MissingHeader(String),
InvalidParam(String),
ParseError(String),
TokenizeError(String),
Utf8Error(String),
Unexpected(String),
}Expand description
The Error enum indicates that something went wrong
It has 6 variants:
MissingHeaderthat a header that is expected to be found was completely missing. There are some headers that are required everywhere in SIP, likeFrom,Toetc.InvalidParammeans some header parser did not succeed, and the reason for it is a missing or invalid parameter. InnerStringshould have the nom verbose error about it.ParseErrorindicates a general parsing error. InnerStringshould have the verbose nom error giving hints on what went wrong.TokenizeErrorindicates a general tokenizer error. InnerStringshould have the verbose nom error giving hints on what went wrong. A Tokenizer just tries to break thebytesinto parts/components of rsip structs, but never tries to parse/convert to a specific type. So if a tokenizer fails and you get this error, it means it couldn’t even manage to break the SIP message in the correct breakpoints.Utf8Errorindicates that thefrom_utf8std method completely failed. At least you should get the information regarding which header had this issue.Unexpectedindicates any other error.
Variants
MissingHeader(String)
InvalidParam(String)
ParseError(String)
TokenizeError(String)
Utf8Error(String)
Unexpected(String)
Implementations
Trait Implementations
Performs the conversion.
Performs the conversion.
Performs the conversion.
Auto Trait Implementations
impl RefUnwindSafe for Error
impl UnwindSafe for Error
Blanket Implementations
Mutably borrows from an owned value. Read more
type Output = T
type Output = T
Should always be Self