pub struct TurnConfig {
pub relay_port_range: String,
pub realm: String,
pub turn_secret: String,
}Expand description
TURN 服务配置
TURN 中继服务的专用配置参数。
Fields§
§relay_port_range: String中继端口范围
TURN 服务用于数据中继的 UDP 端口范围。 格式:开始端口-结束端口,如 “49152-65535”。 范围越大,可支持的并发中继会话越多。
realm: StringTURN 认证域
TURN 服务的认证域名,用于 TURN 协议的认证机制。
turn_secret: StringTURN 共享密钥(HMAC 时效凭证)
用于生成和验证 TURN 时效凭证(coturn –use-auth-secret 兼容格式)。 AIS 生成 TurnCredential 时使用此密钥,TURN 服务器验证时使用相同密钥。
Trait Implementations§
Source§impl Clone for TurnConfig
impl Clone for TurnConfig
Source§fn clone(&self) -> TurnConfig
fn clone(&self) -> TurnConfig
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 moreSource§impl Debug for TurnConfig
impl Debug for TurnConfig
Source§impl Default for TurnConfig
impl Default for TurnConfig
Source§impl<'de> Deserialize<'de> for TurnConfig
impl<'de> Deserialize<'de> for TurnConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for TurnConfig
impl PartialEq for TurnConfig
Source§impl Serialize for TurnConfig
impl Serialize for TurnConfig
impl StructuralPartialEq for TurnConfig
Auto Trait Implementations§
impl Freeze for TurnConfig
impl RefUnwindSafe for TurnConfig
impl Send for TurnConfig
impl Sync for TurnConfig
impl Unpin for TurnConfig
impl UnsafeUnpin for TurnConfig
impl UnwindSafe for TurnConfig
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request