aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe-symfony-console/src/completion/suggestion.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/shirabe-symfony-console/src/completion/suggestion.rs')
-rw-r--r--crates/shirabe-symfony-console/src/completion/suggestion.rs23
1 files changed, 23 insertions, 0 deletions
diff --git a/crates/shirabe-symfony-console/src/completion/suggestion.rs b/crates/shirabe-symfony-console/src/completion/suggestion.rs
new file mode 100644
index 00000000..a7db5c39
--- /dev/null
+++ b/crates/shirabe-symfony-console/src/completion/suggestion.rs
@@ -0,0 +1,23 @@
+//! ref: composer/vendor/symfony/console/Completion/Suggestion.php
+
+/// Represents a single suggested value.
+#[derive(Debug)]
+pub struct Suggestion {
+ value: String,
+}
+
+impl Suggestion {
+ pub fn new(value: String) -> Self {
+ Self { value }
+ }
+
+ pub fn get_value(&self) -> String {
+ self.value.clone()
+ }
+}
+
+impl std::fmt::Display for Suggestion {
+ fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+ write!(f, "{}", self.get_value())
+ }
+}