Struct slack_morphism::listener::SlackOAuthListenerConfig
source · 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
impl SlackOAuthListenerConfig
pub fn new( client_id: SlackClientId, client_secret: SlackClientSecret, bot_scope: String, redirect_callback_host: String ) -> Self
pub fn client_id(&mut self, value: SlackClientId) -> &mut Self
pub fn with_client_id(self, value: SlackClientId) -> Self
pub fn client_secret(&mut self, value: SlackClientSecret) -> &mut Self
pub fn with_client_secret(self, value: SlackClientSecret) -> Self
pub fn bot_scope(&mut self, value: String) -> &mut Self
pub fn with_bot_scope(self, value: String) -> Self
pub fn redirect_callback_host(&mut self, value: String) -> &mut Self
pub fn with_redirect_callback_host(self, value: String) -> Self
pub fn install_path(&mut self, value: String) -> &mut Self
pub fn with_install_path(self, value: String) -> Self
pub fn redirect_callback_path(&mut self, value: String) -> &mut Self
pub fn with_redirect_callback_path(self, value: String) -> Self
pub fn redirect_installed_url(&mut self, value: String) -> &mut Self
pub fn with_redirect_installed_url(self, value: String) -> Self
pub fn redirect_cancelled_url(&mut self, value: String) -> &mut Self
pub fn with_redirect_cancelled_url(self, value: String) -> Self
pub fn redirect_error_redirect_url(&mut self, value: String) -> &mut Self
pub fn with_redirect_error_redirect_url(self, value: String) -> Self
source§impl SlackOAuthListenerConfig
impl SlackOAuthListenerConfig
pub const DEFAULT_INSTALL_PATH_VALUE: &'static str = "/auth/install"
pub const DEFAULT_CALLBACK_PATH_VALUE: &'static str = "/auth/callback"
pub const DEFAULT_INSTALLED_URL_VALUE: &'static str = "/installed"
pub const DEFAULT_CANCELLED_URL_VALUE: &'static str = "/cancelled"
pub const DEFAULT_ERROR_URL_VALUE: &'static str = "/error"
pub const OAUTH_AUTHORIZE_URL_VALUE: &'static str = "https://slack.com/oauth/v2/authorize"
pub fn to_redirect_url(&self) -> ClientResult<Url>
Trait Implementations§
source§impl Clone for SlackOAuthListenerConfig
impl Clone for SlackOAuthListenerConfig
source§fn clone(&self) -> SlackOAuthListenerConfig
fn clone(&self) -> SlackOAuthListenerConfig
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for SlackOAuthListenerConfig
impl Debug for SlackOAuthListenerConfig
source§impl From<SlackOAuthListenerConfigInit> for SlackOAuthListenerConfig
impl From<SlackOAuthListenerConfigInit> for SlackOAuthListenerConfig
source§fn from(value: SlackOAuthListenerConfigInit) -> Self
fn from(value: SlackOAuthListenerConfigInit) -> Self
Converts to this type from the input type.
source§impl PartialEq for SlackOAuthListenerConfig
impl PartialEq for SlackOAuthListenerConfig
source§fn eq(&self, other: &SlackOAuthListenerConfig) -> bool
fn eq(&self, other: &SlackOAuthListenerConfig) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for SlackOAuthListenerConfig
impl StructuralEq for SlackOAuthListenerConfig
impl StructuralPartialEq for SlackOAuthListenerConfig
Auto Trait Implementations§
impl RefUnwindSafe for SlackOAuthListenerConfig
impl Send for SlackOAuthListenerConfig
impl Sync for SlackOAuthListenerConfig
impl Unpin for SlackOAuthListenerConfig
impl UnwindSafe for SlackOAuthListenerConfig
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