Struct rune::ast::LitByteStr [−][src]
A string literal.
Fields
token: Token
The token corresponding to the literal.
source: StrSource
If the string literal is escaped.
Trait Implementations
impl Clone for LitByteStr
[src]
fn clone(&self) -> LitByteStr
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for LitByteStr
[src]
impl Eq for LitByteStr
[src]
impl Parse for LitByteStr
[src]
Parse a string literal.
Examples
use rune::{testing, ast}; testing::roundtrip::<ast::LitByteStr>("b\"hello world\""); testing::roundtrip::<ast::LitByteStr>("b\"hello\\nworld\"");
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl PartialEq<LitByteStr> for LitByteStr
[src]
fn eq(&self, other: &LitByteStr) -> bool
[src]
fn ne(&self, other: &LitByteStr) -> bool
[src]
impl<'a> Resolve<'a> for LitByteStr
[src]
type Output = Cow<'a, [u8]>
The output type being resolved into.
fn resolve(
&self,
storage: &Storage,
source: &'a Source
) -> Result<Cow<'a, [u8]>, ResolveError>
[src]
&self,
storage: &Storage,
source: &'a Source
) -> Result<Cow<'a, [u8]>, ResolveError>
impl ResolveOwned for LitByteStr
[src]
type Owned = Vec<u8>
The output type being resolved into.
fn resolve_owned(
&self,
storage: &Storage,
source: &Source
) -> Result<Self::Owned, ResolveError>
[src]
&self,
storage: &Storage,
source: &Source
) -> Result<Self::Owned, ResolveError>
impl Spanned for LitByteStr
[src]
impl StructuralEq for LitByteStr
[src]
impl StructuralPartialEq for LitByteStr
[src]
impl ToTokens for LitByteStr
[src]
fn to_tokens(&self, context: &MacroContext, stream: &mut TokenStream)
[src]
Auto Trait Implementations
impl RefUnwindSafe for LitByteStr
impl Send for LitByteStr
impl Sync for LitByteStr
impl Unpin for LitByteStr
impl UnwindSafe for LitByteStr
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,