pub enum Boilerplate {
TrivialBody,
Forwarding,
MacroRepetition,
GuardedDispatch,
ConfiguredAnswer,
}Expand description
A recognised boilerplate shape.
Variants§
TrivialBody
No call and no control flow, with at most one statement: getters, setters and stubs. The body moves a value and does nothing else.
Forwarding
One call and no work around it: a wrapper that delegates. The locals it declares and the value it hands back are part of spelling the call, not of doing something with it.
MacroRepetition
A body that is nothing but macro invocations, at least two of them. What the macros expand to is unknown here — the repetition itself is the observation.
GuardedDispatch
One guard and then an answer on each side of it, with nothing else: the unit chooses between two results rather than producing one.
ConfiguredAnswer
Several answers with nothing in the code choosing between them: the build configuration picks one and the rest are never compiled.
Implementations§
Trait Implementations§
Source§impl Clone for Boilerplate
impl Clone for Boilerplate
Source§fn clone(&self) -> Boilerplate
fn clone(&self) -> Boilerplate
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for Boilerplate
Source§impl Debug for Boilerplate
impl Debug for Boilerplate
impl Eq for Boilerplate
Source§impl Ord for Boilerplate
impl Ord for Boilerplate
Source§fn cmp(&self, other: &Boilerplate) -> Ordering
fn cmp(&self, other: &Boilerplate) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for Boilerplate
impl PartialEq for Boilerplate
Source§impl PartialOrd for Boilerplate
impl PartialOrd for Boilerplate
impl StructuralPartialEq for Boilerplate
Auto Trait Implementations§
impl Freeze for Boilerplate
impl RefUnwindSafe for Boilerplate
impl Send for Boilerplate
impl Sync for Boilerplate
impl Unpin for Boilerplate
impl UnsafeUnpin for Boilerplate
impl UnwindSafe for Boilerplate
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.