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

Document use cases and behavior of #[hdk_extern(infallible)] attribute #533

Open
c12i opened this issue Feb 14, 2025 · 1 comment
Open

Comments

@c12i
Copy link

c12i commented Feb 14, 2025

While working on holochain/holochain#4617, I noticed that the documentation could benefit from a section explaining the infallible attribute for #[hdk_extern].

This attribute is useful for zome functions that are guaranteed to not return errors or operations that can't fail. Adding documentation about when to use this attribute and how it affects the function's return type would help developers make better decisions about when to leverage this optimization and help distinguish it from the regular #[hdk_extern] usage where error handling is needed.

@pdaoust
Copy link
Collaborator

pdaoust commented Feb 18, 2025

As I go I'm pointing out the infallible arg whenever I'm sharing about a callback that needs it. It's probably okay just introduced when/where it's needed, and it could point to the Rustdoc for more info. (Is there Rustdoc?) @c12i does that seem sufficient?

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

No branches or pull requests

2 participants