File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
crates/stackable-versioned-macros/src/codegen/container Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -381,20 +381,27 @@ impl ToTokens for KubernetesCrateOptions {
381381 }
382382}
383383
384+ /// Wraps a value to indicate whether it is original or has been overridden.
384385#[ derive( Debug ) ]
385386pub ( crate ) struct Override < T > {
386387 is_overridden : bool ,
387388 inner : T ,
388389}
389390
390391impl < T > Override < T > {
392+ /// Mark a value as a default.
393+ ///
394+ /// This is used to indicate that the value is a default and was not overridden.
391395 pub ( crate ) fn new_default ( inner : T ) -> Self {
392396 Override {
393397 is_overridden : false ,
394398 inner,
395399 }
396400 }
397401
402+ /// Mark a value as overridden.
403+ ///
404+ /// This is used to indicate that the value was overridden and not the default.
398405 pub ( crate ) fn new_custom ( inner : T ) -> Self {
399406 Override {
400407 is_overridden : true ,
You can’t perform that action at this time.
0 commit comments