pub type SharedLiteral<'a> = Literal<&'a str>;
Expand description
A literal whose underlying buffer is borrowed.
Aliased Type§
enum SharedLiteral<'a> {
Bool(BoolLit),
Integer(IntegerLit<&'a str>),
Float(FloatLit<&'a str>),
Char(CharLit<&'a str>),
String(StringLit<&'a str>),
Byte(ByteLit<&'a str>),
ByteString(ByteStringLit<&'a str>),
}
Variants§
Bool(BoolLit)
Integer(IntegerLit<&'a str>)
Float(FloatLit<&'a str>)
Char(CharLit<&'a str>)
String(StringLit<&'a str>)
Byte(ByteLit<&'a str>)
ByteString(ByteStringLit<&'a str>)
Implementations
Source§impl Literal<&str>
impl Literal<&str>
Sourcepub fn into_owned(self) -> OwnedLiteral
pub fn into_owned(self) -> OwnedLiteral
Makes a copy of the underlying buffer and returns the owned version of
Self
.
Trait Implementations
Source§impl<B: Buffer> From<ByteStringLit<B>> for Literal<B>
impl<B: Buffer> From<ByteStringLit<B>> for Literal<B>
Source§fn from(src: ByteStringLit<B>) -> Self
fn from(src: ByteStringLit<B>) -> Self
Converts to this type from the input type.
Source§impl<B: Buffer> From<IntegerLit<B>> for Literal<B>
impl<B: Buffer> From<IntegerLit<B>> for Literal<B>
Source§fn from(src: IntegerLit<B>) -> Self
fn from(src: IntegerLit<B>) -> Self
Converts to this type from the input type.