Skip to content

ref-struct pattern for Context

dsee requested to merge dsee/pipewire-rs:context-ref into main

This applies the ref-struct pattern that is used in the project to pw_context by creating a new ContextRef wrapper.

I moved the properties and update_properties functions into ContextRef and added as_raw and as_raw_ptr functions to ContextRef.

I didn't move the connect and connect_fd functions to ContextRef because i didn't know how to proceed, since Core::from_ptr requires an instance of Context to be passed in.

Merge request reports

Loading