[−][src]Struct axon_parser::ast::Line
Represents a line of Axon code, including the indentation at the start of the line.
Fields
indent: Indent
The indentation of the line (excluding the Axon code).
line: String
The remaining part of the line (excluding the indentation).
Implementations
impl Line
[src]
pub fn new(indent: Indent, line: String) -> Self
[src]
pub fn grouped(&self) -> Line
[src]
Return a new line with parentheses added around it.
pub fn inner_str(&self) -> &str
[src]
Return the contents of this line, excluding the indent.
pub fn indent(&self) -> &Indent
[src]
Return the indent of this line.
pub fn prefix_str(&self, prefix: &str) -> Self
[src]
Return a new line with the string prefixed to the start of the contents of this line.
pub fn suffix_str(&self, suffix: &str) -> Self
[src]
Return a new line with the string suffixed to the end of the line.
pub fn len(&self) -> usize
[src]
The number of characters in this line, including indentation.
Trait Implementations
impl Clone for Line
[src]
impl Debug for Line
[src]
impl Display for Line
[src]
impl PartialEq<Line> for Line
[src]
impl StructuralPartialEq for Line
[src]
Auto Trait Implementations
impl RefUnwindSafe for Line
[src]
impl Send for Line
[src]
impl Sync for Line
[src]
impl Unpin for Line
[src]
impl UnwindSafe for Line
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,