buffalo_core.diagnostics.OperationResult
- class buffalo_core.diagnostics.OperationResult(value, diagnostics)[source]
Bases:
GenericReturn one value together with structured diagnostics.
Notes
This type is useful for workflows that should return a usable value while still exposing warnings, informational messages, or recoverable issues to the caller.
Attributes
Primary workflow return value.
Structured diagnostics emitted while producing
value.Return whether attached diagnostics contain errors.
Return whether attached diagnostics contain infos.
Return whether attached diagnostics contain warnings.
- value: T
Primary workflow return value.
- diagnostics: DiagnosticReport
Structured diagnostics emitted while producing
value.
- property has_errors: bool
Return whether attached diagnostics contain errors.
- property has_warnings: bool
Return whether attached diagnostics contain warnings.
- property has_infos: bool
Return whether attached diagnostics contain infos.