pub struct Tx5InitConfig {
pub tracing_enabled: bool,
pub ephemeral_udp_port_min: u16,
pub ephemeral_udp_port_max: u16,
}Expand description
Initial configuration. If you would like to change this from the default, please call Tx5InitConfig::set_as_global_default before creating any peer connections.
Fields§
§tracing_enabled: boolIf true, tracing logs from the backend webrtc library will be included.
Defaults to false.
ephemeral_udp_port_min: u16The minimum ephemeral udp port to bind. Defaults to 1.
ephemeral_udp_port_max: u16The maximum ephemeral udp port to bind. Defaults to 65535.
Implementations§
Source§impl Tx5InitConfig
impl Tx5InitConfig
Sourcepub fn set_as_global_default(&self) -> Result<(), Error>
pub fn set_as_global_default(&self) -> Result<(), Error>
Call this to set tx5_init defaults before creating any peer connections. This will return an error if the settings have already been set.
Sourcepub fn get() -> Tx5InitConfig
pub fn get() -> Tx5InitConfig
Get the currently set Tx5InitConfig. WARNING! If it hasn’t been explicitly set, this get will trigger the config to be set to default values.
Trait Implementations§
Source§impl Clone for Tx5InitConfig
impl Clone for Tx5InitConfig
Source§fn clone(&self) -> Tx5InitConfig
fn clone(&self) -> Tx5InitConfig
Returns a duplicate 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 Tx5InitConfig
impl Debug for Tx5InitConfig
Source§impl Default for Tx5InitConfig
impl Default for Tx5InitConfig
Source§fn default() -> Tx5InitConfig
fn default() -> Tx5InitConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for Tx5InitConfig
impl<'de> Deserialize<'de> for Tx5InitConfig
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Tx5InitConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Tx5InitConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for Tx5InitConfig
impl Serialize for Tx5InitConfig
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Copy for Tx5InitConfig
Auto Trait Implementations§
impl Freeze for Tx5InitConfig
impl RefUnwindSafe for Tx5InitConfig
impl Send for Tx5InitConfig
impl Sync for Tx5InitConfig
impl Unpin for Tx5InitConfig
impl UnwindSafe for Tx5InitConfig
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