luser / rust-gdb-remote-protocol

A Rust crate implementing the GDB Remote Serial Protocol
Apache License 2.0
33 stars 13 forks source link

Handlers #20

Closed tromey closed 6 years ago

tromey commented 6 years ago

This series proposes a way for handlers to work, and also adds a few minor cleanups.

tromey commented 6 years ago

Will rebase.

luser commented 6 years ago

This all looks fine to me as a starting point. I do think we'll want some sort of nicer conversion from Handler method return types to Response, but I don't have any qualms with you landing this and someone improving that later.

tromey commented 6 years ago

I'm not really loving the name SimpleError. Maybe RspError?

tromey commented 6 years ago

I plan to land this a bit later and then write the follow-ups.

luser commented 6 years ago

It's pretty typical to just name error types Error for a specific crate. That'd only be an issue if we wanted to do something like import failure::Error, but even if we wind up using failure we can always fully-qualify that type.

tromey commented 6 years ago

Also perhaps Handler methods should default to Empty.