Enum fred::types::StringOrNumber
source · pub enum StringOrNumber {
String(Str),
Number(i64),
Double(f64),
}Expand description
An argument representing a string or number.
Variants§
Implementations§
source§impl StringOrNumber
impl StringOrNumber
sourcepub fn from_static_str(s: &'static str) -> Self
pub fn from_static_str(s: &'static str) -> Self
An optimized way to convert from &'static str that avoids copying or moving the underlying bytes.
Trait Implementations§
source§impl Clone for StringOrNumber
impl Clone for StringOrNumber
source§fn clone(&self) -> StringOrNumber
fn clone(&self) -> StringOrNumber
Returns a copy 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 StringOrNumber
impl Debug for StringOrNumber
source§impl<'a> From<&'a str> for StringOrNumber
impl<'a> From<&'a str> for StringOrNumber
source§impl From<StrInner<Bytes>> for StringOrNumber
impl From<StrInner<Bytes>> for StringOrNumber
source§impl From<String> for StringOrNumber
impl From<String> for StringOrNumber
source§impl From<f32> for StringOrNumber
impl From<f32> for StringOrNumber
source§impl From<f64> for StringOrNumber
impl From<f64> for StringOrNumber
source§impl From<i16> for StringOrNumber
impl From<i16> for StringOrNumber
source§impl From<i32> for StringOrNumber
impl From<i32> for StringOrNumber
source§impl From<i64> for StringOrNumber
impl From<i64> for StringOrNumber
source§impl From<i8> for StringOrNumber
impl From<i8> for StringOrNumber
source§impl From<isize> for StringOrNumber
impl From<isize> for StringOrNumber
source§impl From<u16> for StringOrNumber
impl From<u16> for StringOrNumber
source§impl From<u32> for StringOrNumber
impl From<u32> for StringOrNumber
source§impl From<u64> for StringOrNumber
impl From<u64> for StringOrNumber
source§impl From<u8> for StringOrNumber
impl From<u8> for StringOrNumber
source§impl From<usize> for StringOrNumber
impl From<usize> for StringOrNumber
source§impl PartialEq for StringOrNumber
impl PartialEq for StringOrNumber
source§impl TryFrom<RedisValue> for StringOrNumber
impl TryFrom<RedisValue> for StringOrNumber
source§type Error = RedisError
type Error = RedisError
The type returned in the event of a conversion error.
impl Eq for StringOrNumber
Auto Trait Implementations§
impl !Freeze for StringOrNumber
impl RefUnwindSafe for StringOrNumber
impl Send for StringOrNumber
impl Sync for StringOrNumber
impl Unpin for StringOrNumber
impl UnwindSafe for StringOrNumber
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,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)§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>
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>
Converts
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>
Converts
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 more