pub enum Cirru {
Leaf(Arc<str>),
List(Vec<Cirru>),
}Expand description
Cirru uses nested Vecters and Strings as data structure
Variants§
Implementations§
Source§impl Cirru
impl Cirru
Sourcepub fn format_one_liner(&self) -> Result<String, String>
pub fn format_one_liner(&self) -> Result<String, String>
Formats this expression into a single line of Cirru code.
Note: only list expressions can be formatted as an expression.
For Cirru::Leaf, this returns an error.
Sourcepub fn is_nested(&self) -> bool
pub fn is_nested(&self) -> bool
check if it contains nested lists
true for a (b)
false for a b c
Sourcepub fn is_comment(&self) -> bool
pub fn is_comment(&self) -> bool
expression of ; a or ;; a are treated as comment
Trait Implementations§
Source§impl<'__de, __Context> BorrowDecode<'__de, __Context> for Cirru
impl<'__de, __Context> BorrowDecode<'__de, __Context> for Cirru
Source§fn borrow_decode<__D: BorrowDecoder<'__de, Context = __Context>>(
decoder: &mut __D,
) -> Result<Self, DecodeError>
fn borrow_decode<__D: BorrowDecoder<'__de, Context = __Context>>( decoder: &mut __D, ) -> Result<Self, DecodeError>
Attempt to decode this type with the given BorrowDecode.
Source§impl CirruOneLinerExt for Cirru
impl CirruOneLinerExt for Cirru
Source§impl<'de> Deserialize<'de> for Cirru
impl<'de> Deserialize<'de> for Cirru
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Ord for Cirru
impl Ord for Cirru
Source§impl PartialOrd for Cirru
impl PartialOrd for Cirru
impl Eq for Cirru
impl StructuralPartialEq for Cirru
Auto Trait Implementations§
impl Freeze for Cirru
impl RefUnwindSafe for Cirru
impl Send for Cirru
impl Sync for Cirru
impl Unpin for Cirru
impl UnwindSafe for Cirru
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