pub struct SessionConfig {
pub address: String,
pub port: u16,
pub pem_filepath: PathBuf,
pub max_channels: u32,
}
Expand description
Configuration for the session
You can use the default configuration by calling SessionConfig::default
,
use orchestra_toolkit::*;
/// see [`Session`]
fn connect() -> anyhow::Result<Session> {
let mut config = SessionConfig::default();
config.address = "prod.ledr.io".to_string();
Session::initialize(config)
}
/// see [`SessionAsync`]
async fn connect_async() -> anyhow::Result<SessionAsync> {
let mut config = SessionConfig::default();
config.address = "prod.ledr.io".to_string();
SessionAsync::initialize(config).await
}
Fields§
§address: String
§port: u16
§pem_filepath: PathBuf
§max_channels: u32
Maximum number of connection channels that can be openend at the same time
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SessionConfig
impl RefUnwindSafe for SessionConfig
impl Send for SessionConfig
impl Sync for SessionConfig
impl Unpin for SessionConfig
impl UnwindSafe for SessionConfig
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