quantrs2_tytan/visual_problem_builder/visualproblem_traits.rs
1//! # VisualProblem - Trait Implementations
2//!
3//! This module contains trait implementations for `VisualProblem`.
4//!
5//! ## Implemented Traits
6//!
7//! - `Default`
8//! - `Display`
9//!
10//! 🤖 Generated with [SplitRS](https://github.com/cool-japan/splitrs)
11
12use super::types::VisualProblem;
13use std::fmt;
14
15impl Default for VisualProblem {
16 fn default() -> Self {
17 Self::new()
18 }
19}
20
21impl fmt::Display for VisualProblem {
22 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
23 write!(
24 f,
25 "Problem '{}': {} variables, {} constraints",
26 self.metadata.name,
27 self.variables.len(),
28 self.constraints.len()
29 )
30 }
31}