feat!: Expanded add_methods to extra_user_data
Instead of being a function it now expects a struct with the PartialUserData trait implemented. This in part ensures the correct function signature. It also adds another optional function to PartialUserData that returns definitions for the added methods.
This commit is contained in:
@@ -8,6 +8,10 @@ pub trait PartialUserData<T> {
|
||||
fn interface_name() -> Option<&'static str> {
|
||||
None
|
||||
}
|
||||
|
||||
fn definitions() -> Option<String> {
|
||||
None
|
||||
}
|
||||
}
|
||||
|
||||
pub struct Device;
|
||||
|
||||
Reference in New Issue
Block a user