Ian Douglas Scott
Ian Douglas Scott
> How would using a proc macro on the impl block change this? My idea is that with the example code I gave, every function being registered would be within...
> but more projects needs to adopt it, otherwise it won't work in old software. Right. As some of the posts I've seen about Pipewire's development, Cheese supports it automatically...
Running into issues with ioctls is pretty much what I would expect, but it would definitely be great to have a fuse-based solution, if it can work!
I think things like this should work: ```rust pub trait ObjectImpl: ObjectSubclass + ObjectImplExt where Self::Type: IsA ``` Though without implied bounds (https://github.com/rust-lang/rust/issues/44491) or associated type bounds (https://github.com/rust-lang/rust/issues/52662), that `where`...
Though actually, it's also desirable that it's not possible to include superclasses/interfaces in the wrapper that aren't implemented in the `ObjectSubclass` instance. If my idea to use `ObjectSubclassIs` to automatically...
As far as automatically implementing: ```rust unsafe impl glib::IsA for T where T::Subclass: WidgetImpl {} ``` I think this is fundamentally valid under the type system. But the orphan rule...
I've had too many ideas about this, so I guess I might as well comment some here. Don't know what ideas anyone else has for how this should work. [Vala](https://wiki.gnome.org/Projects/Vala/Manual/Classes#Properties)...
https://doc.rust-lang.org/std/convert/trait.From.html says the trait should never fail, and `TryFrom` should be implemented instead if it can. A bit annoying, but probably the correct thing to do.
I guess discarding everything after the first `\0` is probably intuitive to people familiar with C. Though if it happens, it seems almost certainly unintentional. As far as prior art/accepted...
Looking at the docs, apparently `GString` can contain nul bytes? https://developer.gnome.org/glib/stable/glib-Strings.html: > a GString can also hold arbitrary binary data, because it has a "len" member, which includes any possible...