Struct cognitive_services_speech_sdk_rs::error::Error
source · pub struct Error {
pub message: String,
pub caused_by: ErrorRootCause,
}
Expand description
Error struct represents error than can occur during library processing/execution.
Fields§
§message: String
§caused_by: ErrorRootCause
Implementations§
source§impl Error
impl Error
sourcepub fn new(message: String, caused_by: ErrorRootCause) -> Self
pub fn new(message: String, caused_by: ErrorRootCause) -> Self
Creates new error from custom message and underlying root cause.
sourcepub fn api_error_desc(error_root_cause: &ErrorRootCause) -> Option<String>
pub fn api_error_desc(error_root_cause: &ErrorRootCause) -> Option<String>
Returns description based on API error code.
Trait Implementations§
source§impl From<FromUtf8Error> for Error
impl From<FromUtf8Error> for Error
source§fn from(error: FromUtf8Error) -> Error
fn from(error: FromUtf8Error) -> Error
Converts to this type from the input type.
source§impl From<TryFromIntError> for Error
impl From<TryFromIntError> for Error
source§fn from(error: TryFromIntError) -> Error
fn from(error: TryFromIntError) -> Error
Converts to this type from the input type.