pub enum QuoteWat<'a> {
Wat(Wat<'a>),
QuoteModule(Span, Vec<(Span, &'a [u8])>),
QuoteComponent(Span, Vec<(Span, &'a [u8])>),
}
Variants§
Implementations§
source§impl<'a> QuoteWat<'a>
impl<'a> QuoteWat<'a>
sourcepub fn encode(&mut self) -> Result<Vec<u8>, Error>
pub fn encode(&mut self) -> Result<Vec<u8>, Error>
Encodes this module to bytes, either by encoding the module directly or parsing the contents and then encoding it.
sourcepub fn to_test(&mut self) -> Result<QuoteWatTest, Error>
pub fn to_test(&mut self) -> Result<QuoteWatTest, Error>
Converts this to either a QuoteWatTest::Binary
or
QuoteWatTest::Text
depending on what it is internally.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for QuoteWat<'a>
impl<'a> RefUnwindSafe for QuoteWat<'a>
impl<'a> Send for QuoteWat<'a>
impl<'a> Sync for QuoteWat<'a>
impl<'a> Unpin for QuoteWat<'a>
impl<'a> UnwindSafe for QuoteWat<'a>
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