fn make_register_agent_activity(element: Element) -> Option<(DhtOpHash, DhtOp)> {
    // Extract the data
    let (shh, _) = element.into_inner();
    let (header, signature) = shh.into_header_and_signature();

    // If the header is the wrong type exit early
    let header = header.into_content();

    // Create the hash and op
    let op = DhtOp::RegisterAgentActivity(signature, header);
    let hash = DhtOpHash::with_data_sync(&op);
    Some((hash, op))
}
/// Make a RegisterAgentActivity DhtOp from an Element.
/// Note that this can fail if the header is the wrong type
///
/// Because adding ops to incoming limbo while we are checking them
/// is only faster then waiting for them through gossip we don't care enough
/// to return an error.
Make a RegisterAgentActivity DhtOp from an Element.
Note that this can fail if the header is the wrong type

Because adding ops to incoming limbo while we are checking them
is only faster then waiting for them through gossip we don't care enough
to return an error.
Make a RegisterAgentActivity DhtOp from an Element . Note that this can fail if the header is the wrong type Because adding ops to incoming limbo while we are checking them is only faster then waiting for them through gossip we don ' t care enough to return an error .
fn make_register_agent_activity(element: Element) -> Option<(DhtOpHash, DhtOp)> {
    // Extract the data
    let (shh, _) = element.into_inner();
    let (header, signature) = shh.into_header_and_signature();
    // If the header is the wrong type exit early
    let header = header.into_content();
    // Create the hash and op
    let op = DhtOp::RegisterAgentActivity(signature, header);
    let hash = DhtOpHash::with_data_sync(&op);
    Some((hash, op))
}
fn make_register_agent_activity ( element : Element ) -> Option < ( DhtOpHash , DhtOp ) > { // Extract the data let ( shh , _ ) = element . into_inner ( ) ; let ( header , signature ) = shh . into_header_and_signature ( ) ; // If the header is the wrong type exit early let header = header . into_content ( ) ; // Create the hash and op let op = DhtOp :: RegisterAgentActivity ( signature , header ) ; let hash = DhtOpHash :: with_data_sync ( & op ) ; Some ( ( hash , op ) ) }
Make a RegisterAgentActivity DhtOp from an Element.
Make a RegisterAgentActivity DhtOp from an Element .
element
Element
element
Element