Infallible way to check a device's host

Open Beginner friendly
#1,444 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
64/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
rust

Research direction

Start by reading DeviceTrait and the existing device.id() and host accessors to see how device IDs encode the host. Add the proposed infallible host() API to the trait and check the trait’s implementations and tests for the expected behavior. Done means callers can get a device’s host without unwrapping a fallible result.

Written by the indexing model from the issue text.

Description

API design

device.host() -> HostID
An infallible way to check a device's host, part of DeviceTrait. Currently only accessible through the fallible device.id().unwwrp().host(), though it is infallible, compile-time knowledge.

Dominant language
Rust
Stars
4k
Forks
554
Avg merge
1d 3h
Merged PRs (30d)
1

Getting set up

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 RustAudio/cpal

All issues in RustAudio/cpal

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.