|
@ -66,16 +66,11 @@ use syn::parse_macro_input; |
|
|
///
|
|
|
///
|
|
|
/// /// For all types used in the `Error` position of a `Result` in the module
|
|
|
/// /// For all types used in the `Error` position of a `Result` in the module
|
|
|
/// /// traits, you must implement `GuestErrorType` which tells wiggle-generated
|
|
|
/// /// traits, you must implement `GuestErrorType` which tells wiggle-generated
|
|
|
/// /// code how to determine if a method call has been successful, as well as
|
|
|
/// /// code what value to return when the method returns Ok(...).
|
|
|
/// /// how to translate a wiggle runtime error into an ABI-level error.
|
|
|
/// impl GuestErrorType for types::Errno {
|
|
|
/// impl<'a> GuestErrorType<'a> for types::Errno {
|
|
|
|
|
|
/// type Context = YourCtxType;
|
|
|
|
|
|
/// fn success() -> Self {
|
|
|
/// fn success() -> Self {
|
|
|
/// unimplemented!()
|
|
|
/// unimplemented!()
|
|
|
/// }
|
|
|
/// }
|
|
|
/// fn from_error(_e: wiggle::GuestError, _c: &Self::Context) -> Self {
|
|
|
|
|
|
/// unimplemented!()
|
|
|
|
|
|
/// }
|
|
|
|
|
|
/// }
|
|
|
/// }
|
|
|
///
|
|
|
///
|
|
|
/// # fn main() { println!("this fools doc tests into compiling the above outside a function body")
|
|
|
/// # fn main() { println!("this fools doc tests into compiling the above outside a function body")
|
|
|