Struct muzzman_daemon::DaemonSession
source · pub struct DaemonSession {
pub conn: UdpSocket,
pub packets: Vec<ClientPackets>,
pub generator: u128,
pub locations_refs: Vec<LRef>,
pub element_refs: Vec<ERef>,
pub module_refs: Vec<MRef>,
pub watcher_thread: JoinHandle<()>,
}Fields§
§conn: UdpSocket§packets: Vec<ClientPackets>§generator: u128§locations_refs: Vec<LRef>§element_refs: Vec<ERef>§module_refs: Vec<MRef>§watcher_thread: JoinHandle<()>Implementations§
source§impl DaemonSession
impl DaemonSession
sourcepub fn new() -> Result<Self, Error>
pub fn new() -> Result<Self, Error>
Examples found in repository?
examples/get_location_info.rs (line 5)
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
fn main() {
{
let daemon = DaemonSession::new().unwrap();
let session = daemon.create_session();
let default_location = session.get_default_location().unwrap();
println!(
"Default Location Info: {:?}",
default_location.get_location_info().unwrap()
);
let new_element = default_location.create_element("TestElement").unwrap();
println!(
"Element Info: {:?}",
new_element.get_element_info().unwrap()
);
println!(
"Default Location Info: {:?}",
default_location.get_location_info().unwrap()
);
}
}pub fn pull_packets(&mut self)
pub fn gc_refs(&mut self)
sourcepub fn create_session(self) -> Box<dyn TSession>
pub fn create_session(self) -> Box<dyn TSession>
Examples found in repository?
examples/get_location_info.rs (line 6)
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
fn main() {
{
let daemon = DaemonSession::new().unwrap();
let session = daemon.create_session();
let default_location = session.get_default_location().unwrap();
println!(
"Default Location Info: {:?}",
default_location.get_location_info().unwrap()
);
let new_element = default_location.create_element("TestElement").unwrap();
println!(
"Element Info: {:?}",
new_element.get_element_info().unwrap()
);
println!(
"Default Location Info: {:?}",
default_location.get_location_info().unwrap()
);
}
}