Skip to content

Async API #148

@bbb651

Description

@bbb651

I'm building a logcat viewer with iced, and it would be nice to use this crate instead of adb logcat.
Iced make heavy use of async and even with spawn_blocking I couldn't manage to integrate it without blocking the executor forever, it would be really nice if this crate had a async variant of the api.
I think it's also a requirement for #121 as blocking on web is disallowed?

P.S. ADBServerDevice::get_logs has the the following signature:

pub fn get_logs<W: Write>(&mut self, output: W) -> Result<()>;

Is there a reason it take a Write instead of returning a Read? E.g.:

pub fn get_logs(&mut self) -> Result<LogReader>;
impl Read for LogReader;

This allows directly reading from it, you could always use std::io::copy if you want to write it to an impl Write.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions