Struct ascom_alpaca::ASCOMError
source · 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