Skip to content

Commit

Permalink
Allow user to get url for web source (#29)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
EddieWhi authored Dec 13, 2023
1 parent 2269552 commit fd9bf0e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ impl WebSource {
pub fn builder() -> WebSourceBuilder {
WebSourceBuilder::new()
}

pub fn url(&self) -> &Url {
&self.url
}
}

#[async_trait]
Expand Down

0 comments on commit fd9bf0e

Please sign in to comment.