Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Traits with private bounds. #345

Closed
strongwar opened this issue Jan 12, 2023 · 1 comment · Fixed by #356
Closed

Traits with private bounds. #345

strongwar opened this issue Jan 12, 2023 · 1 comment · Fixed by #356
Assignees

Comments

@strongwar
Copy link

pub struct Lcd<T,TX,RX>
where
    T: esp32_hal::prelude::_esp_hal_spi_InstanceDma<TX, RX>,
    TX:esp32_hal::dma::private::Tx, 
    RX:esp32_hal::dma::private::Rx,
{
    spi: T,
    fch: u8,
    fcl: u8,
}

I am trying to define a struct that holds a SpiDma struct, however, when I try to set its traits I can't since the TX and RX traits require private bounds. Is there a way to get around this?

@bjoernQ
Copy link
Contributor

bjoernQ commented Jan 12, 2023

Probably we were too strict here and the traits should be made public

Another user (on Matrix chat) also ran into this before

We are always happy to receive a PR - I can also look into this but currently I am a bit busy with something else so it might take some time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants