Function u_interface::get_uid_from_uname
source · [−]Expand description
Returns the user’s id number by searching using the stated username.
This function is async, that means it has to be called inside an async
function/method or using tokio::Runtime.block_on()
.
Arguments
uname
- A String that is the username of the user whose id we want to obtain
Examples
// Get the id of the user "LovetheFrogs"
let uid: u32 = get_uid_from_uname(String::from("LovetheFrogs")).await?;