WMG6NJS2FJNZOHOTZB3QPYFNQC46BR3CGMIVIOEFEZ4IU2O2UE7QC
NKY55VUWEFCLIBDXMLEPPWJWDL44OV52S62AHOXZ232GHB73C54QC
OX4PDDAAYMNRVC2HNEILNGDSHPQPPOMNBIBQCRW7NE6QFKFKB4XAC
MV45TA67UIMNWDVRJUENF6JRRDCXYAUP2KJRUTUMBY3V2SSY6THAC
RPYFPVVK6EQGDFVCKLMCZUITZ3CP26X4PWCTM2BGTZQVDIAJKOFAC
use std::fmt::{self, Display, Formatter};
#[derive(Clone, Copy, Debug, PartialEq, Eq)]#[non_exhaustive]pub enum AuthAccessType { Read, Write,}
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[non_exhaustive]
pub enum AuthAccessType {
Read,
Write,
}
}}impl AuthAccessType { pub fn as_str(&self) -> &'static str { match *self { AuthAccessType::Read => "read", AuthAccessType::Write => "write", } }}impl AsRef<str> for AuthAccessType { fn as_ref(&self) -> &str { self.as_str()
impl AuthAccessType {
pub fn as_str(&self) -> &'static str {
match *self {
AuthAccessType::Read => "read",
AuthAccessType::Write => "write",
impl AsRef<str> for AuthAccessType {
fn as_ref(&self) -> &str {
self.as_str()
impl Display for AuthAccessType { fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { f.write_str(self.as_ref()) }}
impl Display for AuthAccessType {
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
f.write_str(self.as_ref())
x_auth_access_type: Option<AuthAccessType>,
let req = request_token_request(client_credentials.as_ref());
let req = request_token_request(client_credentials.as_ref(), x_auth_access_type);
fn request_token_request(client_credentials: Credentials<&str>) -> http::Request<()> {
fn request_token_request( client_credentials: Credentials<&str>, x_auth_access_type: Option<AuthAccessType>,) -> http::Request<()> {
fn request_token_request(
client_credentials: Credentials<&str>,
) -> http::Request<()> {
#[derive(oauth::Request)] struct RequestToken { x_auth_access_type: Option<AuthAccessType>, }
#[derive(oauth::Request)]
struct RequestToken {
.post(URI, &());
.post(URI, &RequestToken { x_auth_access_type });