Enum json5format::Comment [−][src]
Represents the variations of allowable comments.
Variants
Represents a comment read from a /* */ pattern.
Fields of Block
lines: Vec<String>The content of the block comment, represented as a String for each line.
align: boolalign (if true) indicates that all comment lines started in a column after the
star’s column in the opening /*. For each subsequent line in lines, the spaces from
column 0 to the star’s column will be stripped, allowing the indent spaces to be
restored, during format, relative to the block’s new horizontal position. Otherwise, the
original indentation will not be stripped, and the lines will be restored at their
original horizontal position. In either case, lines after the opening /* will retain
their original horizontal alignment, relative to one another.
Line(String)Represents a comment read from a line starting with //.
Represents a blank line between data.
Implementations
impl Comment[src]
pub fn is_block(&self) -> bool[src]
Returns true if the Comment instance is a Block variant.
pub fn is_line(&self) -> bool[src]
Returns true if the Comment instance is a Line variant.
pub fn is_break(&self) -> bool[src]
Returns true if the Comment instance is a Break variant.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Comment
impl Send for Comment
impl Sync for Comment
impl Unpin for Comment
impl UnwindSafe for Comment
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, 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>,