fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        if self == &Self::default() {
            // Avoid the braceless formatting used for structs with literally no fields.
            write!(f, "BlockAttributes {{}}")
        } else {
            let mut s = f.debug_struct("BlockAttributes");
            if self.display_name != Self::default().display_name {
                // Unwrap the `Cow` for tidier formatting.
                s.field("display_name", &&*self.display_name);
            }
            if self.selectable != Self::default().selectable {
                s.field("selectable", &self.selectable);
            }
            if self.collision != Self::default().collision {
                s.field("collision", &self.collision);
            }
            if self.light_emission != Self::default().light_emission {
                s.field("light_emission", &self.light_emission);
            }
            s.finish()
        }
    }
/// Only attributes which differ from the default are shown.
Only attributes which differ from the default are shown.
Only attributes which differ from the default are shown .
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        if self == &Self::default() {
            // Avoid the braceless formatting used for structs with literally no fields.
            write!(f, "BlockAttributes {{}}")
        } else {
            let mut s = f.debug_struct("BlockAttributes");
            if self.display_name != Self::default().display_name {
                // Unwrap the `Cow` for tidier formatting.
                s.field("display_name", &&*self.display_name);
            }
            if self.selectable != Self::default().selectable {
                s.field("selectable", &self.selectable);
            }
            if self.collision != Self::default().collision {
                s.field("collision", &self.collision);
            }
            if self.light_emission != Self::default().light_emission {
                s.field("light_emission", &self.light_emission);
            }
            s.finish()
        }
    }
fn fmt ( & self , f : & mut std :: fmt :: Formatter < ' _ > ) -> std :: fmt :: Result { if self == & Self :: default ( ) { // Avoid the braceless formatting used for structs with literally no fields. write ! ( f " " ) } else { let mut s = f . debug_struct ( " " ) ; if self . display_name != Self :: default ( ) . display_name { // Unwrap the `Cow` for tidier formatting. s . field ( " " , & & * self . display_name ) ; } if self . selectable != Self :: default ( ) . selectable { s . field ( " " , & self . selectable ) ; } if self . collision != Self :: default ( ) . collision { s . field ( " " , & self . collision ) ; } if self . light_emission != Self :: default ( ) . light_emission { s . field ( " " , & self . light_emission ) ; } s . finish ( ) } }
Only attributes which differ from the default are shown.
Only attributes which differ from the default are shown .
&self
f
&mut std::fmt::Formatter<'_>