pub enum AnyValue {
String(String),
Bool(bool),
Int32(i32),
Int64(i64),
Float(f32),
Double(f64),
Bytes(Vec<u8>),
Unknown(Vec<u8>),
}Variants§
String(String)
Bool(bool)
Int32(i32)
Int64(i64)
Float(f32)
Double(f64)
Bytes(Vec<u8>)
Unknown(Vec<u8>)
Implementations§
Source§impl AnyValue
impl AnyValue
pub fn from_string(s: String) -> Self
pub fn from_str(s: &str) -> Self
pub fn from_bool(b: bool) -> Self
pub fn from_int32(i: i32) -> Self
pub fn from_int64(i: i64) -> Self
pub fn from_float(f: f32) -> Self
pub fn from_double(d: f64) -> Self
pub fn from_bytes(bytes: Vec<u8>) -> Self
pub fn from_slice(slice: &[u8]) -> Self
pub fn from_unknown(bytes: Vec<u8>) -> Self
pub fn from_unknown_slice(slice: &[u8]) -> Self
pub fn as_string(&self) -> Option<&String>
pub fn as_bool(&self) -> Option<bool>
pub fn as_int32(&self) -> Option<i32>
pub fn as_int64(&self) -> Option<i64>
pub fn as_float(&self) -> Option<f32>
pub fn as_double(&self) -> Option<f64>
pub fn as_bytes(&self) -> Option<&Vec<u8>>
pub fn as_unknown(&self) -> Option<&Vec<u8>>
pub fn is_string(&self) -> bool
pub fn is_bool(&self) -> bool
pub fn is_int32(&self) -> bool
pub fn is_int64(&self) -> bool
pub fn is_float(&self) -> bool
pub fn is_double(&self) -> bool
pub fn is_bytes(&self) -> bool
pub fn is_unknown(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AnyValue
impl RefUnwindSafe for AnyValue
impl Send for AnyValue
impl Sync for AnyValue
impl Unpin for AnyValue
impl UnwindSafe for AnyValue
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§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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request