pub enum PythonLit {
Int(i64),
Float(f64),
Str(String),
Bool(bool),
None,
Bytes(Vec<u8>),
Ellipsis,
}Expand description
Python literal value.
Variants§
Int(i64)
Integer literal: 42, -7
Float(f64)
Float literal: 3.14, -0.5
Str(String)
String literal: "hello" or 'hello'
Bool(bool)
Boolean literal: True or False
None
None literal
Bytes(Vec<u8>)
Bytes literal: b"data"
Ellipsis
Ellipsis: ...
Trait Implementations§
impl StructuralPartialEq for PythonLit
Auto Trait Implementations§
impl Freeze for PythonLit
impl RefUnwindSafe for PythonLit
impl Send for PythonLit
impl Sync for PythonLit
impl Unpin for PythonLit
impl UnsafeUnpin for PythonLit
impl UnwindSafe for PythonLit
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