pub struct ASCOMError {
pub code: ASCOMErrorCode,
pub message: Cow<'static, str>,
}
Expand description
ASCOM error.
Fields§
§code: ASCOMErrorCode
Error number.
message: Cow<'static, str>
Error message.
Implementations§
Source§impl ASCOMError
impl ASCOMError
Sourcepub fn new(code: ASCOMErrorCode, message: impl Display) -> Self
pub fn new(code: ASCOMErrorCode, message: impl Display) -> Self
Create a new ASCOMError
from given error code and a message.
Source§impl ASCOMError
impl ASCOMError
Sourcepub const ACTION_NOT_IMPLEMENTED: Self
pub const ACTION_NOT_IMPLEMENTED: Self
The requested action is not implemented in this driver
Sourcepub const INVALID_OPERATION: Self
pub const INVALID_OPERATION: Self
The requested operation can not be undertaken at this time
Sourcepub const INVALID_VALUE: Self
pub const INVALID_VALUE: Self
Invalid value
Sourcepub const INVALID_WHILE_PARKED: Self
pub const INVALID_WHILE_PARKED: Self
The attempted operation is invalid because the mount is currently in a Parked state
Sourcepub const INVALID_WHILE_SLAVED: Self
pub const INVALID_WHILE_SLAVED: Self
The attempted operation is invalid because the mount is currently in a Slaved state
Sourcepub const NOT_CONNECTED: Self
pub const NOT_CONNECTED: Self
The communications channel is not connected
Sourcepub const NOT_IMPLEMENTED: Self
pub const NOT_IMPLEMENTED: Self
Property or method not implemented
Sourcepub const NOT_IN_CACHE: Self
pub const NOT_IN_CACHE: Self
The requested item is not present in the ASCOM cache
Sourcepub const UNSPECIFIED: Self
pub const UNSPECIFIED: Self
Unspecified error
Sourcepub const VALUE_NOT_SET: Self
pub const VALUE_NOT_SET: Self
A value has not been set
Source§impl ASCOMError
impl ASCOMError
Sourcepub fn invalid_operation(message: impl Display) -> Self
pub fn invalid_operation(message: impl Display) -> Self
Create a new “invalid operation” error with the specified message.
Sourcepub fn invalid_value(message: impl Display) -> Self
pub fn invalid_value(message: impl Display) -> Self
Create a new “invalid value” error with the specified message.
Sourcepub fn unspecified(message: impl Display) -> Self
pub fn unspecified(message: impl Display) -> Self
Create a new error with unspecified error code and the given message.
Trait Implementations§
Source§impl Clone for ASCOMError
impl Clone for ASCOMError
Source§fn clone(&self) -> ASCOMError
fn clone(&self) -> ASCOMError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more