pub struct Client { /* private fields */ }Expand description
The HTTP side of the contract: one JSON POST per event to an auth server.
connect admits a session and hands back the lease::Consumer it holds; a task
behind it re-POSTs revalidate on the grant’s cadence, applies each reply, revokes
when the server refuses, answers an invalid grant, or the grant expires, and POSTs
end when the session closes.
Implementations§
Source§impl Client
impl Client
Sourcepub fn new(url: Url, tls: Option<ClientConfig>) -> Result<Self>
pub fn new(url: Url, tls: Option<ClientConfig>) -> Result<Self>
A client for the server at url.
http:// is accepted for a loopback host only; https:// presents tls, the
caller’s client identity and roots; unix:// speaks HTTP over the socket at
the URL’s path. Anything else is refused here rather than at the first session.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Client
impl !UnwindSafe for Client
impl Freeze for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl UnsafeUnpin for Client
Blanket Implementations§
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