summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crates/core/tedge_api/src/address.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/crates/core/tedge_api/src/address.rs b/crates/core/tedge_api/src/address.rs
index 96239216..3e215211 100644
--- a/crates/core/tedge_api/src/address.rs
+++ b/crates/core/tedge_api/src/address.rs
@@ -9,6 +9,13 @@ pub struct Address {
}
impl Address {
+ pub fn new(endpoint: EndpointKind) -> Address {
+ Self {
+ endpoint,
+ source: None,
+ }
+ }
+
/// Get the original source of an `Address`
pub fn origin(&self) -> &Address {
if let Some(source) = self.source.as_ref() {
@@ -34,5 +41,3 @@ pub enum EndpointKind {
/// A specific plugin
Plugin { id: String },
}
-
-