Minimize the number of items on the rustdoc landing page.

Restructure the modules and imports to increase the signal to noise
ration on the cargo doc landing page. This includes exposing some
modules as public so that they can contain things that need to be public
but that users will rarely need to interact with. Most items from
types.rs were moved into an error.rs module that is now exposed
publicly.
This commit is contained in:
Glenn Griffin
2019-11-13 13:23:37 -08:00
parent 3aadc6b0ef
commit 0fe66619dd
9 changed files with 264 additions and 401 deletions

View File

@@ -4,7 +4,7 @@ use std::error::Error;
use std::fmt;
use std::pin::Pin;
use crate::types::{PollError, RequestError};
use crate::error::{PollError, RefreshError, RequestError};
use chrono::{DateTime, Local, Utc};
use std::time::Duration;
@@ -85,14 +85,7 @@ pub trait AuthenticatorDelegate: Send + Sync {
/// Called if we could not acquire a refresh token for a reason possibly specified
/// by the server.
/// This call is made for the delegate's information only.
fn token_refresh_failed(&self, error: &str, error_description: Option<&str>) {
{
let _ = error;
}
{
let _ = error_description;
}
}
fn token_refresh_failed(&self, _: &RefreshError) {}
}
/// FlowDelegate methods are called when an OAuth flow needs to ask the application what to do in