pub struct GeneratedLiteral { /* private fields */ }Expand description
One exact literal form carried from declared Rust into generated Rust.
The private value is admitted only through its typed constructors or the preserved-fragment road.
Implementations§
Source§impl GeneratedLiteral
impl GeneratedLiteral
Sourcepub fn number(spelling: &str) -> Result<Self, GeneratedLiteralRefusal>
pub fn number(spelling: &str) -> Result<Self, GeneratedLiteralRefusal>
Admit one exact numeric-literal spelling already recognized by the capture owner.
§Errors
Returns GeneratedLiteralRefusal::NotANumber where the spelling is not one numeric literal.
Sourcepub fn nul_terminated_text(
material: &[u8],
) -> Result<Self, GeneratedLiteralRefusal>
pub fn nul_terminated_text( material: &[u8], ) -> Result<Self, GeneratedLiteralRefusal>
Admit C-string material without its terminating NUL.
§Errors
Returns GeneratedLiteralRefusal::InteriorNul where the material contains a NUL byte.
Trait Implementations§
Source§impl Clone for GeneratedLiteral
impl Clone for GeneratedLiteral
Source§fn clone(&self) -> GeneratedLiteral
fn clone(&self) -> GeneratedLiteral
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GeneratedLiteral
impl Debug for GeneratedLiteral
impl Eq for GeneratedLiteral
Source§impl Hash for GeneratedLiteral
impl Hash for GeneratedLiteral
Source§impl PartialEq for GeneratedLiteral
impl PartialEq for GeneratedLiteral
impl StructuralPartialEq for GeneratedLiteral
Auto Trait Implementations§
impl Freeze for GeneratedLiteral
impl RefUnwindSafe for GeneratedLiteral
impl Send for GeneratedLiteral
impl Sync for GeneratedLiteral
impl Unpin for GeneratedLiteral
impl UnsafeUnpin for GeneratedLiteral
impl UnwindSafe for GeneratedLiteral
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