pub async fn check_and_hold_any_store_entry<F>(
    hash: &EntryHash,
    workspace: &mut SysValidationWorkspace,
    network: AIngleP2pCell,
    incoming_sgd_ops_sender: Option<IncomingSgdOpSender>,
    f: F,
) -> SysValidationResult<()>
where
    F: FnOnce(&Element) -> SysValidationResult<()>,
{
    let source = check_and_hold(hash, workspace, network).await?;
    f(source.as_ref())?;
    if let (Some(incoming_sgd_ops_sender), Source::Network(element)) =
        (incoming_sgd_ops_sender, source)
    {
        incoming_sgd_ops_sender.send_store_entry(element).await?;
    }
    Ok(())
}
/// If we are not holding this entry then
/// retrieve any element at this EntryHash
/// and send it as a StoreEntry SgdOp
/// to our incoming_sgd_ops_workflow.
///
/// Note this is different to check_and_hold_store_entry
/// because it gets the Element via an EntryHash which
/// means it will be any Element.
///
/// Apply a checks callback to the Element.
///
/// Additionally sys validation will be triggered to
/// run again if we weren't holding it.
If we are not holding this entry then
retrieve any element at this EntryHash
and send it as a StoreEntry SgdOp
to our incoming_sgd_ops_workflow.

Note this is different to check_and_hold_store_entry
because it gets the Element via an EntryHash which
means it will be any Element.

Apply a checks callback to the Element.

Additionally sys validation will be triggered to
run again if we weren't holding it.
If we are not holding this entry then retrieve any element at this EntryHash and send it as a StoreEntry SgdOp to our incoming_sgd_ops_workflow . Note this is different to check_and_hold_store_entry because it gets the Element via an EntryHash which means it will be any Element . Apply a checks callback to the Element . Additionally sys validation will be triggered to run again if we weren ' t holding it .
pub async fn check_and_hold_any_store_entry<F>(
    hash: &EntryHash,
    workspace: &mut SysValidationWorkspace,
    network: AIngleP2pCell,
    incoming_sgd_ops_sender: Option<IncomingSgdOpSender>,
    f: F,
) -> SysValidationResult<()>
where
    F: FnOnce(&Element) -> SysValidationResult<()>,
{
    let source = check_and_hold(hash, workspace, network).await?;
    f(source.as_ref())?;
    if let (Some(incoming_sgd_ops_sender), Source::Network(element)) =
        (incoming_sgd_ops_sender, source)
    {
        incoming_sgd_ops_sender.send_store_entry(element).await?;
    }
    Ok(())
}
pub async fn check_and_hold_any_store_entry < F > ( hash : & EntryHash , workspace : & mut SysValidationWorkspace , network : AIngleP2pCell , incoming_sgd_ops_sender : Option < IncomingSgdOpSender > , f : F , ) -> SysValidationResult < ( ) > where F : FnOnce ( & Element ) -> SysValidationResult < ( ) > , { let source = check_and_hold ( hash , workspace , network ) . await ? ; f ( source . as_ref ( ) ) ? ; if let ( Some ( incoming_sgd_ops_sender ) , Source :: Network ( element ) ) = ( incoming_sgd_ops_sender , source ) { incoming_sgd_ops_sender . send_store_entry ( element ) . await ? ; } Ok ( ( ) ) }
If we are not holding this entry then
retrieve any element at this EntryHash
and send it as a StoreEntry SgdOp
to our incoming_sgd_ops_workflow.
If we are not holding this entry then retrieve any element at this EntryHash and send it as a StoreEntry SgdOp to our incoming_sgd_ops_workflow .
hash
&EntryHash
workspace
&mut SysValidationWorkspace
network
AIngleP2pCell
incoming_sgd_ops_sender
Option<IncomingSgdOpSender>
f
F
hash
&EntryHash
workspace
&mut SysValidationWorkspace
network
AIngleP2pCell
incoming_sgd_ops_sender
Option<IncomingSgdOpSender>
f
F