fidl_next_protocol/strict.rs
1// Copyright 2026 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 core::ops::Deref;
6
7/// A strict FIDL response.
8#[derive(Clone, Debug)]
9pub struct Strict<T>(pub T);
10
11impl<T> Deref for Strict<T> {
12 type Target = T;
13
14 fn deref(&self) -> &Self::Target {
15 &self.0
16 }
17}
18
19impl<T> AsRef<T> for Strict<T> {
20 fn as_ref(&self) -> &T {
21 &self.0
22 }
23}