pub struct LogoutResource<'a> { /* private fields */ }Expand description
client.logout()
Implementations§
Source§impl<'a> LogoutResource<'a>
impl<'a> LogoutResource<'a>
Sourcepub fn create(&self) -> Result<()>
pub fn create(&self) -> Result<()>
End the current browser session
POST /logout
Deletes the current session cookie, destroys the server-side session and resets the current user to anonymous. Also usable to leave a pending two-factor login. This affects the current session only; it does not revoke persistent login tokens or OAuth tokens. A subsequent request still carrying such an Authorization header may authenticate again. An unauthenticated request without an applicable session may be rejected by authentication middleware.
§Example
client.logout().create()?;Trait Implementations§
Source§impl<'a> Clone for LogoutResource<'a>
impl<'a> Clone for LogoutResource<'a>
impl<'a> Copy for LogoutResource<'a>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for LogoutResource<'a>
impl<'a> !UnwindSafe for LogoutResource<'a>
impl<'a> Freeze for LogoutResource<'a>
impl<'a> Send for LogoutResource<'a>
impl<'a> Sync for LogoutResource<'a>
impl<'a> Unpin for LogoutResource<'a>
impl<'a> UnsafeUnpin for LogoutResource<'a>
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