pub struct TencentSmsConfig {
pub secret_id: String,
pub secret_key: String,
pub app_id: String,
pub default_sign_name: Option<String>,
pub region: String,
pub endpoint: String,
}Expand description
腾讯云短信配置 — 对齐 tencentcloud/tencentcloud-sdk-php SmsClient
对齐 PHP SDK TencentCloud\Sms\V20210111\Models\SendSmsRequest 的配置项。
Fields§
§secret_id: StringSecretId(必填)
secret_key: StringSecretKey(必填)
app_id: String短信 AppId(必填,如 1400000000)
default_sign_name: Option<String>默认短信签名(可选,如 鲜视达科技)
region: String地域(默认 ap-guangzhou)
endpoint: StringAPI 端点(默认 sms.tencentcloudapi.com)
Implementations§
Source§impl TencentSmsConfig
impl TencentSmsConfig
Sourcepub fn new(
secret_id: impl Into<String>,
secret_key: impl Into<String>,
app_id: impl Into<String>,
) -> Self
pub fn new( secret_id: impl Into<String>, secret_key: impl Into<String>, app_id: impl Into<String>, ) -> Self
Sourcepub fn with_default_sign_name(self, sign_name: impl Into<String>) -> Self
pub fn with_default_sign_name(self, sign_name: impl Into<String>) -> Self
设置默认短信签名
Sourcepub fn with_region(self, region: impl Into<String>) -> Self
pub fn with_region(self, region: impl Into<String>) -> Self
设置地域
Sourcepub fn with_endpoint(self, endpoint: impl Into<String>) -> Self
pub fn with_endpoint(self, endpoint: impl Into<String>) -> Self
设置 API 端点
Trait Implementations§
Source§impl Clone for TencentSmsConfig
impl Clone for TencentSmsConfig
Source§fn clone(&self) -> TencentSmsConfig
fn clone(&self) -> TencentSmsConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for TencentSmsConfig
impl RefUnwindSafe for TencentSmsConfig
impl Send for TencentSmsConfig
impl Sync for TencentSmsConfig
impl Unpin for TencentSmsConfig
impl UnsafeUnpin for TencentSmsConfig
impl UnwindSafe for TencentSmsConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.