pub enum TypeAnnotatedValue {
Show 22 variants
Bool(bool),
S8(i32),
U8(u32),
S16(i32),
U16(u32),
S32(i32),
U32(u32),
S64(i64),
U64(u64),
F32(f32),
F64(f64),
Char(i32),
Str(String),
List(TypedList),
Tuple(TypedTuple),
Record(TypedRecord),
Flags(TypedFlags),
Variant(Box<TypedVariant>),
Enum(TypedEnum),
Option(Box<TypedOption>),
Result(Box<TypedResult>),
Handle(TypedHandle),
}
Variants§
Bool(bool)
S8(i32)
U8(u32)
S16(i32)
U16(u32)
S32(i32)
U32(u32)
S64(i64)
U64(u64)
F32(f32)
F64(f64)
Char(i32)
Str(String)
List(TypedList)
Tuple(TypedTuple)
Record(TypedRecord)
Flags(TypedFlags)
Variant(Box<TypedVariant>)
Enum(TypedEnum)
Option(Box<TypedOption>)
Result(Box<TypedResult>)
Handle(TypedHandle)
Implementations§
Source§impl TypeAnnotatedValue
impl TypeAnnotatedValue
Sourcepub fn merge(
field: &mut Option<TypeAnnotatedValue>,
tag: u32,
wire_type: WireType,
buf: &mut impl Buf,
ctx: DecodeContext,
) -> Result<(), DecodeError>
pub fn merge( field: &mut Option<TypeAnnotatedValue>, 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<'__de> BorrowDecode<'__de> for TypeAnnotatedValue
impl<'__de> BorrowDecode<'__de> for TypeAnnotatedValue
Source§fn borrow_decode<__D: BorrowDecoder<'__de>>(
decoder: &mut __D,
) -> Result<Self, DecodeError>
fn borrow_decode<__D: BorrowDecoder<'__de>>( decoder: &mut __D, ) -> Result<Self, DecodeError>
Attempt to decode this type with the given BorrowDecode.
Source§impl Clone for TypeAnnotatedValue
impl Clone for TypeAnnotatedValue
Source§fn clone(&self) -> TypeAnnotatedValue
fn clone(&self) -> TypeAnnotatedValue
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 TypeAnnotatedValue
impl Debug for TypeAnnotatedValue
Source§impl Decode for TypeAnnotatedValue
impl Decode for TypeAnnotatedValue
Source§impl<'de> Deserialize<'de> for TypeAnnotatedValue
impl<'de> Deserialize<'de> for TypeAnnotatedValue
Source§fn deserialize<D>(deserializer: D) -> Result<TypeAnnotatedValue, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<TypeAnnotatedValue, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Encode for TypeAnnotatedValue
impl Encode for TypeAnnotatedValue
Source§impl ParseFromJSON for TypeAnnotatedValue
impl ParseFromJSON for TypeAnnotatedValue
Source§fn parse_from_json(value: Option<Value>) -> ParseResult<Self>
fn parse_from_json(value: Option<Value>) -> ParseResult<Self>
Parse from
serde_json::Value
.Source§fn parse_from_json_string(s: &str) -> Result<Self, ParseError<Self>>
fn parse_from_json_string(s: &str) -> Result<Self, ParseError<Self>>
Parse from JSON string.
Source§impl PartialEq for TypeAnnotatedValue
impl PartialEq for TypeAnnotatedValue
Source§impl Serialize for TypeAnnotatedValue
impl Serialize for TypeAnnotatedValue
Source§impl ToJSON for TypeAnnotatedValue
impl ToJSON for TypeAnnotatedValue
Source§impl TryFrom<&TypeAnnotatedValue> for AnalysedType
impl TryFrom<&TypeAnnotatedValue> for AnalysedType
Source§impl TryFrom<&TypeAnnotatedValue> for Type
impl TryFrom<&TypeAnnotatedValue> for Type
Source§impl TryFrom<&ValueAndType> for TypeAnnotatedValue
impl TryFrom<&ValueAndType> for TypeAnnotatedValue
Source§impl TryFrom<TypeAnnotatedValue> for Value
impl TryFrom<TypeAnnotatedValue> for Value
Source§impl TryFrom<TypeAnnotatedValue> for ValueAndType
impl TryFrom<TypeAnnotatedValue> for ValueAndType
Source§impl TryFrom<TypeAnnotatedValue> for WitValue
impl TryFrom<TypeAnnotatedValue> for WitValue
Source§impl TryFrom<ValueAndType> for TypeAnnotatedValue
impl TryFrom<ValueAndType> for TypeAnnotatedValue
Source§impl Type for TypeAnnotatedValue
impl Type for TypeAnnotatedValue
Source§const IS_REQUIRED: bool = true
const IS_REQUIRED: bool = true
If it is
true
, it means that this type is required.Source§type RawValueType = TypeAnnotatedValue
type RawValueType = TypeAnnotatedValue
The raw type used for validator. Read more
Source§type RawElementValueType = TypeAnnotatedValue
type RawElementValueType = TypeAnnotatedValue
The raw element type used for validator.
Source§fn schema_ref() -> MetaSchemaRef
fn schema_ref() -> MetaSchemaRef
Get schema reference of this type.
Source§fn as_raw_value(&self) -> Option<&Self::RawValueType>
fn as_raw_value(&self) -> Option<&Self::RawValueType>
Returns a reference to the raw value.
Source§fn raw_element_iter<'a>(
&'a self,
) -> Box<dyn Iterator<Item = &'a Self::RawElementValueType> + 'a>
fn raw_element_iter<'a>( &'a self, ) -> Box<dyn Iterator<Item = &'a Self::RawElementValueType> + 'a>
Returns an iterator for traversing the elements.
Source§impl TypeAnnotatedValueJsonExtensions for TypeAnnotatedValue
impl TypeAnnotatedValueJsonExtensions for TypeAnnotatedValue
Source§fn parse_with_type(
json_val: &JsonValue,
typ: &AnalysedType,
) -> Result<Self, Vec<String>>
fn parse_with_type( json_val: &JsonValue, typ: &AnalysedType, ) -> Result<Self, Vec<String>>
Parses a JSON value representation (with no type information) into a typed value based
on the given type information.
Source§fn to_json_value(&self) -> JsonValue
fn to_json_value(&self) -> JsonValue
Converts a
TypeAnnotatedValue
to a JSON value representation with no type information. Read moreimpl IsObjectType for TypeAnnotatedValue
impl StructuralPartialEq for TypeAnnotatedValue
Auto Trait Implementations§
impl Freeze for TypeAnnotatedValue
impl RefUnwindSafe for TypeAnnotatedValue
impl Send for TypeAnnotatedValue
impl Sync for TypeAnnotatedValue
impl Unpin for TypeAnnotatedValue
impl UnwindSafe for TypeAnnotatedValue
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> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
Source§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
Query the “status” flags for the
self
file descriptor.Source§fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
Source§fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
Set the “status” flags for the
self
file descriptor. Read moreSource§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