settings/handler/
setting_proxy_inspect_info.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Copyright 2021 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

/// Used to manage the lifetime of the inspect node for `setting_proxy`.
pub struct SettingProxyInspectInfo {
    node: fuchsia_inspect::Node,
}

impl SettingProxyInspectInfo {
    /// Construct a new `setting_proxy` node under the `parent` node.
    pub fn new(parent: &fuchsia_inspect::Node) -> Self {
        Self { node: parent.create_child("setting_proxy") }
    }

    /// Retrieve the `setting_proxy` node.
    pub fn node(&self) -> &fuchsia_inspect::Node {
        &self.node
    }
}