pub enum ValueKind {
Signed(i64),
Unsigned(u64),
Float(f32),
Double(f64),
Bool(bool),
String(String),
Bytes(Vec<u8>),
}
Expand description
The different kinds of values that can be emitted.
Variants§
Signed(i64)
A signed integer.
Unsigned(u64)
An unsigned integer.
Float(f32)
A 32-bit floating point.
Double(f64)
A 64-bit floating point.
Bool(bool)
A Boolean value.
String(String)
A string.
Bytes(Vec<u8>)
Opaque binary data.
Trait Implementations§
source§impl<'arbitrary> Arbitrary<'arbitrary> for ValueKind
impl<'arbitrary> Arbitrary<'arbitrary> for ValueKind
source§fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
Generate an arbitrary value of
Self
from the given unstructured data. Read moresource§fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
Generate an arbitrary value of
Self
from the entirety of the given
unstructured data. Read moresource§impl DefaultEncoding for ValueKind
impl DefaultEncoding for ValueKind
source§type Encoding = OneofEncoder
type Encoding = OneofEncoder
The encoding to use for the serialization. Read more
source§impl DescribeOneof for ValueKind
impl DescribeOneof for ValueKind
source§const DESCRIPTION: MessageDescription<'static> = _
const DESCRIPTION: MessageDescription<'static> = _
The protobuf message description for this type.
source§impl From<NonZero<i16>> for ValueKind
impl From<NonZero<i16>> for ValueKind
source§fn from(v: NonZeroI16) -> Self
fn from(v: NonZeroI16) -> Self
Converts to this type from the input type.
source§impl From<NonZero<i32>> for ValueKind
impl From<NonZero<i32>> for ValueKind
source§fn from(v: NonZeroI32) -> Self
fn from(v: NonZeroI32) -> Self
Converts to this type from the input type.
source§impl From<NonZero<i64>> for ValueKind
impl From<NonZero<i64>> for ValueKind
source§fn from(v: NonZeroI64) -> Self
fn from(v: NonZeroI64) -> Self
Converts to this type from the input type.
source§impl From<NonZero<isize>> for ValueKind
impl From<NonZero<isize>> for ValueKind
source§fn from(v: NonZeroIsize) -> Self
fn from(v: NonZeroIsize) -> Self
Converts to this type from the input type.
source§impl From<NonZero<u16>> for ValueKind
impl From<NonZero<u16>> for ValueKind
source§fn from(v: NonZeroU16) -> Self
fn from(v: NonZeroU16) -> Self
Converts to this type from the input type.
source§impl From<NonZero<u32>> for ValueKind
impl From<NonZero<u32>> for ValueKind
source§fn from(v: NonZeroU32) -> Self
fn from(v: NonZeroU32) -> Self
Converts to this type from the input type.
source§impl From<NonZero<u64>> for ValueKind
impl From<NonZero<u64>> for ValueKind
source§fn from(v: NonZeroU64) -> Self
fn from(v: NonZeroU64) -> Self
Converts to this type from the input type.
source§impl From<NonZero<usize>> for ValueKind
impl From<NonZero<usize>> for ValueKind
source§fn from(v: NonZeroUsize) -> Self
fn from(v: NonZeroUsize) -> Self
Converts to this type from the input type.
source§impl<'encoding> OneofDecode<'encoding, Resource> for ValueKind
impl<'encoding> OneofDecode<'encoding, Resource> for ValueKind
source§fn read_variant(
item: &mut InplaceOption<'_, Self>,
n: u32,
field: FieldReader<'encoding, '_, Resource>,
) -> Result<()>
fn read_variant( item: &mut InplaceOption<'_, Self>, n: u32, field: FieldReader<'encoding, '_, Resource>, ) -> Result<()>
Read the specified variant from the reader.
source§impl OneofEncode<Resource> for ValueKind
impl OneofEncode<Resource> for ValueKind
source§fn write_variant(self, writer: MessageWriter<'_, '_, Resource>)
fn write_variant(self, writer: MessageWriter<'_, '_, Resource>)
Write the variant to the writer.
source§fn compute_variant_size(&mut self, sizer: MessageSizer<'_>)
fn compute_variant_size(&mut self, sizer: MessageSizer<'_>)
Compute the size of the variant.
impl Downcast<ValueKind> for ValueKind
impl StructuralPartialEq for ValueKind
Auto Trait Implementations§
impl Freeze for ValueKind
impl RefUnwindSafe for ValueKind
impl Send for ValueKind
impl Sync for ValueKind
impl Unpin for ValueKind
impl UnwindSafe for ValueKind
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
)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> MeshField for Twhere
T: DefaultEncoding + Any + Send + 'static,
<T as DefaultEncoding>::Encoding: FieldEncode<T, Resource> + for<'a> FieldDecode<'a, T, Resource> + Send + Sync,
impl<T> MeshField for Twhere
T: DefaultEncoding + Any + Send + 'static,
<T as DefaultEncoding>::Encoding: FieldEncode<T, Resource> + for<'a> FieldDecode<'a, T, Resource> + Send + Sync,
type Encoding = <T as DefaultEncoding>::Encoding
source§impl<T> MeshPayload for Twhere
T: DefaultEncoding + Any + Send + 'static,
<T as DefaultEncoding>::Encoding: MessageEncode<T, Resource> + for<'a> MessageDecode<'a, T, Resource> + FieldEncode<T, Resource> + for<'a> FieldDecode<'a, T, Resource> + Send + Sync,
impl<T> MeshPayload for Twhere
T: DefaultEncoding + Any + Send + 'static,
<T as DefaultEncoding>::Encoding: MessageEncode<T, Resource> + for<'a> MessageDecode<'a, T, Resource> + FieldEncode<T, Resource> + for<'a> FieldDecode<'a, T, Resource> + Send + Sync,
type Encoding = <T as DefaultEncoding>::Encoding
source§impl<T> SerializeMessage for Twhere
T: MeshPayload,
impl<T> SerializeMessage for Twhere
T: MeshPayload,
source§fn compute_message_size(&mut self, sizer: MessageSizer<'_>)
fn compute_message_size(&mut self, sizer: MessageSizer<'_>)
Computes the message size, as in
MessageEncode::compute_message_size
.source§fn write_message(self, writer: MessageWriter<'_, '_, Resource>)
fn write_message(self, writer: MessageWriter<'_, '_, Resource>)
Writes the message, as in
MessageEncode::write_message
.source§fn extract(self) -> <T as SerializeMessage>::Concrete
fn extract(self) -> <T as SerializeMessage>::Concrete
Extract the concrete message.