Trait rune::compile::IntoComponent
source · 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§
sourcefn as_component_ref(&self) -> ComponentRef<'_>
fn as_component_ref(&self) -> ComponentRef<'_>
Convert into a component directly.
Provided Methods§
sourcefn into_component(self) -> Result<Component, Error>
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
impl IntoComponent for &&str
fn as_component_ref(&self) -> ComponentRef<'_>
fn into_component(self) -> Result<Component, Error>
source§impl IntoComponent for &str
impl IntoComponent for &str
fn as_component_ref(&self) -> ComponentRef<'_>
fn into_component(self) -> Result<Component, Error>
source§impl IntoComponent for Cow<'_, str>
impl IntoComponent for Cow<'_, str>
fn as_component_ref(&self) -> ComponentRef<'_>
fn into_component(self) -> Result<Component, Error>
source§impl<T> IntoComponent for [T; 1]where
T: IntoComponent,
impl<T> IntoComponent for [T; 1]where
T: IntoComponent,
IntoCompoment implementation preserved for backwards compatibility.