I just a beginner in Rust. So please be patient with me …
Im woking on session-types lib in Rust. my problem is how can I create a channel and make it accessible by all structs ?
I have those types
type Server = Recv<i64, Eps>;
type Client = ::Dual;
and two structs
c: Chan <(),Server>,
ch: Chan <(),Client>,
and in main I connect them which returns me two channels:
let (server,client) = session_channel();
My question is, how can I make the same pointer to same channels can be accessible by all structs? so that I can for example access c and ch from both structs?
I hope its clear