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.0.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