make `DispatchSet` trait public

Open Beginner friendly
#259 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
rust
Domain
tooling

Research direction

Locate the generated DispatchSet trait and the code that emits or exposes it, then compare its visibility with the imported function and method bounds. Use the Rust example from the issue as the first check; done means a generic take implementation can name DispatchSet and the example compiles.

Written by the indexing model from the issue text.

Description

currently to constraint the fn/method generics on import we add a bound of fn_name::DispatchSet. It would be useful if this trait was made public so that users can write generic implementations using imported fns/methods.

This doesn't compile atm:

ffi! {
    #![unsafe(extern("C))]

    fn kita<T>(a: T) where use<T> @ <u32>
}

fn take<T: FnOnce>(a: T) where (): DispatchSet<u32> {}

fn main() {
    take(kita);
}
Dominant language
Rust
Stars
23
Forks
2
Avg merge
27m
Merged PRs (30d)
1

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from mversic/co3

All issues in mversic/co3

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.