Module ashpd::desktop::account

source ·
Expand description

Access to the current logged user information such as the id, name or their avatar uri.

Wrapper of the DBus interface: org.freedesktop.portal.Account.

§Examples

use ashpd::desktop::account::UserInformation;

async fn run() -> ashpd::Result<()> {
    let response = UserInformation::request()
        .reason("App would like to access user information")
        .send()
        .await?
        .response()?;

    println!("Name: {}", response.name());
    println!("ID: {}", response.id());

    Ok(())
}

Structs§