Skip to content

Custom Types as Structs #452

Closed Answered by DashieTM
DashieTM asked this question in Q&A
Discussion options

You must be logged in to vote

Aight, the get is within one step, did some debugging and here it is.
Should anyone else have the same issue, here you go:

impl<'a> Get<'a> for Sink {
    fn get(i: &mut arg::Iter<'a>) -> Option<Self> {
        let (index, name, channels, volume, muted) = <(u32, String, u16, u32, bool)>::get(i)?;
        Some(Sink {
            index,
            name,
            channels,
            volume,
            muted,
        })
    }
}

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by DashieTM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant