pub struct SetStructLiteralBaseOp {
pub struct_name: String,
pub base_expr: String,
pub struct_path: Option<String>,
}Expand description
Add or set the base expression (..expr) on struct literals
e.g., adds ..Default::default() to Foo { a: 1 } → Foo { a: 1, ..Default::default() }
Fields§
§struct_name: String§base_expr: StringThe base expression (e.g., “Default::default()” or just “default”) If “default”, expands to “Default::default()”
struct_path: Option<String>Trait Implementations§
Source§impl Clone for SetStructLiteralBaseOp
impl Clone for SetStructLiteralBaseOp
Source§fn clone(&self) -> SetStructLiteralBaseOp
fn clone(&self) -> SetStructLiteralBaseOp
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 SetStructLiteralBaseOp
impl Debug for SetStructLiteralBaseOp
Source§impl<'de> Deserialize<'de> for SetStructLiteralBaseOp
impl<'de> Deserialize<'de> for SetStructLiteralBaseOp
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
Auto Trait Implementations§
impl Freeze for SetStructLiteralBaseOp
impl RefUnwindSafe for SetStructLiteralBaseOp
impl Send for SetStructLiteralBaseOp
impl Sync for SetStructLiteralBaseOp
impl Unpin for SetStructLiteralBaseOp
impl UnsafeUnpin for SetStructLiteralBaseOp
impl UnwindSafe for SetStructLiteralBaseOp
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