pub struct PrettyDocument {
pub fields: Vec<PrettyField>,
pub materials: Vec<PrettyMaterial>,
pub laws: Vec<PrettyLaw>,
}Expand description
A document of pretty-printable declarations.
Fields§
§fields: Vec<PrettyField>§materials: Vec<PrettyMaterial>§laws: Vec<PrettyLaw>Implementations§
Source§impl PrettyDocument
impl PrettyDocument
Sourcepub fn add_field(&mut self, f: PrettyField) -> &mut Self
pub fn add_field(&mut self, f: PrettyField) -> &mut Self
Adds field.
Sourcepub fn add_material(&mut self, m: PrettyMaterial) -> &mut Self
pub fn add_material(&mut self, m: PrettyMaterial) -> &mut Self
Adds material.
Sourcepub fn format(&self, opts: &PrettyOptions) -> String
pub fn format(&self, opts: &PrettyOptions) -> String
Format the entire document.
Trait Implementations§
Source§impl Clone for PrettyDocument
impl Clone for PrettyDocument
Source§impl Debug for PrettyDocument
impl Debug for PrettyDocument
Auto Trait Implementations§
impl Freeze for PrettyDocument
impl RefUnwindSafe for PrettyDocument
impl Send for PrettyDocument
impl Sync for PrettyDocument
impl Unpin for PrettyDocument
impl UnsafeUnpin for PrettyDocument
impl UnwindSafe for PrettyDocument
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