pub fn from(demand: &'a Demand) -> Result<PreparedDemand, PrepareError> {
        let demand_cons_tags = ldap_parser::parse(&demand.constraints).map_err(|error| {
            PrepareError::new(&format!("Error parsing Demand constraints: {}", error))
        })?;
        let result = PreparedDemand {
            demand_id: demand.demand_id.clone(),
            requestor_id: demand.requestor_id.clone(),
            properties: PropertySet::from_flat_props(&demand.properties),
            constraints: build_expression(&demand_cons_tags).map_err(|error| {
                PrepareError::new(&format!(
                    "Error building Demand constraints expression: {}",
                    error
                ))
            })?,
        };

        Ok(result)
    }
// Process a Demand to obtain a PreparedDemand
Process a Demand to obtain a PreparedDemand
Process a Demand to obtain a PreparedDemand
pub fn from(demand: &'a Demand) -> Result<PreparedDemand, PrepareError> {
        let demand_cons_tags = ldap_parser::parse(&demand.constraints).map_err(|error| {
            PrepareError::new(&format!("Error parsing Demand constraints: {}", error))
        })?;
        let result = PreparedDemand {
            demand_id: demand.demand_id.clone(),
            requestor_id: demand.requestor_id.clone(),
            properties: PropertySet::from_flat_props(&demand.properties),
            constraints: build_expression(&demand_cons_tags).map_err(|error| {
                PrepareError::new(&format!(
                    "Error building Demand constraints expression: {}",
                    error
                ))
            })?,
        };
        Ok(result)
    }
pub fn from ( demand : & ' a Demand ) -> Result < PreparedDemand , PrepareError > { let demand_cons_tags = ldap_parser :: parse ( & demand . constraints ) . map_err ( | error | { PrepareError :: new ( & format ! ( " " error ) ) } ) ? ; let result = PreparedDemand { demand_id : demand . demand_id . clone ( ) , requestor_id : demand . requestor_id . clone ( ) , properties : PropertySet :: from_flat_props ( & demand . properties ) , constraints : build_expression ( & demand_cons_tags ) . map_err ( | error | { PrepareError :: new ( & format ! ( " " error ) ) } ) ? , } ; Ok ( result ) }
Process a Demand to obtain a PreparedDemand
Process a Demand to obtain a PreparedDemand
demand
&'a Demand
demand
&'a Demand