pub struct MacroExpansionRequest {
pub code: String,
pub edition: Edition,
}
Expand description
A request to expand macros in a given Rust code snippet.
Includes the code and the selected Rust edition.
Fields§
§code: String
The Rust code containing macros to expand.
edition: Edition
The Rust edition to use for macro expansion.
Implementations§
Source§impl MacroExpansionRequest
impl MacroExpansionRequest
Sourcepub fn new(code: String, edition: Edition) -> Self
pub fn new(code: String, edition: Edition) -> Self
Creates a new MacroExpansionRequest
with the given code and edition.
§Arguments
code
- The Rust code to analyze.edition
- The Rust edition to use (e.g., 2018, 2021, 2024).
§Returns
A new MacroExpansionRequest
instance.
Trait Implementations§
Source§impl Clone for MacroExpansionRequest
impl Clone for MacroExpansionRequest
Source§fn clone(&self) -> MacroExpansionRequest
fn clone(&self) -> MacroExpansionRequest
Returns a copy of the value. Read more
1.0.0 · 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 MacroExpansionRequest
impl Debug for MacroExpansionRequest
Source§impl Default for MacroExpansionRequest
impl Default for MacroExpansionRequest
Source§fn default() -> Self
fn default() -> Self
Returns a default MacroExpansionRequest
with a simple println!
example
and the 2024 edition.
Source§impl<'de> Deserialize<'de> for MacroExpansionRequest
impl<'de> Deserialize<'de> for MacroExpansionRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for MacroExpansionRequest
impl PartialEq for MacroExpansionRequest
Source§impl Serialize for MacroExpansionRequest
impl Serialize for MacroExpansionRequest
impl Eq for MacroExpansionRequest
impl StructuralPartialEq for MacroExpansionRequest
Auto Trait Implementations§
impl Freeze for MacroExpansionRequest
impl RefUnwindSafe for MacroExpansionRequest
impl Send for MacroExpansionRequest
impl Sync for MacroExpansionRequest
impl Unpin for MacroExpansionRequest
impl UnwindSafe for MacroExpansionRequest
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
Source§impl<T> CloneDebuggableStorage for Twhere
T: DebuggableStorage + Clone,
impl<T> CloneDebuggableStorage for Twhere
T: DebuggableStorage + Clone,
fn clone_storage(&self) -> Box<dyn CloneDebuggableStorage>
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> CloneableStorage for T
impl<T> CloneableStorage for T
fn clone_storage(&self) -> Box<dyn CloneableStorage>
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.