/// Create new session object and link it to the owning client.
Create new session object and link it to the owning client.
Create new session object and link it to the owning client .
pub fn new(id: SessionId, client: &ClientRef) -> Self {
        let s = SessionRef::wrap(Session {
            id: id,
            tasks: Default::default(),
            objects: Default::default(),
            client: client.clone(),
            unfinished_tasks: 0,
            finish_hooks: Default::default(),
            error: None,
        });
        // add to client
        client.get_mut().sessions.insert(s.clone());
        s
    }
pub fn new ( id : SessionId , client : & ClientRef ) -> Self { let s = SessionRef :: wrap ( Session { id : id , tasks : Default :: default ( ) , objects : Default :: default ( ) , client : client . clone ( ) , unfinished_tasks : 0 , finish_hooks : Default :: default ( ) , error : None , } ) ; // add to client client . get_mut ( ) . sessions . insert ( s . clone ( ) ) ; s }
Create new session object and link it to the owning client.
Create new session object and link it to the owning client .
id
SessionId
client
&ClientRef