pub struct TradeOffs {
pub extensibility: Rating,
pub performance: Rating,
pub complexity: Rating,
pub breaking_change: bool,
pub affected_files: Vec<PathBuf>,
}Expand description
Trade-off analysis for a design choice.
Provides a structured view of the pros/cons of each choice to help users make informed decisions.
Fields§
§extensibility: RatingHow easy it is to extend this design later.
performance: RatingRuntime performance characteristics.
complexity: RatingImplementation complexity.
breaking_change: boolWhether this change breaks existing API.
affected_files: Vec<PathBuf>Files that will be affected by this choice.
Implementations§
Source§impl TradeOffs
impl TradeOffs
Sourcepub fn default_medium() -> TradeOffs
pub fn default_medium() -> TradeOffs
Create trade-offs with all medium ratings and no breaking change.
Sourcepub fn with_extensibility(self, rating: Rating) -> TradeOffs
pub fn with_extensibility(self, rating: Rating) -> TradeOffs
Builder method to set extensibility.
Sourcepub fn with_performance(self, rating: Rating) -> TradeOffs
pub fn with_performance(self, rating: Rating) -> TradeOffs
Builder method to set performance.
Sourcepub fn with_complexity(self, rating: Rating) -> TradeOffs
pub fn with_complexity(self, rating: Rating) -> TradeOffs
Builder method to set complexity.
Sourcepub fn with_breaking_change(self, breaking: bool) -> TradeOffs
pub fn with_breaking_change(self, breaking: bool) -> TradeOffs
Builder method to set breaking change flag.
Sourcepub fn with_affected_files(self, files: Vec<PathBuf>) -> TradeOffs
pub fn with_affected_files(self, files: Vec<PathBuf>) -> TradeOffs
Builder method to add affected files.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TradeOffs
impl<'de> Deserialize<'de> for TradeOffs
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<TradeOffs, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<TradeOffs, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for TradeOffs
impl Serialize for TradeOffs
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for TradeOffs
impl RefUnwindSafe for TradeOffs
impl Send for TradeOffs
impl Sync for TradeOffs
impl Unpin for TradeOffs
impl UnsafeUnpin for TradeOffs
impl UnwindSafe for TradeOffs
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<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more