#[non_exhaustive]pub enum OpcError {
Com {
source: Error,
},
Connection(String),
Server(String, u32),
Conversion(String),
InvalidState(String),
NotImplemented(String),
Internal(String),
}Expand description
Centralized error enum for the OPC DA client.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Com
Standard Windows COM/DCOM error.
This variant wraps a windows::core::Error and provides a friendly
hint for common OPC-related HRESULT codes.
Connection(String)
Connection-related errors (e.g., host unreachable, resolution failure).
Server(String, u32)
Server-specific errors reported via OPC status codes.
Conversion(String)
Errors during data type conversion or VARIANT processing.
InvalidState(String)
Operation attempted in an invalid state (e.g., group already exists).
NotImplemented(String)
Feature not implemented or supported by the target OPC server.
Internal(String)
Catch-all for unexpected internal failures.
Trait Implementations§
Source§impl Error for OpcError
impl Error for OpcError
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()
Source§impl From<TryFromIntError> for OpcError
impl From<TryFromIntError> for OpcError
Source§fn from(err: TryFromIntError) -> Self
fn from(err: TryFromIntError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for OpcError
impl RefUnwindSafe for OpcError
impl Send for OpcError
impl Sync for OpcError
impl Unpin for OpcError
impl UnsafeUnpin for OpcError
impl UnwindSafe for OpcError
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