pub enum FStringPart {
Literal(String),
Expr(PythonExpr),
ExprWithFormat(PythonExpr, String),
}Expand description
Part of an f-string.
Variants§
Literal(String)
Raw string text
Expr(PythonExpr)
Interpolated expression: {expr}
ExprWithFormat(PythonExpr, String)
Interpolated expression with format spec: {expr:.2f}
Trait Implementations§
Source§impl Clone for FStringPart
impl Clone for FStringPart
Source§fn clone(&self) -> FStringPart
fn clone(&self) -> FStringPart
Returns a duplicate 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 FStringPart
impl Debug for FStringPart
Source§impl PartialEq for FStringPart
impl PartialEq for FStringPart
impl StructuralPartialEq for FStringPart
Auto Trait Implementations§
impl Freeze for FStringPart
impl RefUnwindSafe for FStringPart
impl Send for FStringPart
impl Sync for FStringPart
impl Unpin for FStringPart
impl UnsafeUnpin for FStringPart
impl UnwindSafe for FStringPart
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