MCPcopy Create free account
hub / github.com/devashishdxt/cli-table / new

Method new

cli-table-derive/src/context/fields.rs:15–23  ·  view source on GitHub ↗
(input: &DeriveInput)

Source from the content-addressed store, hash-verified

13
14impl Fields {
15 pub fn new(input: &DeriveInput) -> Result<Self> {
16 match input.data {
17 Data::Struct(ref data_struct) => Self::from_fields(&data_struct.fields),
18 _ => Err(Error::new_spanned(
19 input,
20 "`cli_table` derive macros can only be used on structs",
21 )),
22 }
23 }
24
25 pub fn into_iter(self) -> impl Iterator<Item = Field> {
26 self.fields.into_iter()

Callers

nothing calls this directly

Calls 10

get_attributesFunction · 0.85
colorMethod · 0.80
orderMethod · 0.80
display_fnMethod · 0.80
customize_fnMethod · 0.80
titleMethod · 0.45
justifyMethod · 0.45
alignMethod · 0.45
boldMethod · 0.45
buildMethod · 0.45

Tested by

no test coverage detected