pub struct IdentString(pub String);
Expand description
Extracts a string from an ident.
§Example
let IdentString(string) = quote!(rust).into_iter().extract()?;
assert_eq!(string, "rust");
Tuple Fields§
§0: String
Trait Implementations§
Source§impl Borrow<str> for IdentString
impl Borrow<str> for IdentString
Source§impl Debug for IdentString
impl Debug for IdentString
Source§impl Default for IdentString
impl Default for IdentString
Source§fn default() -> IdentString
fn default() -> IdentString
Returns the “default value” for a type. Read more
Source§impl From<Ident> for IdentString
impl From<Ident> for IdentString
Source§impl FromMacro for IdentString
impl FromMacro for IdentString
Source§impl Hash for IdentString
impl Hash for IdentString
Source§impl PartialEq for IdentString
impl PartialEq for IdentString
Source§impl ToTokens for IdentString
impl ToTokens for IdentString
Source§fn to_tokens(&self, tokens: &mut TokenStream)
fn to_tokens(&self, tokens: &mut TokenStream)
Source§fn to_token_stream(&self) -> TokenStream
fn to_token_stream(&self) -> TokenStream
Source§fn into_token_stream(self) -> TokenStreamwhere
Self: Sized,
fn into_token_stream(self) -> TokenStreamwhere
Self: Sized,
impl Eq for IdentString
impl StructuralPartialEq for IdentString
Auto Trait Implementations§
impl Freeze for IdentString
impl RefUnwindSafe for IdentString
impl Send for IdentString
impl Sync for IdentString
impl Unpin for IdentString
impl UnwindSafe for IdentString
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