pub fn as_bool(&self) -> Result<bool, DatamodelError> {
        match &self.value {
            ast::Expression::BooleanValue(value, _) => self.wrap_error_from_result(value.parse::<bool>(), "boolean"),
            ast::Expression::Any(value, _) => self.wrap_error_from_result(value.parse::<bool>(), "boolean"),
            // this case is just here because `as_bool_from_env` passes a StringValue
            ast::Expression::StringValue(value, _) => self.wrap_error_from_result(value.parse::<bool>(), "boolean"),
            _ => Err(self.construct_type_mismatch_error("boolean")),
        }
    }
/// Tries to convert the wrapped value to a Prisma Boolean.
Tries to convert the wrapped value to a Prisma Boolean.
Tries to convert the wrapped value to a Prisma Boolean .
pub fn as_bool(&self) -> Result<bool, DatamodelError> {
        match &self.value {
            ast::Expression::BooleanValue(value, _) => self.wrap_error_from_result(value.parse::<bool>(), "boolean"),
            ast::Expression::Any(value, _) => self.wrap_error_from_result(value.parse::<bool>(), "boolean"),
            // this case is just here because `as_bool_from_env` passes a StringValue
            ast::Expression::StringValue(value, _) => self.wrap_error_from_result(value.parse::<bool>(), "boolean"),
            _ => Err(self.construct_type_mismatch_error("boolean")),
        }
    }
pub fn as_bool ( & self ) -> Result < bool , DatamodelError > { match & self . value { ast :: Expression :: BooleanValue ( value , _ ) => self . wrap_error_from_result ( value . parse :: < bool > ( ) , " " ) , ast :: Expression :: Any ( value , _ ) => self . wrap_error_from_result ( value . parse :: < bool > ( ) , " " ) , // this case is just here because `as_bool_from_env` passes a StringValue ast :: Expression :: StringValue ( value , _ ) => self . wrap_error_from_result ( value . parse :: < bool > ( ) , " " ) , _ => Err ( self . construct_type_mismatch_error ( " " ) ) , } }
Tries to convert the wrapped value to a Prisma Boolean.
Tries to convert the wrapped value to a Prisma Boolean .
&self
&self