pacifica-rs 1.0.0

rust implementation of PacificA: Replication in Log-Based Distributed Storage Systems
1
2
3
4
5
6
7
8
9
10
11
12
13
use crate::core::ResultSender;
use crate::error::LifeCycleError;
use crate::runtime::OneshotSender;
use crate::TypeConfig;

pub fn send_result<C, T, E>(result_sender: ResultSender<C, T, E>, result: Result<T, E>) -> Result<(), LifeCycleError>
where
    C: TypeConfig,
    T: Send,
    E: Send,
{
    result_sender.send(result).map_err(|_| LifeCycleError::Shutdown)
}