Skip to content

Add suffix macro to bisync#9

Closed
okhsunrog wants to merge 1 commit intoJM4ier:mainfrom
okhsunrog:feature/optional-async-suffix-2
Closed

Add suffix macro to bisync#9
okhsunrog wants to merge 1 commit intoJM4ier:mainfrom
okhsunrog:feature/optional-async-suffix-2

Conversation

@okhsunrog
Copy link

Similar to #8, this time using the new syntax:

#[bisync]
pub async fn get_some_data(&mut self) -> Result<Data, Error> {
    // Async: becomes self.device.read_async().await?
    // Sync:  becomes self.device.read()?
    let data = bisync::suffix!("_async", self.device.read().await?);
    Ok(data)
}

You can see an example of using this PR here: okhsunrog/axp192-dd

@okhsunrog okhsunrog changed the title Add optional async_suffix attribute to bisync macro, take 2 Add optional suffix macro to bisync Jun 1, 2025
@okhsunrog okhsunrog changed the title Add optional suffix macro to bisync Add suffix macro to bisync Jun 1, 2025
@okhsunrog
Copy link
Author

I'd be grateful for reviewing this, as I want to publish my driver to crates.io and can't publish it till it has git dependencies

@okhsunrog okhsunrog closed this Jun 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant