pub struct Config {
pub app_id: String,
pub app_secret: String,
pub token: String,
pub encoding_aes_key: Option<String>,
}Expand description
WeChat Official Account SDK configuration.
Fields§
§app_id: StringThe AppID from WeChat Official Account settings.
app_secret: StringThe AppSecret from WeChat Official Account settings.
token: StringThe Token used for server callback signature verification.
encoding_aes_key: Option<String>The EncodingAESKey for message encryption/decryption (optional).
Implementations§
Source§impl Config
impl Config
Sourcepub fn new(
app_id: impl Into<String>,
app_secret: impl Into<String>,
token: impl Into<String>,
) -> Self
pub fn new( app_id: impl Into<String>, app_secret: impl Into<String>, token: impl Into<String>, ) -> Self
Create a new Config.
app_id: AppID from WeChat Official Account settingsapp_secret: AppSecret from WeChat Official Account settingstoken: Token for server callback signature verification (set in 服务器配置)
pub fn with_encoding_aes_key(self, key: impl Into<String>) -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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