pub enum Child {
Static {
child: &'static Signature,
},
Dynamic {
child: Box<Signature>,
},
}Expand description
A child signature of a container signature.
Variants§
Implementations§
Methods from Deref<Target = Signature>§
Sourcepub fn string_len(&self) -> usize
pub fn string_len(&self) -> usize
The size of the string form of self.
Sourcepub fn write_as_string_no_parens(&self, write: &mut impl Write) -> Result
pub fn write_as_string_no_parens(&self, write: &mut impl Write) -> Result
Write the string form of self to the given formatter.
This produces the same output as the Display::fmt, unless self is a
Signature::Structure, in which case the written string will not be wrapped in
parenthesis (()).
Sourcepub fn to_string_no_parens(&self) -> String
pub fn to_string_no_parens(&self) -> String
Convert self to a string, without any enclosing parenthesis.
This produces the same output as the Signature::to_string, unless self is a
Signature::Structure, in which case the written string will not be wrapped in
parenthesis (()).
Sourcepub fn to_string(&self) -> String
pub fn to_string(&self) -> String
Convert self to a string.
This produces the same output as the ToString::to_string, except it preallocates the
required memory and hence avoids reallocations and moving of data.
Sourcepub fn alignment(&self, format: Format) -> usize
pub fn alignment(&self, format: Format) -> usize
The required padding alignment for the given format.