Skip to content

Error representation #195

Open
Open
@Diggsey

Description

@Diggsey

Kernel error numbers are non-zero and positive, so I was wondering if it would make sense to constrain the Error type in that way (making the from c_int conversion fallible).

It could use the NonZero wrapper for now, and in the future might be able to have a niche for negative numbers as well. This would allow a return type of KernelResult<()> to be exactly equivalent to c_int.

Metadata

Metadata

Assignees

No one assigned

    Labels

    • libRelated to the `rust/` library.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions