oxidecomputer / idolatry

An experimental IPC interface definition language for Hubris.
Mozilla Public License 2.0
17 stars 11 forks source link

Simpler server trait for infallible operations #20

Open mkeeter opened 2 years ago

mkeeter commented 2 years ago

Infallible operations (i.e. those using Simple(T) or Result<T, ServerDeath> modes) currently require a signature

Result<T, idol_runtime::RequestError<core::convert::Infallible>>

in the server-side trait.

We should simplify this to just T to make writing servers more ergonomic. This would require minor Hubris changes, as there are only two Idol APIs using Simple right now.

cbiffle commented 2 years ago

We can simplify this to T in some cases, but not all -- RequestError is used for faulting clients that send bogus arguments, etc.