graph: Implement Deref to &String for SubgraphDeploymentId
@@ -8,6 +8,7 @@ use serde::de;
use serde::ser;
use serde_yaml;
use std::fmt;
+use std::ops::Deref;
use std::str::FromStr;
use std::sync::Arc;
use tokio::prelude::*;
@@ -60,6 +61,14 @@ impl SubgraphDeploymentId {
}
}
+impl Deref for SubgraphDeploymentId {
+ type Target = String;
+
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+
impl fmt::Display for SubgraphDeploymentId {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
self.0.fmt(f)
