-
Notifications
You must be signed in to change notification settings - Fork 286
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
aya: add program_info() api to Program
#782
Conversation
✅ Deploy Preview for aya-rs-docs ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
Hey @alessandrod, this pull request changes the Aya Public API and requires your review. |
aya/src/programs/mod.rs
Outdated
/// | ||
/// This information is populated at load time by the kernel and can be used | ||
/// to get kernel details for a given [`Program`]. | ||
pub fn program_info(&self) -> Result<ProgramInfo, ProgramError> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why program_info
and not info
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done! Also fixed up the existing API so that we're consistent.
Add a new api to the outer level `Program` structure which allows users to get the program's kernel info before casting it to an explicit program variant. Signed-off-by: astoycos <astoycos@redhat.com>
Add a new api to the outer level
Program
structure which allows users to get the program's kernel info before casting it to an explicit program variant.