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)
3fn main() {
4 {
5 let daemon = DaemonSession::new().unwrap();
6 let session = daemon.create_session();
7
8 let default_location = session.get_default_location().unwrap();
9
10 println!(
11 "Default Location Info: {:?}",
12 default_location.get_location_info().unwrap()
13 );
14
15 let new_element = default_location.create_element("TestElement").unwrap();
16 println!(
17 "Element Info: {:?}",
18 new_element.get_element_info().unwrap()
19 );
20
21 println!(
22 "Default Location Info: {:?}",
23 default_location.get_location_info().unwrap()
24 );
25 }
26}
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)
3fn main() {
4 {
5 let daemon = DaemonSession::new().unwrap();
6 let session = daemon.create_session();
7
8 let default_location = session.get_default_location().unwrap();
9
10 println!(
11 "Default Location Info: {:?}",
12 default_location.get_location_info().unwrap()
13 );
14
15 let new_element = default_location.create_element("TestElement").unwrap();
16 println!(
17 "Element Info: {:?}",
18 new_element.get_element_info().unwrap()
19 );
20
21 println!(
22 "Default Location Info: {:?}",
23 default_location.get_location_info().unwrap()
24 );
25 }
26}
Trait Implementations§
impl Send for DaemonSession
impl Sync for DaemonSession
Auto Trait Implementations§
impl Freeze for DaemonSession
impl !RefUnwindSafe for DaemonSession
impl Unpin for DaemonSession
impl !UnwindSafe for DaemonSession
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