Enum mz_dyncfg::proto_config_val::Val
source · pub enum Val {
Bool(bool),
U32(u32),
Usize(u64),
OptUsize(ProtoOptionU64),
F64(f64),
String(String),
Duration(ProtoDuration),
Json(String),
}
Variants§
Bool(bool)
U32(u32)
Usize(u64)
OptUsize(ProtoOptionU64)
F64(f64)
String(String)
Duration(ProtoDuration)
Json(String)
Switch to Protobuf’s native JSON representation, google.protobuf.Value, once prost supports it. See: https://github.com/tokio-rs/prost/issues/404
Implementations§
source§impl Val
impl Val
sourcepub fn merge(
field: &mut Option<Val>,
tag: u32,
wire_type: WireType,
buf: &mut impl Buf,
ctx: DecodeContext,
) -> Result<(), DecodeError>
pub fn merge( field: &mut Option<Val>, tag: u32, wire_type: WireType, buf: &mut impl Buf, ctx: DecodeContext, ) -> Result<(), DecodeError>
Decodes an instance of the message from a buffer, and merges it into self.
sourcepub fn encoded_len(&self) -> usize
pub fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
Trait Implementations§
source§impl Arbitrary for Val
impl Arbitrary for Val
§type Parameters = (<bool as Arbitrary>::Parameters, <u32 as Arbitrary>::Parameters, <u64 as Arbitrary>::Parameters, <ProtoOptionU64 as Arbitrary>::Parameters, <f64 as Arbitrary>::Parameters, <String as Arbitrary>::Parameters, <ProtoDuration as Arbitrary>::Parameters, <String as Arbitrary>::Parameters)
type Parameters = (<bool as Arbitrary>::Parameters, <u32 as Arbitrary>::Parameters, <u64 as Arbitrary>::Parameters, <ProtoOptionU64 as Arbitrary>::Parameters, <f64 as Arbitrary>::Parameters, <String as Arbitrary>::Parameters, <ProtoDuration as Arbitrary>::Parameters, <String as Arbitrary>::Parameters)
The type of parameters that
arbitrary_with
accepts for configuration
of the generated Strategy
. Parameters must implement Default
.§type Strategy = Union<BoxedStrategy<Val>>
type Strategy = Union<BoxedStrategy<Val>>
The type of
Strategy
used to generate values of type Self
.source§fn arbitrary_with(_top: Self::Parameters) -> Self::Strategy
fn arbitrary_with(_top: Self::Parameters) -> Self::Strategy
source§impl<'de> Deserialize<'de> for Val
impl<'de> Deserialize<'de> for Val
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Val
Auto Trait Implementations§
impl Freeze for Val
impl RefUnwindSafe for Val
impl Send for Val
impl Sync for Val
impl Unpin for Val
impl UnwindSafe for Val
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> FutureExt for T
impl<T> FutureExt for T
source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<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> 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
source§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<P, R> ProtoType<R> for Pwhere
R: RustType<P>,
impl<P, R> ProtoType<R> for Pwhere
R: RustType<P>,
source§fn into_rust(self) -> Result<R, TryFromProtoError>
fn into_rust(self) -> Result<R, TryFromProtoError>
See
RustType::from_proto
.source§fn from_rust(rust: &R) -> P
fn from_rust(rust: &R) -> P
See
RustType::into_proto
.