pub struct SlackOAuthListenerConfig {
    pub client_id: SlackClientId,
    pub client_secret: SlackClientSecret,
    pub bot_scope: String,
    pub redirect_callback_host: String,
    pub install_path: String,
    pub redirect_callback_path: String,
    pub redirect_installed_url: String,
    pub redirect_cancelled_url: String,
    pub redirect_error_redirect_url: String,
}

Fields§

§client_id: SlackClientId§client_secret: SlackClientSecret§bot_scope: String§redirect_callback_host: String§install_path: String§redirect_callback_path: String§redirect_installed_url: String§redirect_cancelled_url: String§redirect_error_redirect_url: String

Implementations§

source§

impl SlackOAuthListenerConfig

source

pub fn new( client_id: SlackClientId, client_secret: SlackClientSecret, bot_scope: String, redirect_callback_host: String ) -> Self

source

pub fn client_id(&mut self, value: SlackClientId) -> &mut Self

source

pub fn with_client_id(self, value: SlackClientId) -> Self

source

pub fn client_secret(&mut self, value: SlackClientSecret) -> &mut Self

source

pub fn with_client_secret(self, value: SlackClientSecret) -> Self

source

pub fn bot_scope(&mut self, value: String) -> &mut Self

source

pub fn with_bot_scope(self, value: String) -> Self

source

pub fn redirect_callback_host(&mut self, value: String) -> &mut Self

source

pub fn with_redirect_callback_host(self, value: String) -> Self

source

pub fn install_path(&mut self, value: String) -> &mut Self

source

pub fn with_install_path(self, value: String) -> Self

source

pub fn redirect_callback_path(&mut self, value: String) -> &mut Self

source

pub fn with_redirect_callback_path(self, value: String) -> Self

source

pub fn redirect_installed_url(&mut self, value: String) -> &mut Self

source

pub fn with_redirect_installed_url(self, value: String) -> Self

source

pub fn redirect_cancelled_url(&mut self, value: String) -> &mut Self

source

pub fn with_redirect_cancelled_url(self, value: String) -> Self

source

pub fn redirect_error_redirect_url(&mut self, value: String) -> &mut Self

source

pub fn with_redirect_error_redirect_url(self, value: String) -> Self

source§

impl SlackOAuthListenerConfig

source

pub const DEFAULT_INSTALL_PATH_VALUE: &'static str = "/auth/install"

source

pub const DEFAULT_CALLBACK_PATH_VALUE: &'static str = "/auth/callback"

source

pub const DEFAULT_INSTALLED_URL_VALUE: &'static str = "/installed"

source

pub const DEFAULT_CANCELLED_URL_VALUE: &'static str = "/cancelled"

source

pub const DEFAULT_ERROR_URL_VALUE: &'static str = "/error"

source

pub const OAUTH_AUTHORIZE_URL_VALUE: &'static str = "https://slack.com/oauth/v2/authorize"

source

pub fn to_redirect_url(&self) -> ClientResult<Url>

Trait Implementations§

source§

impl Clone for SlackOAuthListenerConfig

source§

fn clone(&self) -> SlackOAuthListenerConfig

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for SlackOAuthListenerConfig

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<SlackOAuthListenerConfigInit> for SlackOAuthListenerConfig

source§

fn from(value: SlackOAuthListenerConfigInit) -> Self

Converts to this type from the input type.
source§

impl PartialEq for SlackOAuthListenerConfig

source§

fn eq(&self, other: &SlackOAuthListenerConfig) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Eq for SlackOAuthListenerConfig

source§

impl StructuralPartialEq for SlackOAuthListenerConfig

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more