pub struct ASCOMError {
pub code: ASCOMErrorCode,
pub message: Cow<'static, str>,
}Expand description
ASCOM error.
Fields§
§code: ASCOMErrorCodeError 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 NOT_IMPLEMENTED: Self
pub const NOT_IMPLEMENTED: Self
Property or method not implemented.
Sourcepub const INVALID_VALUE: Self
pub const INVALID_VALUE: Self
Invalid value.
Sourcepub const VALUE_NOT_SET: Self
pub const VALUE_NOT_SET: Self
A value has not been set.
Sourcepub const NOT_CONNECTED: Self
pub const NOT_CONNECTED: Self
The communications channel is not connected.
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 INVALID_OPERATION: Self
pub const INVALID_OPERATION: Self
The requested operation can not be undertaken at this time.
Sourcepub const ACTION_NOT_IMPLEMENTED: Self
pub const ACTION_NOT_IMPLEMENTED: Self
The requested action is not implemented in this driver.
Sourcepub const OPERATION_CANCELLED: Self
pub const OPERATION_CANCELLED: Self
In-progress asynchronous operation has been cancelled.
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.
Trait Implementations§
Source§impl Clone for ASCOMError
impl Clone for ASCOMError
Source§fn clone(&self) -> ASCOMError
fn clone(&self) -> ASCOMError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ASCOMError
impl Debug for ASCOMError
Source§impl<'de> Deserialize<'de> for ASCOMError
impl<'de> Deserialize<'de> for ASCOMError
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Display for ASCOMError
impl Display for ASCOMError
Source§impl Error for ASCOMError
impl Error for ASCOMError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for ASCOMError
impl RefUnwindSafe for ASCOMError
impl Send for ASCOMError
impl Sync for ASCOMError
impl Unpin for ASCOMError
impl UnsafeUnpin for ASCOMError
impl UnwindSafe for ASCOMError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.