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

source

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()
        );
    }
}
source

pub fn pull_packets(&mut self)

source

pub fn gc_refs(&mut self)

source

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()
        );
    }
}

Trait Implementations§

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere
    T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere
    T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere
    T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere
    U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere
    U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere
    U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.