pub trait IntoComponent: Sized {
    // Required method
    fn as_component_ref(&self) -> ComponentRef<'_>;

    // Provided method
    fn into_component(self) -> Result<Component, Error> { ... }
}
Expand description

Trait for encoding the current type into a Component.

Required Methods§

source

fn as_component_ref(&self) -> ComponentRef<'_>

Convert into a component directly.

Provided Methods§

source

fn into_component(self) -> Result<Component, Error>

Convert into component.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl IntoComponent for &&str

source§

impl IntoComponent for &str

source§

impl IntoComponent for Cow<'_, str>

source§

impl<T> IntoComponent for [T; 1]
where T: IntoComponent,

IntoCompoment implementation preserved for backwards compatibility.

Implementors§