Preferably not to be answered by Maidsafe Devs, but a community member who knows a bit of Rust (so as not to distract as this is not a priority).
I’m looking around in the safe-cli library at what bits of API are exposed and what is to come, and trying to understand some of the underlying Rust code.
The code in safe-cli/safe_api_ffi/ffi/mod.rs
creates a Safe
object (interface?) to auth the app, here:
https://github.com/maidsafe/safe-cli/blob/master/safe_api_ffi/ffi/mod.rs#L26
That interface is implemented in safe-cli/src/api/auth.rs
below.
I’d like to understand what the Safe::new("base32z");
above does, because I don’t see how new
is implemented, and in particular what the “base32z” parameter does. Obviously it creates an instance that can be called, exposing the connect
function, but I’m confused by the lack of a constructor (coming from a C++ / JavaScript background). Help?!
https://github.com/maidsafe/safe-cli/blob/master/src/api/auth.rs#L26-L103