libzypp  17.36.7
zyppng::operators Namespace Reference

Namespaces

 detail
 

Functions

template<typename PrevOp , typename Callback , std::enable_if_t< detail::is_async_op_v< PrevOp >, int > = 0, std::enable_if_t< detail::is_future_monad_cb_v< Callback, typename PrevOp::value_type >, int > = 0>
auto operator| (std::shared_ptr< PrevOp > &&in, std::shared_ptr< Callback > &&c) -> AsyncOpRef< typename Callback::value_type >
 
template<typename PrevOp , typename Callback , std::enable_if_t< detail::is_async_op_v< PrevOp >, int > = 0, std::enable_if_t< detail::is_sync_monad_cb_with_async_res_v< Callback, typename PrevOp::value_type >, int > = 0>
auto operator| (std::shared_ptr< PrevOp > &&in, Callback &&c)
 
template<typename PrevRes , typename CallbackOp , std::enable_if_t< !detail::is_async_op_v< PrevRes >, int > = 0, std::enable_if_t< detail::is_future_monad_cb_v< CallbackOp, PrevRes >, int > = 0>
auto operator| (PrevRes &&in, CallbackOp &&c) -> AsyncOpRef< typename remove_smart_ptr_t< CallbackOp >::value_type >
 
template<typename SyncRes , typename Callback , std::enable_if_t< !detail::is_async_op_v< SyncRes >, int > = 0, std::enable_if_t< detail::is_sync_monad_cb_v< Callback, SyncRes >, int > = 0>
auto operator| (SyncRes &&in, Callback &&c)
 
template<typename Fun >
auto mbind (Fun &&function)
 
template<typename Fun >
auto and_then (Fun &&function)
 
template<typename Fun >
auto or_else (Fun &&function)
 
template<typename Fun >
auto inspect (Fun &&function)
 
template<typename Fun >
auto inspect_err (Fun &&function)
 
detail::collect_helper collect ()
 
template<typename Transformation >
auto transform_collect (Transformation &&f)
 
template<typename Fun >
auto mtry (Fun &&function)
 
template<typename Transformation >
auto transform (Transformation &&transformation)
 
auto startProgress (ProgressObserverRef progressObserver)
 
auto incProgress (ProgressObserverRef progressObserver, double progrIncrease=1.0, std::optional< std::string > newStr={})
 
auto setProgress (ProgressObserverRef progressObserver, double progrValue, std::optional< std::string > newStr={})
 
auto setProgressLabel (ProgressObserverRef progressObserver, std::string newStr)
 
auto finishProgress (ProgressObserverRef progressObserver, ProgressObserver::FinishResult result=ProgressObserver::Success)
 

Function Documentation

◆ operator|() [1/4]

template<typename PrevOp , typename Callback , std::enable_if_t< detail::is_async_op_v< PrevOp >, int > = 0, std::enable_if_t< detail::is_future_monad_cb_v< Callback, typename PrevOp::value_type >, int > = 0>
auto zyppng::operators::operator| ( std::shared_ptr< PrevOp > &&  in,
std::shared_ptr< Callback > &&  c 
) -> AsyncOpRef<typename Callback::value_type>

Definition at line 284 of file asyncresult.h.

◆ operator|() [2/4]

template<typename PrevOp , typename Callback , std::enable_if_t< detail::is_async_op_v< PrevOp >, int > = 0, std::enable_if_t< detail::is_sync_monad_cb_with_async_res_v< Callback, typename PrevOp::value_type >, int > = 0>
auto zyppng::operators::operator| ( std::shared_ptr< PrevOp > &&  in,
Callback &&  c 
)

Definition at line 294 of file asyncresult.h.

◆ operator|() [3/4]

template<typename PrevRes , typename CallbackOp , std::enable_if_t< !detail::is_async_op_v< PrevRes >, int > = 0, std::enable_if_t< detail::is_future_monad_cb_v< CallbackOp, PrevRes >, int > = 0>
auto zyppng::operators::operator| ( PrevRes &&  in,
CallbackOp &&  c 
) -> AsyncOpRef<typename remove_smart_ptr_t<CallbackOp>::value_type>

Definition at line 322 of file asyncresult.h.

◆ operator|() [4/4]

template<typename SyncRes , typename Callback , std::enable_if_t< !detail::is_async_op_v< SyncRes >, int > = 0, std::enable_if_t< detail::is_sync_monad_cb_v< Callback, SyncRes >, int > = 0>
auto zyppng::operators::operator| ( SyncRes &&  in,
Callback &&  c 
)

Definition at line 336 of file asyncresult.h.

◆ mbind()

template<typename Fun >
auto zyppng::operators::mbind ( Fun &&  function)

Definition at line 616 of file expected.h.

◆ and_then()

template<typename Fun >
auto zyppng::operators::and_then ( Fun &&  function)

Definition at line 623 of file expected.h.

◆ or_else()

template<typename Fun >
auto zyppng::operators::or_else ( Fun &&  function)

Definition at line 630 of file expected.h.

◆ inspect()

template<typename Fun >
auto zyppng::operators::inspect ( Fun &&  function)

Definition at line 637 of file expected.h.

◆ inspect_err()

template<typename Fun >
auto zyppng::operators::inspect_err ( Fun &&  function)

Definition at line 644 of file expected.h.

◆ collect()

detail::collect_helper zyppng::operators::collect ( )
inline

Definition at line 650 of file expected.h.

◆ transform_collect()

template<typename Transformation >
auto zyppng::operators::transform_collect ( Transformation &&  f)

Definition at line 706 of file expected.h.

◆ mtry()

template<typename Fun >
auto zyppng::operators::mtry ( Fun &&  function)

Definition at line 58 of file mtry.h.

◆ transform()

template<typename Transformation >
auto zyppng::operators::transform ( Transformation &&  transformation)

Definition at line 70 of file transform.h.

◆ startProgress()

auto zyppng::operators::startProgress ( ProgressObserverRef  progressObserver)
inline

Starts the the given ProgressObserver, forwarding the pipeline value without touching it

Definition at line 221 of file progressobserver.h.

◆ incProgress()

auto zyppng::operators::incProgress ( ProgressObserverRef  progressObserver,
double  progrIncrease = 1.0,
std::optional< std::string >  newStr = {} 
)
inline

Increases the ProgressObserver by the given progIncrease, forwarding the pipeline value without touching it. Can also set a new label via newStr

Definition at line 229 of file progressobserver.h.

◆ setProgress()

auto zyppng::operators::setProgress ( ProgressObserverRef  progressObserver,
double  progrValue,
std::optional< std::string >  newStr = {} 
)
inline

Sets the current value in the given ProgressObserver, forwarding the pipeline value without touching it Can also set a new label via newStr

Definition at line 237 of file progressobserver.h.

◆ setProgressLabel()

auto zyppng::operators::setProgressLabel ( ProgressObserverRef  progressObserver,
std::string  newStr 
)
inline

Sets the label value in the given ProgressObserver, forwarding the pipeline value without touching it

Definition at line 244 of file progressobserver.h.

◆ finishProgress()

auto zyppng::operators::finishProgress ( ProgressObserverRef  progressObserver,
ProgressObserver::FinishResult  result = ProgressObserver::Success 
)
inline

Sets the the given ProgressObserver to finished, forwarding the pipeline value without touching it

Definition at line 252 of file progressobserver.h.