pub enum Polling {
Fetching(MethodCall),
Timeout(Elapsed),
}
Expand description
Represents possible errors that may happen during the polling event loop.
Variants§
Fetching(MethodCall)
Calling GetUpdates
resulted in an error.
Timeout(Elapsed)
Calling GetUpdates
timed out.
Implementations§
source§impl Polling
impl Polling
sourcepub fn is_fetching(&self) -> bool
pub fn is_fetching(&self) -> bool
Returns true
if self
is of variant Fetching
.
sourcepub fn expect_fetching(self) -> MethodCallwhere
Self: Debug,
pub fn expect_fetching(self) -> MethodCallwhere
Self: Debug,
sourcepub fn fetching(self) -> Option<MethodCall>
pub fn fetching(self) -> Option<MethodCall>
Returns Some
if self
is of variant Fetching
, and None
otherwise.
sourcepub fn is_timeout(&self) -> bool
pub fn is_timeout(&self) -> bool
Returns true
if self
is of variant Timeout
.
sourcepub fn expect_timeout(self) -> Elapsedwhere
Self: Debug,
pub fn expect_timeout(self) -> Elapsedwhere
Self: Debug,
Trait Implementations§
source§impl From<MethodCall> for Polling
impl From<MethodCall> for Polling
source§fn from(error: MethodCall) -> Self
fn from(error: MethodCall) -> Self
Converts to this type from the input type.