pub fn fmt(&self, fmt: &mut Formatter) -> fmt::Result {
        self.fmt_imports(fmt)?;

        if !self.imports.is_empty() {
            write!(fmt, "\n")?;
        }

        for (i, item) in self.items.iter().enumerate() {
            if i != 0 {
                write!(fmt, "\n")?;
            }

            match *item {
                Item::Module(ref v) => v.fmt(fmt)?,
                Item::Struct(ref v) => v.fmt(fmt)?,
                Item::Trait(ref v) => v.fmt(fmt)?,
                Item::Enum(ref v) => v.fmt(fmt)?,
                Item::Impl(ref v) => v.fmt(fmt)?,
                Item::Function(ref v) => v.fmt(false, fmt)?,
                Item::Raw(ref v) => {
                    write!(fmt, "{}\n", v)?;
                }
            }
        }

        Ok(())
    }
/// Formats the scope using the given formatter.
Formats the scope using the given formatter.
Formats the scope using the given formatter .
pub fn fmt(&self, fmt: &mut Formatter) -> fmt::Result {
        self.fmt_imports(fmt)?;
        if !self.imports.is_empty() {
            write!(fmt, "\n")?;
        }
        for (i, item) in self.items.iter().enumerate() {
            if i != 0 {
                write!(fmt, "\n")?;
            }
            match *item {
                Item::Module(ref v) => v.fmt(fmt)?,
                Item::Struct(ref v) => v.fmt(fmt)?,
                Item::Trait(ref v) => v.fmt(fmt)?,
                Item::Enum(ref v) => v.fmt(fmt)?,
                Item::Impl(ref v) => v.fmt(fmt)?,
                Item::Function(ref v) => v.fmt(false, fmt)?,
                Item::Raw(ref v) => {
                    write!(fmt, "{}\n", v)?;
                }
            }
        }
        Ok(())
    }
pub fn fmt ( & self , fmt : & mut Formatter ) -> fmt :: Result { self . fmt_imports ( fmt ) ? ; if ! self . imports . is_empty ( ) { write ! ( fmt " \n " ) ? ; } for ( i , item ) in self . items . iter ( ) . enumerate ( ) { if i != 0 { write ! ( fmt " \n " ) ? ; } match * item { Item :: Module ( ref v ) => v . fmt ( fmt ) ? , Item :: Struct ( ref v ) => v . fmt ( fmt ) ? , Item :: Trait ( ref v ) => v . fmt ( fmt ) ? , Item :: Enum ( ref v ) => v . fmt ( fmt ) ? , Item :: Impl ( ref v ) => v . fmt ( fmt ) ? , Item :: Function ( ref v ) => v . fmt ( false , fmt ) ? , Item :: Raw ( ref v ) => { write ! ( fmt " \n " v ) ? ; } } } Ok ( ( ) ) }
Formats the scope using the given formatter.
Formats the scope using the given formatter .
&self
fmt
&mut Formatter
&self
fmt
&mut Formatter