MCPcopy Create free account
hub / github.com/apache/fory / is_tuple_struct

Function is_tuple_struct

rust/fory-derive/src/object/util.rs:57–59  ·  view source on GitHub ↗

Check if this is a tuple struct (all fields are unnamed)

(fields: &[&Field])

Source from the content-addressed store, hash-verified

55
56/// Check if this is a tuple struct (all fields are unnamed)
57pub fn is_tuple_struct(fields: &[&Field]) -> bool {
58 !fields.is_empty() && fields[0].ident.is_none()
59}
60
61thread_local! {
62 static MACRO_CONTEXT: RefCell<Option<MacroContext>> = const {RefCell::new(None)};

Callers 1

get_sorted_field_namesFunction · 0.85

Calls 2

is_emptyMethod · 0.80
is_noneMethod · 0.45

Tested by

no test coverage detected