You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: handler.rs
    path of file: ./repos/CYFS/src/component/cyfs-stack/src/sync/server
    
    the code of the file until where you have to start completion: use super::super::protocol::*;
use super::zone_sync_server::*;
use cyfs_base::*;
use cyfs_lib::*;

use std::sync::Arc;
use tide::Response;

#[derive(Clone)]
pub(crate) struct ZoneSyncRequestHandler {
    protocol: RequestProtocol,
    server: Arc<Zon
    
    fn encode_diff_response(resp: SyncDiffResponse) -> Response {
        let mut http_resp: http_types::Response = RequestorHelper::new_ok_response();
        RequestorHelper::encode_header(&mut http_resp, cyfs_base::CYFS_REVISION, &resp.revision);
        RequestorHelper::encode_opt_header(&mut http_resp, cyfs_base::CYFS_TARGET, &resp.target);

        if resp.objects.len() > 0 {
            if let Err(e)  = SyncObjectsResponse::encode_objects(&mut http_resp, resp.objects) {
                error!("encode diff response error! {}", e);
                return RequestorHelper::trans_error(e);
            }
        }

        http_resp.into()
    }