pub struct StructExpr {
pub name: String,
pub fields: Vec<StructExprField>,
}Expand description
A struct literal expression.
Struct expressions create structured objects with named fields,
e.g., Person{name: "Alice", age: 30}.
Fields§
§name: StringThe name of the struct type.
fields: Vec<StructExprField>The fields of the struct.
Trait Implementations§
Source§impl Debug for StructExpr
impl Debug for StructExpr
Source§impl From<&StructExpr> for StructExpr
impl From<&StructExpr> for StructExpr
Source§fn from(value: &StructExpr) -> Self
fn from(value: &StructExpr) -> Self
Converts to this type from the input type.
Source§impl From<UniquePtr<StructExpr>> for StructExpr
impl From<UniquePtr<StructExpr>> for StructExpr
Source§fn from(value: UniquePtr<StructExpr>) -> Self
fn from(value: UniquePtr<StructExpr>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for StructExpr
impl RefUnwindSafe for StructExpr
impl Send for StructExpr
impl Sync for StructExpr
impl Unpin for StructExpr
impl UnwindSafe for StructExpr
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more