Skip to main content

wasm_link/utils/
partial_success.rs

1//! Type aliases for operations that support partial success/failure patterns.
2//! These represent graceful error handling where some parts of an operation may fail
3//! while others succeed, allowing partial completion rather than total failure.
4
5/// Represents a successful operation where some parts failed but didn't prevent overall success.
6/// The `Vec<E>` contains errors from the failed parts that were handled gracefully.
7pub type PartialSuccess<T, E> = ( T, Vec<E> );
8
9/// Represents an operation that may partially succeed or fail.
10/// Ok: Core success data plus errors from partial failures that allowed completion.
11/// Err: Primary failure cause plus errors that likely contributed to the overall failure.
12pub type PartialResult<T, F, E> = Result<( T, Vec<E> ), ( F, Vec<E> )>;