MCPcopy Create free account
hub / github.com/cryptape/rust-numext / defstruct

Method defstruct

constructor/src/fixed_uint/core/constructor.rs:157–168  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

155 }
156
157 fn defstruct(&self) {
158 let name = &self.ts.name;
159 let feature = &self.ts.feature;
160 let inner_type = &self.ts.inner_type;
161 let part = quote!(
162 /// Fixed non-negative integer type.
163 #[cfg(feature = #feature)]
164 #[derive(Clone)]
165 pub struct #name(pub #inner_type);
166 );
167 self.attach_uint(part);
168 }
169
170 fn deferror(&self) {
171 let error_name = &self.ts.error_name;

Callers 1

outputMethod · 0.45

Calls 1

attach_uintMethod · 0.80

Tested by

no test coverage detected