#[non_exhaustive]pub enum FloatErrorKind {
Empty,
Invalid,
}๐ฌThis is a nightly-only experimental API. (
extended_float_error_kind)Expand description
An error kind which can be returned when parsing a float.
This error kind is used as the inner error type in ParseFloatError for the FromStr implementation
for f32 and f64.
ยงExample
#![feature(extended_float_error_kind)]
use std::str::FromStr;
if let Err(e) = f64::from_str("a.12") {
println!("Failed conversion to f64: {:?}", e.kind());
}Variants (Non-exhaustive)ยง
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Empty
๐ฌThis is a nightly-only experimental API. (
extended_float_error_kind)Cannot parse float from empty string.
Invalid
๐ฌThis is a nightly-only experimental API. (
extended_float_error_kind)Invalid float literal.
Trait Implementationsยง
Sourceยงimpl Clone for FloatErrorKind
impl Clone for FloatErrorKind
Sourceยงfn clone(&self) -> FloatErrorKind
fn clone(&self) -> FloatErrorKind
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) ยท Sourceยงfn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for FloatErrorKind
Sourceยงimpl Debug for FloatErrorKind
impl Debug for FloatErrorKind
impl Eq for FloatErrorKind
Sourceยงimpl Hash for FloatErrorKind
impl Hash for FloatErrorKind
Sourceยงimpl PartialEq for FloatErrorKind
impl PartialEq for FloatErrorKind
impl StructuralPartialEq for FloatErrorKind
Auto Trait Implementationsยง
impl Forget for FloatErrorKind
impl Freeze for FloatErrorKind
impl Move for FloatErrorKind
impl RefUnwindSafe for FloatErrorKind
impl Send for FloatErrorKind
impl Sync for FloatErrorKind
impl Unpin for FloatErrorKind
impl UnsafeUnpin for FloatErrorKind
impl UnwindSafe for FloatErrorKind
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
ยงfn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
ยงimpl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
ยงfn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.ยงimpl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
ยงfn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more