pub struct WitValue {
pub nodes: Vec<WitNode>,
}Expand description
Describes an arbitrary value
Fields§
§nodes: Vec<WitNode>The list of wit-node values that make up the value. The list is always non-empty,
and the first element is the root node describing the value. Because WIT does not support
recursive types, further nodes are pushed into this list, and referenced by index from their parent node.
Trait Implementations§
Source§impl<'a> Arbitrary<'a> for WitValue
Available on crate feature host only.
impl<'a> Arbitrary<'a> for WitValue
Available on crate feature
host only.Source§fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self>
Generate an arbitrary value of
Self from the given unstructured data. Read moreSource§fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
Generate an arbitrary value of
Self from the entirety of the given
unstructured data. Read moreSource§fn size_hint(depth: usize) -> (usize, Option<usize>)
fn size_hint(depth: usize) -> (usize, Option<usize>)
Get a size hint for how many bytes out of an
Unstructured this type
needs to construct itself. Read moreSource§fn try_size_hint(
depth: usize,
) -> Result<(usize, Option<usize>), MaxRecursionReached>
fn try_size_hint( depth: usize, ) -> Result<(usize, Option<usize>), MaxRecursionReached>
Get a size hint for how many bytes out of an
Unstructured this type
needs to construct itself. Read moreSource§impl<'de, Context> BorrowDecode<'de, Context> for WitValue
impl<'de, Context> BorrowDecode<'de, Context> for WitValue
Source§fn borrow_decode<D: BorrowDecoder<'de, Context = Context>>(
decoder: &mut D,
) -> Result<Self, DecodeError>
fn borrow_decode<D: BorrowDecoder<'de, Context = Context>>( decoder: &mut D, ) -> Result<Self, DecodeError>
Attempt to decode this type with the given BorrowDecode.
Source§impl<'de> Deserialize<'de> for WitValue
impl<'de> Deserialize<'de> for WitValue
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
Source§impl From<ValueAndType> for WitValue
Available on crate feature host only.
impl From<ValueAndType> for WitValue
Available on crate feature
host only.Source§fn from(value_and_type: ValueAndType) -> Self
fn from(value_and_type: ValueAndType) -> Self
Converts to this type from the input type.
Source§impl IntoValue for WitValue
Available on crate feature host only.
impl IntoValue for WitValue
Available on crate feature
host only.fn into_value(self) -> Value
fn get_type() -> AnalysedType
Source§impl TryFrom<ValueAndType> for WitValue
impl TryFrom<ValueAndType> for WitValue
Source§impl<'a: 'b, 'b> WitValueExtractor<'a, 'b> for WitValue
impl<'a: 'b, 'b> WitValueExtractor<'a, 'b> for WitValue
fn u8(&self) -> Option<u8>
fn u16(&self) -> Option<u16>
fn u32(&self) -> Option<u32>
fn u64(&self) -> Option<u64>
fn s8(&self) -> Option<i8>
fn s16(&self) -> Option<i16>
fn s32(&self) -> Option<i32>
fn s64(&self) -> Option<i64>
fn f32(&self) -> Option<f32>
fn f64(&self) -> Option<f64>
fn char(&self) -> Option<char>
fn bool(&self) -> Option<bool>
fn string(&'a self) -> Option<&'b str>
fn field(&'a self, field_idx: usize) -> Option<WitNodePointer<'b>>
fn variant(&'a self) -> Option<(u32, Option<WitNodePointer<'b>>)>
fn enum_value(&'a self) -> Option<u32>
fn flags(&'a self) -> Option<&'b [bool]>
fn tuple_element(&'a self, element_idx: usize) -> Option<WitNodePointer<'b>>
fn list_elements<R>( &'a self, f: impl Fn(WitNodePointer<'b>) -> R, ) -> Option<Vec<R>>
fn option(&'a self) -> Option<Option<WitNodePointer<'b>>>
fn result( &'a self, ) -> Option<Result<Option<WitNodePointer<'b>>, Option<WitNodePointer<'b>>>>
fn handle(&'a self) -> Option<(Uri, u64)>
impl ComponentType for WitValue
impl Lift for WitValue
impl Lower for WitValue
Auto Trait Implementations§
impl Freeze for WitValue
impl RefUnwindSafe for WitValue
impl Send for WitValue
impl Sync for WitValue
impl Unpin for WitValue
impl UnwindSafe for WitValue
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