Hi, I'm very new to rust, so apologies if this is just something I should know, but to get the example going, I had to add a couple of things.
Firstly, it appears tokio is required for the async parts of the example but by default, it appears you can't make main async, so I had to add this to my cargo.toml dependencies:
tokio = { version = "1.18.2", features = ["full"] }
Additionally, I was using a sandbox, so I had to use the set_login_endpoint function:
let mut client = Client::new(client_id, client_secret);
client.set_login_endpoint("https://mydomain--uat.my.salesforce.com/");
client.login_with_credential(username, password).await?;
Otherwise, works great... Investigating the use of rust more widely, so checking to see if I can do everything I need -- this is definitely a tick in the box, thanks.
Hi, I'm very new to rust, so apologies if this is just something I should know, but to get the example going, I had to add a couple of things.
Firstly, it appears
tokio
is required for the async parts of the example but by default, it appears you can't makemain
async, so I had to add this to mycargo.toml
dependencies:Additionally, I was using a sandbox, so I had to use the
set_login_endpoint
function:Otherwise, works great... Investigating the use of rust more widely, so checking to see if I can do everything I need -- this is definitely a tick in the box, thanks.