Hi all,

thanks to Vladimir and Valerii for their previous detailed answer to
my email, now i have a more general question.

My Connection struct has a "new" method with open a connection to a
database. This connection can fails. Three possiblities :

1/ "new" returns an IoResult<Connection>. The connection must be
unwrapped from the IoResult before using it
2/ "new" returns a "Connection"; after the instantiation, a test must
be made using a method like "getIoResult -> Option<IoResult>"
3/ any other way to do ????

For me, the 1/ is the best one, the connection can not be used until
it is returned by new. With 2/, the test can be forgotten.

Any suggestion ?

Thanks

-- 
Christophe
http://chris-pe.github.io/Rustic
_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to