pub enum Piece {
Text(String),
Value(String),
Number,
Plural {
name: String,
branches: Vec<(String, Vec<Piece>)>,
},
Date {
name: String,
pattern: String,
},
Duration {
name: String,
pattern: String,
},
}Expand description
One part of a parsed text.
Variants§
Text(String)
Value(String)
{name}.
Number
# in a plural branch: the number.
Plural
Fields
Date
Duration
Trait Implementations§
impl StructuralPartialEq for Piece
Auto Trait Implementations§
impl Freeze for Piece
impl RefUnwindSafe for Piece
impl Send for Piece
impl Sync for Piece
impl Unpin for Piece
impl UnsafeUnpin for Piece
impl UnwindSafe for Piece
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