pub struct HttpTransparencyLogClient { /* private fields */ }Expand description
HTTP-based Transparency Log client.
Implementations§
Source§impl HttpTransparencyLogClient
impl HttpTransparencyLogClient
Sourcepub fn with_base_url(base_url: impl AsRef<str>) -> Result<Self, TlogError>
pub fn with_base_url(base_url: impl AsRef<str>) -> Result<Self, TlogError>
Create a new client with a base URL for agent ID lookups.
§Errors
Returns TlogError::InvalidUrl if the URL cannot be parsed.
Sourcepub fn with_timeout(self, timeout: Duration) -> Self
pub fn with_timeout(self, timeout: Duration) -> Self
Set the request timeout.
Sourcepub fn with_header(
self,
name: impl Into<String>,
value: impl Into<String>,
) -> Self
pub fn with_header( self, name: impl Into<String>, value: impl Into<String>, ) -> Self
Add a custom header to include with every request.
Invalid header names or values will cause an error when making requests.
Sourcepub fn with_headers(
self,
headers: impl IntoIterator<Item = (impl Into<String>, impl Into<String>)>,
) -> Self
pub fn with_headers( self, headers: impl IntoIterator<Item = (impl Into<String>, impl Into<String>)>, ) -> Self
Add multiple custom headers to include with every request.
Invalid header names or values will cause an error when making requests.
Trait Implementations§
Source§impl Debug for HttpTransparencyLogClient
impl Debug for HttpTransparencyLogClient
Source§impl Default for HttpTransparencyLogClient
impl Default for HttpTransparencyLogClient
Source§impl TransparencyLogClient for HttpTransparencyLogClient
impl TransparencyLogClient for HttpTransparencyLogClient
Source§fn fetch_badge<'life0, 'life1, 'async_trait>(
&'life0 self,
url: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Badge, TlogError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn fetch_badge<'life0, 'life1, 'async_trait>(
&'life0 self,
url: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Badge, TlogError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Fetch a badge by its full URL.
Auto Trait Implementations§
impl Freeze for HttpTransparencyLogClient
impl !RefUnwindSafe for HttpTransparencyLogClient
impl Send for HttpTransparencyLogClient
impl Sync for HttpTransparencyLogClient
impl Unpin for HttpTransparencyLogClient
impl UnsafeUnpin for HttpTransparencyLogClient
impl !UnwindSafe for HttpTransparencyLogClient
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more