Module smoldot_light::platform::default
source · Expand description
Implementation of the PlatformRef
trait that leverages the operating system.
This module contains the DefaultPlatform
struct, which implements PlatformRef
.
The DefaultPlatform
delegates the logging to the log
crate. In order to see log
messages, you should register as “logger” as documented by the log
crate.
See https://docs.rs/log.
§Example
use smoldot_light::{Client, platform::DefaultPlatform};
env_logger::Builder::from_env(env_logger::Env::default().default_filter_or("info")).init();
let client = Client::new(DefaultPlatform::new(env!("CARGO_PKG_NAME").into(), env!("CARGO_PKG_VERSION").into()));
Structs§
- Implementation of the
PlatformRef
trait that leverages the operating system. - Implementation detail of
DefaultPlatform
.