#[non_exhaustive]pub struct LiteralExpr {
pub kind: LiteralKind,
pub value: Option<String>,
pub interpolated: Option<bool>,
pub element_count: Option<usize>,
pub pair_count: Option<usize>,
}Expand description
Literal expression shell payload.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.kind: LiteralKindLiteral category.
value: Option<String>Preserved value for compact scalar literals.
interpolated: Option<bool>Whether the literal can interpolate variables.
element_count: Option<usize>Element count for aggregate literals.
pair_count: Option<usize>Pair count for hash literals.
Trait Implementations§
Source§impl Clone for LiteralExpr
impl Clone for LiteralExpr
Source§fn clone(&self) -> LiteralExpr
fn clone(&self) -> LiteralExpr
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 LiteralExpr
impl Debug for LiteralExpr
impl Eq for LiteralExpr
Source§impl PartialEq for LiteralExpr
impl PartialEq for LiteralExpr
Source§fn eq(&self, other: &LiteralExpr) -> bool
fn eq(&self, other: &LiteralExpr) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for LiteralExpr
Auto Trait Implementations§
impl Freeze for LiteralExpr
impl RefUnwindSafe for LiteralExpr
impl Send for LiteralExpr
impl Sync for LiteralExpr
impl Unpin for LiteralExpr
impl UnsafeUnpin for LiteralExpr
impl UnwindSafe for LiteralExpr
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