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: uicr.rs
    path of file: ./repos/tock/chips/nrf52/src
    
    the code of the file until where you have to start completion: // Licensed under the Apache License, Version 2.0 or the MIT License.
// SPDX-License-Identifier: Apache-2.0 OR MIT
// Copyright Tock Contributors 2022.

//! User information configuration registers
//!
//! Minimal implementation to 
    
    pub fn is_ap_protect_enabled(&self) -> bool {
        // We need to understand the variant of this nRF52 chip to correctly
        // implement this function. Newer versions use a different value to
        // indicate disabled.
        let factory_config = ficr::Ficr::new();
        let disabled_val = if factory_config.has_updated_approtect_logic() {
            ApProtect::PALL::HWDISABLE
        } else {
            ApProtect::PALL::DISABLED
        };

        // Here we compare to the correct DISABLED value because any other value
        // should enable the protection.
        !self.registers.approtect.matches_all(disabled_val)
    }