pub enum ScopeMode {
Expand,
SubExpand,
AutoBraceSemi,
}
Expand description
The scope mode for the product expansion. This defines how scopes are handled at the top level.
Variants§
Expand
Expand products in all scopes, including the root scope.
SubExpand
Expand products in sub-scopes but not in the root scope. Thus one has to insert at
least one manual scope with ${ }
to expand products.
AutoBraceSemi
Insert scopes automatically and close/expand them after a ending brace or a semicolon. Then start a new scope This is convenient when a lot structs or impls shall be independently expanded.
§Example
impl Foo for $((First)(Second)) { }
impl Bar for $((Third)(Fourth)) { }
will treat each impl item as it is surrounded by it own scope and expand to:
impl Foo for First { }
impl Foo for Second { }
impl Bar for Third { }
impl Bar for Fourth { }
Auto Trait Implementations§
impl Freeze for ScopeMode
impl RefUnwindSafe for ScopeMode
impl Send for ScopeMode
impl Sync for ScopeMode
impl Unpin for ScopeMode
impl UnwindSafe for ScopeMode
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