Skip to content

Provide inherent trait impl impl<C: Controller> Controller for &C {...} #32

@ivmarkov

Description

@ivmarkov

Most trait crates do provide these (either the &mut variation, or the non-mut one or both) as this increases the usability of the traits.

Notes:

  • Might need to provide the impl for ControllerCmdSync and ControllerCmdAsync as well
  • Might need to provide this for the blocking Controller trait as well
  • Open question: since this is a breaking change, shall we switch to the async syntax then?

Most important is that these impls cannot be provided if the external embedded_io::ErrorType is used, as it only has a &mut impl:
impl<T: ErrorType> ErrorType for &mut T {...}.

I would suggest that we use our own, bt-hci-specific ErrorType then but possibly still make use of embedded_io::Error?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions