pub struct AntiPattern {
pub name: String,
pub description: String,
pub domain: String,
pub why_avoid: String,
pub better_alternative: String,
}Expand description
An anti-pattern
This struct represents an anti-pattern (something to avoid), including why it should be avoided and better alternatives.
§Examples
ⓘ
use ricecoder_agents::domain::AntiPattern;
let anti_pattern = AntiPattern {
name: "God Object".to_string(),
description: "A class that does too much".to_string(),
domain: "backend".to_string(),
why_avoid: "Violates single responsibility principle".to_string(),
better_alternative: "Break into smaller, focused classes".to_string(),
};Fields§
§name: StringAnti-pattern name
description: StringAnti-pattern description
domain: StringDomain this anti-pattern applies to
why_avoid: StringWhy this anti-pattern should be avoided
better_alternative: StringBetter alternative to use instead
Trait Implementations§
Source§impl Clone for AntiPattern
impl Clone for AntiPattern
Source§fn clone(&self) -> AntiPattern
fn clone(&self) -> AntiPattern
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AntiPattern
impl Debug for AntiPattern
Source§impl<'de> Deserialize<'de> for AntiPattern
impl<'de> Deserialize<'de> for AntiPattern
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for AntiPattern
impl RefUnwindSafe for AntiPattern
impl Send for AntiPattern
impl Sync for AntiPattern
impl Unpin for AntiPattern
impl UnwindSafe for AntiPattern
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