pub enum COBIAError {
Message(String),
MessageWithCause(String, CapeError),
Code(CapeResult),
CAPEOPEN(CapeError),
}Expand description
A COBIA error, with description
Many functions in this module return a Result with the error
type set to COBIAError. A COBIAError can be constructed from
- a string message, for an internal error message
- a
CapeResulterror code, for an internal message that corresponds to a predefined CAPE-OPEN error code - a
CapeError, for an error that was returned by an external CAPE-OPEN component - a string message and a
CapeError, for an internal error message that was caused by an external CAPE-OPEN component
The COBIAError type implements the Error trait, so it can be used in functions that return Result.
The COBIAError type also implements the Display trait, so it can be formatted as a string.
Variants§
Implementations§
Source§impl COBIAError
impl COBIAError
pub fn as_code(&self) -> CapeResult
pub fn from_object<T: CapeSmartPointer>(code: CapeResult, object: &T) -> Self
pub fn from_cape_interface_pointer( code: CapeResult, interface: *mut ICapeInterface, ) -> Self
Trait Implementations§
Source§impl Clone for COBIAError
impl Clone for COBIAError
Source§fn clone(&self) -> COBIAError
fn clone(&self) -> COBIAError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for COBIAError
impl Debug for COBIAError
Source§impl Display for COBIAError
impl Display for COBIAError
Source§impl Error for COBIAError
Implements the Error trait for COBIAError
impl Error for COBIAError
Implements the Error trait for COBIAError
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 COBIAError
impl RefUnwindSafe for COBIAError
impl !Send for COBIAError
impl !Sync for COBIAError
impl Unpin for COBIAError
impl UnwindSafe for COBIAError
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