IntoValue

Trait IntoValue 

Source
pub trait IntoValue: Sized {
    // Required methods
    fn add_to_builder<T: NodeBuilder>(self, builder: T) -> T::Result;
    fn add_to_type_builder<T: TypeNodeBuilder>(builder: T) -> T::Result;

    // Provided methods
    fn into_value(self) -> WitValue { ... }
    fn get_type() -> WitType { ... }
}
Expand description

Specific trait to convert a type into a pair of WitValue and WitType.

Required Methods§

Source

fn add_to_builder<T: NodeBuilder>(self, builder: T) -> T::Result

Source

fn add_to_type_builder<T: TypeNodeBuilder>(builder: T) -> T::Result

Provided Methods§

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl IntoValue for &str

Source§

fn add_to_builder<T: NodeBuilder>(self, builder: T) -> T::Result

Source§

fn add_to_type_builder<T: TypeNodeBuilder>(builder: T) -> T::Result

Source§

impl IntoValue for IpAddr

Source§

fn add_to_builder<B: NodeBuilder>(self, builder: B) -> B::Result

Source§

fn add_to_type_builder<B: TypeNodeBuilder>(builder: B) -> B::Result

Source§

impl IntoValue for Result<(), ()>

Source§

fn add_to_builder<T: NodeBuilder>(self, builder: T) -> T::Result

Source§

fn add_to_type_builder<T: TypeNodeBuilder>(builder: T) -> T::Result

Source§

impl IntoValue for ResourceMode

Source§

fn add_to_builder<B: NodeBuilder>(self, builder: B) -> B::Result

Source§

fn add_to_type_builder<B: TypeNodeBuilder>(builder: B) -> B::Result

Source§

impl IntoValue for WitNode

Source§

fn add_to_builder<B: NodeBuilder>(self, builder: B) -> B::Result

Source§

fn add_to_type_builder<B: TypeNodeBuilder>(builder: B) -> B::Result

Source§

impl IntoValue for WitTypeNode

Source§

fn add_to_builder<B: NodeBuilder>(self, builder: B) -> B::Result

Source§

fn add_to_type_builder<B: TypeNodeBuilder>(builder: B) -> B::Result

Source§

impl IntoValue for bool

Source§

fn add_to_builder<T: NodeBuilder>(self, builder: T) -> T::Result

Source§

fn add_to_type_builder<T: TypeNodeBuilder>(builder: T) -> T::Result

Source§

impl IntoValue for char

Source§

fn add_to_builder<T: NodeBuilder>(self, builder: T) -> T::Result

Source§

fn add_to_type_builder<T: TypeNodeBuilder>(builder: T) -> T::Result

Source§

impl IntoValue for f32

Source§

fn add_to_builder<T: NodeBuilder>(self, builder: T) -> T::Result

Source§

fn add_to_type_builder<T: TypeNodeBuilder>(builder: T) -> T::Result

Source§

impl IntoValue for f64

Source§

fn add_to_builder<T: NodeBuilder>(self, builder: T) -> T::Result

Source§

fn add_to_type_builder<T: TypeNodeBuilder>(builder: T) -> T::Result

Source§

impl IntoValue for i8

Source§

fn add_to_builder<T: NodeBuilder>(self, builder: T) -> T::Result

Source§

fn add_to_type_builder<T: TypeNodeBuilder>(builder: T) -> T::Result

Source§

impl IntoValue for i16

Source§

fn add_to_builder<T: NodeBuilder>(self, builder: T) -> T::Result

Source§

fn add_to_type_builder<T: TypeNodeBuilder>(builder: T) -> T::Result

Source§

impl IntoValue for i32

Source§

fn add_to_builder<T: NodeBuilder>(self, builder: T) -> T::Result

Source§

fn add_to_type_builder<T: TypeNodeBuilder>(builder: T) -> T::Result

Source§

impl IntoValue for i64

Source§

fn add_to_builder<T: NodeBuilder>(self, builder: T) -> T::Result

Source§

fn add_to_type_builder<T: TypeNodeBuilder>(builder: T) -> T::Result

Source§

impl IntoValue for u8

Source§

fn add_to_builder<T: NodeBuilder>(self, builder: T) -> T::Result

Source§

fn add_to_type_builder<T: TypeNodeBuilder>(builder: T) -> T::Result

Source§

impl IntoValue for u16

Source§

fn add_to_builder<T: NodeBuilder>(self, builder: T) -> T::Result

Source§

fn add_to_type_builder<T: TypeNodeBuilder>(builder: T) -> T::Result

Source§

impl IntoValue for u32

Source§

fn add_to_builder<T: NodeBuilder>(self, builder: T) -> T::Result

Source§

fn add_to_type_builder<T: TypeNodeBuilder>(builder: T) -> T::Result

Source§

impl IntoValue for u64

Source§

fn add_to_builder<T: NodeBuilder>(self, builder: T) -> T::Result

Source§

fn add_to_type_builder<T: TypeNodeBuilder>(builder: T) -> T::Result

Source§

impl IntoValue for String

Source§

fn add_to_builder<T: NodeBuilder>(self, builder: T) -> T::Result

Source§

fn add_to_type_builder<T: TypeNodeBuilder>(builder: T) -> T::Result

Source§

impl IntoValue for Duration

Source§

fn add_to_builder<B: NodeBuilder>(self, builder: B) -> B::Result

Source§

fn add_to_type_builder<B: TypeNodeBuilder>(builder: B) -> B::Result

Source§

impl IntoValue for ComponentId

Source§

fn add_to_builder<B: NodeBuilder>(self, builder: B) -> B::Result

Source§

fn add_to_type_builder<B: TypeNodeBuilder>(builder: B) -> B::Result

Source§

impl IntoValue for NamedWitTypeNode

Source§

fn add_to_builder<B: NodeBuilder>(self, builder: B) -> B::Result

Source§

fn add_to_type_builder<B: TypeNodeBuilder>(builder: B) -> B::Result

Source§

impl IntoValue for Uri

Source§

fn add_to_builder<B: NodeBuilder>(self, builder: B) -> B::Result

Source§

fn add_to_type_builder<B: TypeNodeBuilder>(builder: B) -> B::Result

Source§

impl IntoValue for Uuid

Source§

fn add_to_builder<B: NodeBuilder>(self, builder: B) -> B::Result

Source§

fn add_to_type_builder<B: TypeNodeBuilder>(builder: B) -> B::Result

Source§

impl IntoValue for ValueAndType

Source§

fn add_to_builder<B: NodeBuilder>(self, builder: B) -> B::Result

Source§

fn add_to_type_builder<B: TypeNodeBuilder>(builder: B) -> B::Result

Source§

impl IntoValue for WitType

Source§

fn add_to_builder<B: NodeBuilder>(self, builder: B) -> B::Result

Source§

fn add_to_type_builder<B: TypeNodeBuilder>(builder: B) -> B::Result

Source§

impl IntoValue for WitValue

Source§

fn add_to_builder<B: NodeBuilder>(self, builder: B) -> B::Result

Source§

fn add_to_type_builder<B: TypeNodeBuilder>(builder: B) -> B::Result

Source§

impl IntoValue for Uri

Source§

fn add_to_builder<T: NodeBuilder>(self, builder: T) -> T::Result

Source§

fn add_to_type_builder<T: TypeNodeBuilder>(builder: T) -> T::Result

Source§

impl IntoValue for NonZeroI8

Source§

fn add_to_builder<T: NodeBuilder>(self, builder: T) -> T::Result

Source§

fn add_to_type_builder<T: TypeNodeBuilder>(builder: T) -> T::Result

Source§

impl IntoValue for NonZeroI16

Source§

fn add_to_builder<T: NodeBuilder>(self, builder: T) -> T::Result

Source§

fn add_to_type_builder<T: TypeNodeBuilder>(builder: T) -> T::Result

Source§

impl IntoValue for NonZeroI32

Source§

fn add_to_builder<T: NodeBuilder>(self, builder: T) -> T::Result

Source§

fn add_to_type_builder<T: TypeNodeBuilder>(builder: T) -> T::Result

Source§

impl IntoValue for NonZeroI64

Source§

fn add_to_builder<T: NodeBuilder>(self, builder: T) -> T::Result

Source§

fn add_to_type_builder<T: TypeNodeBuilder>(builder: T) -> T::Result

Source§

impl IntoValue for NonZeroU8

Source§

fn add_to_builder<T: NodeBuilder>(self, builder: T) -> T::Result

Source§

fn add_to_type_builder<T: TypeNodeBuilder>(builder: T) -> T::Result

Source§

impl IntoValue for NonZeroU16

Source§

fn add_to_builder<T: NodeBuilder>(self, builder: T) -> T::Result

Source§

fn add_to_type_builder<T: TypeNodeBuilder>(builder: T) -> T::Result

Source§

impl IntoValue for NonZeroU32

Source§

fn add_to_builder<T: NodeBuilder>(self, builder: T) -> T::Result

Source§

fn add_to_type_builder<T: TypeNodeBuilder>(builder: T) -> T::Result

Source§

impl IntoValue for NonZeroU64

Source§

fn add_to_builder<T: NodeBuilder>(self, builder: T) -> T::Result

Source§

fn add_to_type_builder<T: TypeNodeBuilder>(builder: T) -> T::Result

Source§

impl<A: IntoValue, B: IntoValue> IntoValue for (A, B)

Source§

fn add_to_builder<T: NodeBuilder>(self, builder: T) -> T::Result

Source§

fn add_to_type_builder<T: TypeNodeBuilder>(builder: T) -> T::Result

Source§

impl<A: IntoValue, B: IntoValue, C: IntoValue> IntoValue for (A, B, C)

Source§

fn add_to_builder<T: NodeBuilder>(self, builder: T) -> T::Result

Source§

fn add_to_type_builder<T: TypeNodeBuilder>(builder: T) -> T::Result

Source§

impl<A: IntoValue, B: IntoValue, C: IntoValue, D: IntoValue> IntoValue for (A, B, C, D)

Source§

fn add_to_builder<T: NodeBuilder>(self, builder: T) -> T::Result

Source§

fn add_to_type_builder<T: TypeNodeBuilder>(builder: T) -> T::Result

Source§

impl<A: IntoValue, B: IntoValue, C: IntoValue, D: IntoValue, E: IntoValue> IntoValue for (A, B, C, D, E)

Source§

fn add_to_builder<T: NodeBuilder>(self, builder: T) -> T::Result

Source§

fn add_to_type_builder<T: TypeNodeBuilder>(builder: T) -> T::Result

Source§

impl<A: IntoValue, B: IntoValue, C: IntoValue, D: IntoValue, E: IntoValue, F: IntoValue> IntoValue for (A, B, C, D, E, F)

Source§

fn add_to_builder<T: NodeBuilder>(self, builder: T) -> T::Result

Source§

fn add_to_type_builder<T: TypeNodeBuilder>(builder: T) -> T::Result

Source§

impl<A: IntoValue, B: IntoValue, C: IntoValue, D: IntoValue, E: IntoValue, F: IntoValue, G: IntoValue> IntoValue for (A, B, C, D, E, F, G)

Source§

fn add_to_builder<T: NodeBuilder>(self, builder: T) -> T::Result

Source§

fn add_to_type_builder<T: TypeNodeBuilder>(builder: T) -> T::Result

Source§

impl<A: IntoValue, B: IntoValue, C: IntoValue, D: IntoValue, E: IntoValue, F: IntoValue, G: IntoValue, H: IntoValue> IntoValue for (A, B, C, D, E, F, G, H)

Source§

fn add_to_builder<T: NodeBuilder>(self, builder: T) -> T::Result

Source§

fn add_to_type_builder<T: TypeNodeBuilder>(builder: T) -> T::Result

Source§

impl<A: IntoValue, B: IntoValue, C: IntoValue, D: IntoValue, E: IntoValue, F: IntoValue, G: IntoValue, H: IntoValue, I: IntoValue> IntoValue for (A, B, C, D, E, F, G, H, I)

Source§

fn add_to_builder<T: NodeBuilder>(self, builder: T) -> T::Result

Source§

fn add_to_type_builder<T: TypeNodeBuilder>(builder: T) -> T::Result

Source§

impl<A: IntoValue, B: IntoValue, C: IntoValue, D: IntoValue, E: IntoValue, F: IntoValue, G: IntoValue, H: IntoValue, I: IntoValue, J: IntoValue> IntoValue for (A, B, C, D, E, F, G, H, I, J)

Source§

fn add_to_builder<T: NodeBuilder>(self, builder: T) -> T::Result

Source§

fn add_to_type_builder<T: TypeNodeBuilder>(builder: T) -> T::Result

Source§

impl<A: IntoValue, B: IntoValue, C: IntoValue, D: IntoValue, E: IntoValue, F: IntoValue, G: IntoValue, H: IntoValue, I: IntoValue, J: IntoValue, K: IntoValue> IntoValue for (A, B, C, D, E, F, G, H, I, J, K)

Source§

fn add_to_builder<T: NodeBuilder>(self, builder: T) -> T::Result

Source§

fn add_to_type_builder<T: TypeNodeBuilder>(builder: T) -> T::Result

Source§

impl<A: IntoValue, B: IntoValue, C: IntoValue, D: IntoValue, E: IntoValue, F: IntoValue, G: IntoValue, H: IntoValue, I: IntoValue, J: IntoValue, K: IntoValue, L: IntoValue> IntoValue for (A, B, C, D, E, F, G, H, I, J, K, L)

Source§

fn add_to_builder<T: NodeBuilder>(self, builder: T) -> T::Result

Source§

fn add_to_type_builder<T: TypeNodeBuilder>(builder: T) -> T::Result

Source§

impl<E: IntoValue> IntoValue for Result<(), E>

Source§

fn add_to_builder<T: NodeBuilder>(self, builder: T) -> T::Result

Source§

fn add_to_type_builder<T: TypeNodeBuilder>(builder: T) -> T::Result

Source§

impl<K: IntoValue + Ord, V: IntoValue> IntoValue for BTreeMap<K, V>

Source§

fn add_to_builder<T: NodeBuilder>(self, builder: T) -> T::Result

Source§

fn add_to_type_builder<T: TypeNodeBuilder>(builder: T) -> T::Result

Source§

impl<K: IntoValue, V: IntoValue> IntoValue for HashMap<K, V>

Source§

fn add_to_builder<T: NodeBuilder>(self, builder: T) -> T::Result

Source§

fn add_to_type_builder<T: TypeNodeBuilder>(builder: T) -> T::Result

Source§

impl<S: IntoValue> IntoValue for Result<S, ()>

Source§

fn add_to_builder<T: NodeBuilder>(self, builder: T) -> T::Result

Source§

fn add_to_type_builder<T: TypeNodeBuilder>(builder: T) -> T::Result

Source§

impl<S: IntoValue, E: IntoValue> IntoValue for Result<S, E>

Source§

fn add_to_builder<B: NodeBuilder>(self, builder: B) -> B::Result

Source§

fn add_to_type_builder<B: TypeNodeBuilder>(builder: B) -> B::Result

Source§

impl<T> IntoValue for PhantomData<T>

Source§

fn add_to_builder<B: NodeBuilder>(self, builder: B) -> B::Result

Source§

fn add_to_type_builder<B: TypeNodeBuilder>(builder: B) -> B::Result

Source§

impl<T: IntoValue + Clone> IntoValue for Rc<T>

Source§

fn add_to_builder<B: NodeBuilder>(self, builder: B) -> B::Result

Source§

fn add_to_type_builder<B: TypeNodeBuilder>(builder: B) -> B::Result

Source§

impl<T: IntoValue + Clone> IntoValue for Arc<T>

Source§

fn add_to_builder<B: NodeBuilder>(self, builder: B) -> B::Result

Source§

fn add_to_type_builder<B: TypeNodeBuilder>(builder: B) -> B::Result

Source§

impl<T: IntoValue + Eq + Hash> IntoValue for HashSet<T>

Source§

fn add_to_builder<B: NodeBuilder>(self, builder: B) -> B::Result

Source§

fn add_to_type_builder<B: TypeNodeBuilder>(builder: B) -> B::Result

Source§

impl<T: IntoValue + Ord> IntoValue for BTreeSet<T>

Source§

fn add_to_builder<B: NodeBuilder>(self, builder: B) -> B::Result

Source§

fn add_to_type_builder<B: TypeNodeBuilder>(builder: B) -> B::Result

Source§

impl<T: IntoValue> IntoValue for Bound<T>

Source§

fn add_to_builder<B: NodeBuilder>(self, builder: B) -> B::Result

Source§

fn add_to_type_builder<B: TypeNodeBuilder>(builder: B) -> B::Result

Source§

impl<T: IntoValue> IntoValue for Option<T>

Source§

fn add_to_builder<B: NodeBuilder>(self, builder: B) -> B::Result

Source§

fn add_to_type_builder<B: TypeNodeBuilder>(builder: B) -> B::Result

Source§

impl<T: IntoValue> IntoValue for LinkedList<T>

Source§

fn add_to_builder<B: NodeBuilder>(self, builder: B) -> B::Result

Source§

fn add_to_type_builder<B: TypeNodeBuilder>(builder: B) -> B::Result

Source§

impl<T: IntoValue> IntoValue for VecDeque<T>

Source§

fn add_to_builder<B: NodeBuilder>(self, builder: B) -> B::Result

Source§

fn add_to_type_builder<B: TypeNodeBuilder>(builder: B) -> B::Result

Source§

impl<T: IntoValue> IntoValue for Vec<T>

Source§

fn add_to_builder<B: NodeBuilder>(self, builder: B) -> B::Result

Source§

fn add_to_type_builder<B: TypeNodeBuilder>(builder: B) -> B::Result

Source§

impl<T: IntoValue> IntoValue for Range<T>

Source§

fn add_to_builder<B: NodeBuilder>(self, builder: B) -> B::Result

Source§

fn add_to_type_builder<B: TypeNodeBuilder>(builder: B) -> B::Result

Implementors§

Source§

impl IntoValue for Level

Source§

impl IntoValue for golem_rust::Uuid