Giter Club home page Giter Club logo

Comments (8)

diwic avatar diwic commented on July 24, 2024

You probably want to send this argument as a dict? Something like this:

let d = dbus::arg::Dict::new(total_published_count.iter());
let m3 = m3.append1(d);

from dbus-rs.

tekjar avatar tekjar commented on July 24, 2024

Oh Thanks. Can I add a dict signal example to examples? Also Is there a way to create a tree using XMLs and then register it ? Code might look cleaner that way.

from dbus-rs.

diwic avatar diwic commented on July 24, 2024

Oh Thanks. Can I add a dict signal example to examples?

Sure you can! Contributions are welcome.

Also Is there a way to create a tree using XMLs and then register it ? Code might look cleaner that way.

Do you mean introspection XML?

Either way, I believe the answer is "no". I have had thoughts about it (see issue #53 e g) but it's not there yet.

from dbus-rs.

diwic avatar diwic commented on July 24, 2024

Also Is there a way to create a tree using XMLs and then register it ? Code might look cleaner that way.

Btw, if you have a good example of how you wish your code to look like? I could use some inspiration.

from dbus-rs.

diwic avatar diwic commented on July 24, 2024

Oh, and I just implemented some traits on HashMap so in the next release of dbus-rs you should be able to do just

let m3 = m3.append1(map);

from dbus-rs.

tekjar avatar tekjar commented on July 24, 2024

@diwic Oh this is cool. Thanks.

how you wish your code to look like? I could use some inspiration

I remember seeing something like this in go dbus. I'll try to find an example

from dbus-rs.

tekjar avatar tekjar commented on July 24, 2024

go dbus is doing this

https://github.com/godbus/dbus/blob/master/_examples/server.go#L11-L16

from dbus-rs.

diwic avatar diwic commented on July 24, 2024

Ok, thanks for the example. Always good to know how other languages do it.

Btw, there is the dbus-macros crate, which is written by someone else, but anyhow an inspiration. Maybe it's helpful to you?

from dbus-rs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.