Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • zbus zbus
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 82
    • Issues 82
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 4
    • Merge requests 4
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar

Due to an influx of spam, we have had to impose restrictions on new accounts. Please see this wiki page for instructions on how to get full permissions. Sorry for the inconvenience.

  • dbusdbus
  • zbuszbus
  • Issues
  • #135
Closed
Open
Issue created Feb 02, 2021 by Ian Douglas Scott@ids1024Contributor

Additional `TryFrom<OwnedValue>` implementations needed for UDisks2

Running the git version of xmlgen on https://raw.githubusercontent.com/storaged-project/udisks/master/data/org.freedesktop.UDisks2.xml:

error[E0277]: the trait bound `HashMap<std::string::String, OwnedValue>: TryFrom<OwnedValue>` is not satisfied
  --> src/udisks.rs:82:1
   |
82 | #[dbus_proxy(interface = "org.freedesktop.UDisks2.Drive")]
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `TryFrom<OwnedValue>` is not implemented for `HashMap<std::string::String, OwnedValue>`
   |
   = help: the following implementations were found:
             <HashMap<K, V, H> as TryFrom<OwnedValue>>
             <HashMap<K, V, H> as TryFrom<zvariant::Dict<'k, 'v>>>
   = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `Vec<(std::string::String, HashMap<std::string::String, OwnedValue>)>: TryFrom<OwnedValue>` is not satisfied
   --> src/udisks.rs:390:1
    |
390 | #[dbus_proxy(interface = "org.freedesktop.UDisks2.Block")]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `TryFrom<OwnedValue>` is not implemented for `Vec<(std::string::String, HashMap<std::string::String, OwnedValue>)>`
    |
    = help: the following implementations were found:
              <Vec<OwnedValue> as TryFrom<OwnedValue>>
              <Vec<T> as TryFrom<OwnedValue>>
              <Vec<T> as TryFrom<zvariant::Array<'a>>>
              <Vec<T> as TryFrom<zvariant::Value<'a>>>
    = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `Vec<(std::string::String, HashMap<std::string::String, OwnedValue>)>: TryFrom<OwnedValue>` is not satisfied
   --> src/udisks.rs:752:1
    |
752 | #[dbus_proxy(interface = "org.freedesktop.UDisks2.Encrypted")]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `TryFrom<OwnedValue>` is not implemented for `Vec<(std::string::String, HashMap<std::string::String, OwnedValue>)>`
    |
    = help: the following implementations were found:
              <Vec<OwnedValue> as TryFrom<OwnedValue>>
              <Vec<T> as TryFrom<OwnedValue>>
              <Vec<T> as TryFrom<zvariant::Array<'a>>>
              <Vec<T> as TryFrom<zvariant::Value<'a>>>
    = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `Vec<(OwnedObjectPath, i32, Vec<std::string::String>, u64, HashMap<std::string::String, OwnedValue>)>: TryFrom<OwnedValue>` is not satisfied
   --> src/udisks.rs:829:1
    |
829 | #[dbus_proxy(interface = "org.freedesktop.UDisks2.MDRaid")]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `TryFrom<OwnedValue>` is not implemented for `Vec<(OwnedObjectPath, i32, Vec<std::string::String>, u64, HashMap<std::string::String, OwnedValue>)>`
    |
    = help: the following implementations were found:
              <Vec<OwnedValue> as TryFrom<OwnedValue>>
              <Vec<T> as TryFrom<OwnedValue>>
              <Vec<T> as TryFrom<zvariant::Array<'a>>>
              <Vec<T> as TryFrom<zvariant::Value<'a>>>
    = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `Vec<(std::string::String, HashMap<std::string::String, OwnedValue>)>: TryFrom<OwnedValue>` is not satisfied
   --> src/udisks.rs:829:1
    |
829 | #[dbus_proxy(interface = "org.freedesktop.UDisks2.MDRaid")]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `TryFrom<OwnedValue>` is not implemented for `Vec<(std::string::String, HashMap<std::string::String, OwnedValue>)>`
    |
    = help: the following implementations were found:
              <Vec<OwnedValue> as TryFrom<OwnedValue>>
              <Vec<T> as TryFrom<OwnedValue>>
              <Vec<T> as TryFrom<zvariant::Array<'a>>>
              <Vec<T> as TryFrom<zvariant::Value<'a>>>
    = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to 5 previous errors

I'm looking at how to implement these but it's not entirely clear how to make the TryFrom implementations more general.

Assignee
Assign to
Time tracking