You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
add #[default_error(<type>)] attribute to initializer macros
The `#[default_error(<type>)]` attribute macro can be used to supply a
default type as the error used for the `[pin_]init!` macros. This way
one can easily define custom `try_[pin_]init!` variants that default to
your project specific error type. Just write the following declarative
macro:
macro_rules! try_init {
($($args:tt)*) => {
::pin_init::init!(
#[default_error(YourCustomErrorType)]
$($args)*
)
}
}
Signed-off-by: Benno Lossin <[email protected]>
0 commit comments