aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/xchan.rs24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/xchan.rs b/src/xchan.rs
index 2e42c39..1a5fadc 100644
--- a/src/xchan.rs
+++ b/src/xchan.rs
@@ -20,33 +20,33 @@ use serde::Serialize;
#[derive(Debug, Serialize)]
#[serde(rename_all = "lowercase")]
-enum XChanSelector<'a> {
+enum XChanRequestSelector<'a> {
Address(&'a str),
Hash(&'a str),
GUID(&'a str),
}
-pub struct XChan<'a> {
- data: Option<XChanSelector<'a>>,
+pub struct XChanRequest<'a> {
+ data: Option<XChanRequestSelector<'a>>,
}
-pub fn xchan<'a>() -> XChan<'a> {
- XChan { data: None }
+pub fn xchan<'a>() -> XChanRequest<'a> {
+ XChanRequest { data: None }
}
-impl<'a> XChan<'a> {
- pub fn by_address(&mut self, addr: &'a str) -> &mut XChan<'a> {
- self.data = Some(XChanSelector::Address(addr));
+impl<'a> XChanRequest<'a> {
+ pub fn by_address(&mut self, addr: &'a str) -> &mut XChanRequest<'a> {
+ self.data = Some(XChanRequestSelector::Address(addr));
self
}
- pub fn by_hash(&mut self, hash: &'a str) -> &mut XChan<'a> {
- self.data = Some(XChanSelector::Hash(hash));
+ pub fn by_hash(&mut self, hash: &'a str) -> &mut XChanRequest<'a> {
+ self.data = Some(XChanRequestSelector::Hash(hash));
self
}
- pub fn by_guid(&mut self, guid: &'a str) -> &mut XChan<'a> {
- self.data = Some(XChanSelector::GUID(guid));
+ pub fn by_guid(&mut self, guid: &'a str) -> &mut XChanRequest<'a> {
+ self.data = Some(XChanRequestSelector::GUID(guid));
self
}