pub enum AddStatusError {
NoData,
InvalidDateTime(DateTimeError),
NoEnergyData,
MoonPowered,
BothCumulativeAndNet,
EnergyTooHighForTime(u32, Time),
ExcessivePowerGeneration {
power: u32,
system_size: u32,
},
ExcessiveEnergyGeneration {
energy: u32,
system_size: u32,
},
MissingFields,
InvalidDataFormat(String),
}Expand description
Errors that can occur when adding statuses to a system using crate::Client::add_status,
crate::Client::add_batch_status, or crate::Client::add_batch_status_net.
Variants§
NoData
No data were provided.
InvalidDateTime(DateTimeError)
The provided date or time was invalid.
NoEnergyData
None of energy generation, power generation, energy consumption, or power consumption were provided.
MoonPowered
Systems cannot generate power during hours without sunlight!
BothCumulativeAndNet
Both the cumulative and net flags were set.
EnergyTooHighForTime(u32, Time)
The energy generation value is too high for the time period.
ExcessivePowerGeneration
The power generation value is too high for this system.
ExcessiveEnergyGeneration
The energy generation value is too high for this system.
MissingFields
Required fields were missing.
InvalidDataFormat(String)
Invalid data format.
Trait Implementations§
Source§impl Clone for AddStatusError
impl Clone for AddStatusError
Source§fn clone(&self) -> AddStatusError
fn clone(&self) -> AddStatusError
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 AddStatusError
impl Debug for AddStatusError
Source§impl Display for AddStatusError
impl Display for AddStatusError
Source§impl Error for AddStatusError
impl Error for AddStatusError
1.30.0 · 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<AddStatusError> for ClientError<AddStatusError>
impl From<AddStatusError> for ClientError<AddStatusError>
Source§fn from(error: AddStatusError) -> Self
fn from(error: AddStatusError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for AddStatusError
impl PartialEq for AddStatusError
impl Eq for AddStatusError
impl StructuralPartialEq for AddStatusError
Auto Trait Implementations§
impl Freeze for AddStatusError
impl RefUnwindSafe for AddStatusError
impl Send for AddStatusError
impl Sync for AddStatusError
impl Unpin for AddStatusError
impl UnwindSafe for AddStatusError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.