settings_factory_reset/types.rs
1// Copyright 2021 The Fuchsia Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5use serde::{Deserialize, Serialize};
6use settings_common::inspect::event::Nameable;
7
8#[derive(Debug, Copy, Clone, PartialEq, Eq, Serialize, Deserialize)]
9pub struct FactoryResetInfo {
10 pub is_local_reset_allowed: bool,
11}
12
13impl FactoryResetInfo {
14 pub const fn new(is_local_reset_allowed: bool) -> Self {
15 Self { is_local_reset_allowed }
16 }
17}
18
19impl Nameable for FactoryResetInfo {
20 const NAME: &str = "FactoryReset";
21}