Coder Social home page Coder Social logo

Comments (5)

orottier avatar orottier commented on June 6, 2024

Thanks for the report. We should probably do this as it is also advised in the rust API guidelines https://rust-lang.github.io/api-guidelines/debuggability.html#all-public-types-implement-debug-c-debug

If you are willing to open a PR to address this that would be very welcome. You can use the #![deny(missing_debug_implementations)] lint to find all missing impls.

from web-audio-api-rs.

CorvusPrudens avatar CorvusPrudens commented on June 6, 2024

For some types this is easy and straightforward. For others, there are many inner library types contained within. Is a simple #[derive(Debug)] appropriate for all of these, or should some of them provide an opaque debug representation?

For example, a #[derive(Debug)] on context::online::AudioContext would require an implementation for context::concrete_base::ConcreteBaseAudioContext, and potentially all of its members.

Personally, I think it would be nice, but it could end up meaning a lot of types will have Debug derived.

from web-audio-api-rs.

orottier avatar orottier commented on June 6, 2024

Right, good question.

I think it would be best to start small. Most of the AudioContext fields have no 'debug' value anyway and only expose internal guts that are subject to change.

Take a look at the Debug impl of RenderThread and Graph for example. I'm only exposing a few fields.

Perhaps the Debug implementation of AudioContext should only expose what we provide via public method getters (base, sink_id, latency values perhaps). ConcreteBaseAudioContext should list state, sample_rate, current_time, max_channel_count, offline. AudioParam should list all internals expect registration. Etc etc

from web-audio-api-rs.

orottier avatar orottier commented on June 6, 2024

Hey @CorvusPrudens, are you working on this? Otherwise I will make a start

from web-audio-api-rs.

CorvusPrudens avatar CorvusPrudens commented on June 6, 2024

I have not! You certainly won't be stepping on my toes.

from web-audio-api-rs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    šŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. šŸ“ŠšŸ“ˆšŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ā¤ļø Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.