pub struct UntypedValue<'source> { /* private fields */ }Expand description
An UntypedValue is a parsed but not type-checked WAVE value.
Implementations§
source§impl<'source> UntypedValue<'source>
impl<'source> UntypedValue<'source>
sourcepub fn parse(source: &'source str) -> Result<Self, ParserError>
pub fn parse(source: &'source str) -> Result<Self, ParserError>
Parses an untyped value from WAVE.
sourcepub fn into_owned(self) -> UntypedValue<'static>
pub fn into_owned(self) -> UntypedValue<'static>
Creates an owned value, copying the entire source string if necessary.
sourcepub fn to_wasm_value<V: WasmValue>(
&self,
ty: &V::Type,
) -> Result<V, ParserError>
pub fn to_wasm_value<V: WasmValue>( &self, ty: &V::Type, ) -> Result<V, ParserError>
Converts this untyped value into the given typed value.
Trait Implementations§
source§impl<'source> Clone for UntypedValue<'source>
impl<'source> Clone for UntypedValue<'source>
source§fn clone(&self) -> UntypedValue<'source>
fn clone(&self) -> UntypedValue<'source>
Returns a copy of the value. Read more
1.6.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl<'source> Debug for UntypedValue<'source>
impl<'source> Debug for UntypedValue<'source>
Auto Trait Implementations§
impl<'source> Freeze for UntypedValue<'source>
impl<'source> RefUnwindSafe for UntypedValue<'source>
impl<'source> Send for UntypedValue<'source>
impl<'source> Sync for UntypedValue<'source>
impl<'source> Unpin for UntypedValue<'source>
impl<'source> UnwindSafe for UntypedValue<'source>
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)