From fd9bf0e62e44c43564b1353d757def9b62840e54 Mon Sep 17 00:00:00 2001 From: Eddie Whiteside Date: Wed, 13 Dec 2023 14:32:50 +0000 Subject: [PATCH] Allow user to get url for web source (#29) When implementing a custom source that wraps web source, I'd like to be able to retrieve the url of the web source. This is useful so I can cleanly log which web source is returning an error when there are multiple. --- src/source.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/source.rs b/src/source.rs index cc8fcd0..ca77bed 100644 --- a/src/source.rs +++ b/src/source.rs @@ -25,6 +25,10 @@ impl WebSource { pub fn builder() -> WebSourceBuilder { WebSourceBuilder::new() } + + pub fn url(&self) -> &Url { + &self.url + } } #[async_trait]