Skip to content

dbus[22875]: Array or variant type requires that type begin_struct be written, but double was written. #370

Answered by mulkieran
mdgaziur asked this question in Q&A
Discussion options

You must be logged in to vote

@mdgaziur Before I get started, I'ld like to mention that I am not @diwic, and so much more likely to be wrong. However, as far as I can tell the problem that you are encountering is due to the fact that you have implemented Append for your AppInfo type incorrectly. Your Append implementation just destructures the struct into its individual parts. In the D-Bus spec, a "struct" is just a tuple. You need to hand it in the proper form to the append function. Something similar to this is likely to work better.

impl Append for AppInfo {
    fn append_by_ref(&self, ia: &mut IterAppend){
        (self.total_score, self.name, self.exec, self.icon).append(ia);
    }
}

I feel fairly confident that…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@mdgaziur
Comment options

@mdgaziur
Comment options

Answer selected by mdgaziur
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants