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

Method deferror

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

Source from the content-addressed store, hash-verified

168 }
169
170 fn deferror(&self) {
171 let error_name = &self.ts.error_name;
172 let part = {
173 let errors = self.errors.take();
174 if errors.is_empty() {
175 quote!()
176 } else {
177 let errors = TokenStream::from_iter(errors);
178 quote!(
179 #[derive(Debug, Error)]
180 pub enum #error_name {
181 #errors
182 }
183 )
184 }
185 };
186 self.attach_common(part);
187 }
188
189 fn defutils(&self) {
190 let utils_name = &self.ts.utils_name;

Callers 1

outputMethod · 0.45

Calls 1

attach_commonMethod · 0.45

Tested by

no test coverage detected