Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • gstreamer-rs gstreamer-rs
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 40
    • Issues 40
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 10
    • Merge requests 10
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GStreamer
  • gstreamer-rsgstreamer-rs
  • Issues
  • #250

Closed
Open
Created Apr 20, 2020 by Guillaume Desmottes@gdesmott🐐Maintainer

add API to easily create a new Structure from iterator

I'd like to copy a structure while filtering some of its fields. Ideally I'd like to do something like:

let s2: Structure = s.iter().filter(|(name, _value)| *name == "badger").collect();

I tried implementing FromIterator on Iter but that's not working as Iter yield (&'static str, &glib::SendValue) and so we lose the structure name along the way.

@slomo : what would be the proper way to do that?

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking