/rust/registry/src/index.crates.io-1949cf8c6b5b557f/anyhow-1.0.102/src/ptr.rs
Line | Count | Source |
1 | | use alloc::boxed::Box; |
2 | | use core::marker::PhantomData; |
3 | | use core::ptr::NonNull; |
4 | | |
5 | | #[repr(transparent)] |
6 | | pub struct Own<T> |
7 | | where |
8 | | T: ?Sized, |
9 | | { |
10 | | pub ptr: NonNull<T>, |
11 | | } |
12 | | |
13 | | unsafe impl<T> Send for Own<T> where T: ?Sized {} |
14 | | |
15 | | unsafe impl<T> Sync for Own<T> where T: ?Sized {} |
16 | | |
17 | | impl<T> Copy for Own<T> where T: ?Sized {} |
18 | | |
19 | | impl<T> Clone for Own<T> |
20 | | where |
21 | | T: ?Sized, |
22 | | { |
23 | 0 | fn clone(&self) -> Self { |
24 | 0 | *self |
25 | 0 | } |
26 | | } |
27 | | |
28 | | impl<T> Own<T> |
29 | | where |
30 | | T: ?Sized, |
31 | | { |
32 | 15.8k | pub fn new(ptr: Box<T>) -> Self { |
33 | 15.8k | Own { |
34 | 15.8k | ptr: unsafe { NonNull::new_unchecked(Box::into_raw(ptr)) }, |
35 | 15.8k | } |
36 | 15.8k | } <anyhow::ptr::Own<anyhow::error::ErrorImpl<http::header::value::ToStrError>>>::new Line | Count | Source | 32 | 50 | pub fn new(ptr: Box<T>) -> Self { | 33 | 50 | Own { | 34 | 50 | ptr: unsafe { NonNull::new_unchecked(Box::into_raw(ptr)) }, | 35 | 50 | } | 36 | 50 | } |
Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<anyhow::error::ContextError<&str, anyhow::Error>>>>::new Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<std::sync::mpsc::SendError<ztunnel::app::DataPlaneTask>>>>::new Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<core::fmt::Error>>>::new <anyhow::ptr::Own<anyhow::error::ErrorImpl<prost::error::DecodeError>>>::new Line | Count | Source | 32 | 14.5k | pub fn new(ptr: Box<T>) -> Self { | 33 | 14.5k | Own { | 34 | 14.5k | ptr: unsafe { NonNull::new_unchecked(Box::into_raw(ptr)) }, | 35 | 14.5k | } | 36 | 14.5k | } |
Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<ztunnel::xds::Error>>>::new Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<ztunnel::proxy::Error>>>::new Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<ztunnel::identity::Error>>>::new Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<protobuf::error::Error>>>::new Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<serde_yaml::error::Error>>>::new Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<serde_json::error::Error>>>::new Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<pprof::error::Error>>>::new Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<tracing_subscriber::filter::directive::ParseError>>>::new <anyhow::ptr::Own<anyhow::error::ErrorImpl<http::header::value::InvalidHeaderValue>>>::new Line | Count | Source | 32 | 179 | pub fn new(ptr: Box<T>) -> Self { | 33 | 179 | Own { | 34 | 179 | ptr: unsafe { NonNull::new_unchecked(Box::into_raw(ptr)) }, | 35 | 179 | } | 36 | 179 | } |
Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<core::net::parser::AddrParseError>>>::new Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<core::num::error::ParseIntError>>>::new <anyhow::ptr::Own<anyhow::error::ErrorImpl<core::str::error::Utf8Error>>>::new Line | Count | Source | 32 | 44 | pub fn new(ptr: Box<T>) -> Self { | 33 | 44 | Own { | 34 | 44 | ptr: unsafe { NonNull::new_unchecked(Box::into_raw(ptr)) }, | 35 | 44 | } | 36 | 44 | } |
Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<ztunnel::xds::client::AdsError>>>::new <anyhow::ptr::Own<anyhow::error::ErrorImpl<ztunnel::state::workload::WorkloadError>>>::new Line | Count | Source | 32 | 1.06k | pub fn new(ptr: Box<T>) -> Self { | 33 | 1.06k | Own { | 34 | 1.06k | ptr: unsafe { NonNull::new_unchecked(Box::into_raw(ptr)) }, | 35 | 1.06k | } | 36 | 1.06k | } |
Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<nix::errno::consts::Errno>>>::new Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<std::io::error::Error>>>::new Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<tokio::runtime::task::error::JoinError>>>::new Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<hyper_util::client::legacy::client::Error>>>::new Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<anyhow::wrapper::MessageError<alloc::string::String>>>>::new Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<anyhow::wrapper::MessageError<&str>>>>::new Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<anyhow::wrapper::BoxedError>>>::new |
37 | | |
38 | 31.7k | pub fn cast<U: CastTo>(self) -> Own<U::Target> { |
39 | 31.7k | Own { |
40 | 31.7k | ptr: self.ptr.cast(), |
41 | 31.7k | } |
42 | 31.7k | } <anyhow::ptr::Own<anyhow::error::ErrorImpl<http::header::value::ToStrError>>>::cast::<anyhow::error::ErrorImpl> Line | Count | Source | 38 | 50 | pub fn cast<U: CastTo>(self) -> Own<U::Target> { | 39 | 50 | Own { | 40 | 50 | ptr: self.ptr.cast(), | 41 | 50 | } | 42 | 50 | } |
Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<core::mem::manually_drop::ManuallyDrop<http::header::value::ToStrError>>> <anyhow::ptr::Own<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<http::header::value::ToStrError>> Line | Count | Source | 38 | 50 | pub fn cast<U: CastTo>(self) -> Own<U::Target> { | 39 | 50 | Own { | 40 | 50 | ptr: self.ptr.cast(), | 41 | 50 | } | 42 | 50 | } |
Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<anyhow::error::ContextError<&str, anyhow::Error>>>>::cast::<anyhow::error::ErrorImpl> Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<std::sync::mpsc::SendError<ztunnel::app::DataPlaneTask>>>>::cast::<anyhow::error::ErrorImpl> Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<core::fmt::Error>>>::cast::<anyhow::error::ErrorImpl> <anyhow::ptr::Own<anyhow::error::ErrorImpl<prost::error::DecodeError>>>::cast::<anyhow::error::ErrorImpl> Line | Count | Source | 38 | 14.5k | pub fn cast<U: CastTo>(self) -> Own<U::Target> { | 39 | 14.5k | Own { | 40 | 14.5k | ptr: self.ptr.cast(), | 41 | 14.5k | } | 42 | 14.5k | } |
Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<ztunnel::xds::Error>>>::cast::<anyhow::error::ErrorImpl> Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<ztunnel::proxy::Error>>>::cast::<anyhow::error::ErrorImpl> Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<ztunnel::identity::Error>>>::cast::<anyhow::error::ErrorImpl> Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<protobuf::error::Error>>>::cast::<anyhow::error::ErrorImpl> Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<serde_yaml::error::Error>>>::cast::<anyhow::error::ErrorImpl> Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<serde_json::error::Error>>>::cast::<anyhow::error::ErrorImpl> Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<pprof::error::Error>>>::cast::<anyhow::error::ErrorImpl> Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<tracing_subscriber::filter::directive::ParseError>>>::cast::<anyhow::error::ErrorImpl> <anyhow::ptr::Own<anyhow::error::ErrorImpl<http::header::value::InvalidHeaderValue>>>::cast::<anyhow::error::ErrorImpl> Line | Count | Source | 38 | 179 | pub fn cast<U: CastTo>(self) -> Own<U::Target> { | 39 | 179 | Own { | 40 | 179 | ptr: self.ptr.cast(), | 41 | 179 | } | 42 | 179 | } |
Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<core::net::parser::AddrParseError>>>::cast::<anyhow::error::ErrorImpl> Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<core::num::error::ParseIntError>>>::cast::<anyhow::error::ErrorImpl> <anyhow::ptr::Own<anyhow::error::ErrorImpl<core::str::error::Utf8Error>>>::cast::<anyhow::error::ErrorImpl> Line | Count | Source | 38 | 44 | pub fn cast<U: CastTo>(self) -> Own<U::Target> { | 39 | 44 | Own { | 40 | 44 | ptr: self.ptr.cast(), | 41 | 44 | } | 42 | 44 | } |
Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<ztunnel::xds::client::AdsError>>>::cast::<anyhow::error::ErrorImpl> <anyhow::ptr::Own<anyhow::error::ErrorImpl<ztunnel::state::workload::WorkloadError>>>::cast::<anyhow::error::ErrorImpl> Line | Count | Source | 38 | 1.06k | pub fn cast<U: CastTo>(self) -> Own<U::Target> { | 39 | 1.06k | Own { | 40 | 1.06k | ptr: self.ptr.cast(), | 41 | 1.06k | } | 42 | 1.06k | } |
Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<nix::errno::consts::Errno>>>::cast::<anyhow::error::ErrorImpl> Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<std::io::error::Error>>>::cast::<anyhow::error::ErrorImpl> Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<tokio::runtime::task::error::JoinError>>>::cast::<anyhow::error::ErrorImpl> Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<hyper_util::client::legacy::client::Error>>>::cast::<anyhow::error::ErrorImpl> Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<anyhow::error::ContextError<core::mem::manually_drop::ManuallyDrop<&str>, anyhow::Error>>> Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<anyhow::error::ContextError<&str, core::mem::manually_drop::ManuallyDrop<anyhow::Error>>>> Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<anyhow::error::ContextError<&str, anyhow::Error>>> Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<core::mem::manually_drop::ManuallyDrop<std::sync::mpsc::SendError<ztunnel::app::DataPlaneTask>>>> Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<core::mem::manually_drop::ManuallyDrop<core::fmt::Error>>> Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<core::mem::manually_drop::ManuallyDrop<prost::error::DecodeError>>> Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<core::mem::manually_drop::ManuallyDrop<ztunnel::xds::Error>>> Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<core::mem::manually_drop::ManuallyDrop<ztunnel::proxy::Error>>> Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<core::mem::manually_drop::ManuallyDrop<ztunnel::identity::Error>>> Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<core::mem::manually_drop::ManuallyDrop<protobuf::error::Error>>> Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<core::mem::manually_drop::ManuallyDrop<serde_yaml::error::Error>>> Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<core::mem::manually_drop::ManuallyDrop<serde_json::error::Error>>> Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<core::mem::manually_drop::ManuallyDrop<pprof::error::Error>>> Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<core::mem::manually_drop::ManuallyDrop<core::net::parser::AddrParseError>>> Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<core::mem::manually_drop::ManuallyDrop<core::num::error::ParseIntError>>> Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<core::mem::manually_drop::ManuallyDrop<core::str::error::Utf8Error>>> Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<core::mem::manually_drop::ManuallyDrop<tracing_subscriber::filter::directive::ParseError>>> Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<core::mem::manually_drop::ManuallyDrop<http::header::value::InvalidHeaderValue>>> Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<core::mem::manually_drop::ManuallyDrop<ztunnel::xds::client::AdsError>>> Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<core::mem::manually_drop::ManuallyDrop<ztunnel::state::workload::WorkloadError>>> Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<core::mem::manually_drop::ManuallyDrop<nix::errno::consts::Errno>>> Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<core::mem::manually_drop::ManuallyDrop<std::io::error::Error>>> Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<core::mem::manually_drop::ManuallyDrop<tokio::runtime::task::error::JoinError>>> Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<core::mem::manually_drop::ManuallyDrop<hyper_util::client::legacy::client::Error>>> Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<std::sync::mpsc::SendError<ztunnel::app::DataPlaneTask>>> Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<core::fmt::Error>> <anyhow::ptr::Own<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<prost::error::DecodeError>> Line | Count | Source | 38 | 14.5k | pub fn cast<U: CastTo>(self) -> Own<U::Target> { | 39 | 14.5k | Own { | 40 | 14.5k | ptr: self.ptr.cast(), | 41 | 14.5k | } | 42 | 14.5k | } |
Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<ztunnel::xds::Error>> Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<ztunnel::proxy::Error>> Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<ztunnel::identity::Error>> Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<protobuf::error::Error>> Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<serde_yaml::error::Error>> Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<serde_json::error::Error>> Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<pprof::error::Error>> Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<tracing_subscriber::filter::directive::ParseError>> <anyhow::ptr::Own<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<http::header::value::InvalidHeaderValue>> Line | Count | Source | 38 | 179 | pub fn cast<U: CastTo>(self) -> Own<U::Target> { | 39 | 179 | Own { | 40 | 179 | ptr: self.ptr.cast(), | 41 | 179 | } | 42 | 179 | } |
Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<core::net::parser::AddrParseError>> Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<core::num::error::ParseIntError>> <anyhow::ptr::Own<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<core::str::error::Utf8Error>> Line | Count | Source | 38 | 44 | pub fn cast<U: CastTo>(self) -> Own<U::Target> { | 39 | 44 | Own { | 40 | 44 | ptr: self.ptr.cast(), | 41 | 44 | } | 42 | 44 | } |
Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<ztunnel::xds::client::AdsError>> <anyhow::ptr::Own<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<ztunnel::state::workload::WorkloadError>> Line | Count | Source | 38 | 1.06k | pub fn cast<U: CastTo>(self) -> Own<U::Target> { | 39 | 1.06k | Own { | 40 | 1.06k | ptr: self.ptr.cast(), | 41 | 1.06k | } | 42 | 1.06k | } |
Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<nix::errno::consts::Errno>> Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<std::io::error::Error>> Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<tokio::runtime::task::error::JoinError>> Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<hyper_util::client::legacy::client::Error>> Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<anyhow::wrapper::MessageError<alloc::string::String>>>>::cast::<anyhow::error::ErrorImpl> Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<anyhow::wrapper::MessageError<&str>>>>::cast::<anyhow::error::ErrorImpl> Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<anyhow::wrapper::BoxedError>>>::cast::<anyhow::error::ErrorImpl> Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<anyhow::wrapper::MessageError<alloc::string::String>>> Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<anyhow::wrapper::MessageError<&str>>> Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<core::mem::manually_drop::ManuallyDrop<alloc::boxed::Box<dyn core::error::Error + core::marker::Sync + core::marker::Send>>>> Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<core::mem::manually_drop::ManuallyDrop<alloc::string::String>>> Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<core::mem::manually_drop::ManuallyDrop<&str>>> Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<anyhow::wrapper::BoxedError>> |
43 | | |
44 | 15.8k | pub unsafe fn boxed(self) -> Box<T> { |
45 | 15.8k | unsafe { Box::from_raw(self.ptr.as_ptr()) } |
46 | 15.8k | } Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<core::mem::manually_drop::ManuallyDrop<http::header::value::ToStrError>>>>::boxed <anyhow::ptr::Own<anyhow::error::ErrorImpl<http::header::value::ToStrError>>>::boxed Line | Count | Source | 44 | 50 | pub unsafe fn boxed(self) -> Box<T> { | 45 | 50 | unsafe { Box::from_raw(self.ptr.as_ptr()) } | 46 | 50 | } |
Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<anyhow::error::ContextError<core::mem::manually_drop::ManuallyDrop<&str>, anyhow::Error>>>>::boxed Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<anyhow::error::ContextError<&str, core::mem::manually_drop::ManuallyDrop<anyhow::Error>>>>>::boxed Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<anyhow::error::ContextError<&str, anyhow::Error>>>>::boxed Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<core::mem::manually_drop::ManuallyDrop<std::sync::mpsc::SendError<ztunnel::app::DataPlaneTask>>>>>::boxed Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<core::mem::manually_drop::ManuallyDrop<core::fmt::Error>>>>::boxed Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<core::mem::manually_drop::ManuallyDrop<prost::error::DecodeError>>>>::boxed Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<core::mem::manually_drop::ManuallyDrop<ztunnel::xds::Error>>>>::boxed Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<core::mem::manually_drop::ManuallyDrop<ztunnel::proxy::Error>>>>::boxed Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<core::mem::manually_drop::ManuallyDrop<ztunnel::identity::Error>>>>::boxed Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<core::mem::manually_drop::ManuallyDrop<protobuf::error::Error>>>>::boxed Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<core::mem::manually_drop::ManuallyDrop<serde_yaml::error::Error>>>>::boxed Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<core::mem::manually_drop::ManuallyDrop<serde_json::error::Error>>>>::boxed Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<core::mem::manually_drop::ManuallyDrop<pprof::error::Error>>>>::boxed Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<core::mem::manually_drop::ManuallyDrop<core::net::parser::AddrParseError>>>>::boxed Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<core::mem::manually_drop::ManuallyDrop<core::num::error::ParseIntError>>>>::boxed Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<core::mem::manually_drop::ManuallyDrop<core::str::error::Utf8Error>>>>::boxed Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<core::mem::manually_drop::ManuallyDrop<tracing_subscriber::filter::directive::ParseError>>>>::boxed Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<core::mem::manually_drop::ManuallyDrop<http::header::value::InvalidHeaderValue>>>>::boxed Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<core::mem::manually_drop::ManuallyDrop<ztunnel::xds::client::AdsError>>>>::boxed Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<core::mem::manually_drop::ManuallyDrop<ztunnel::state::workload::WorkloadError>>>>::boxed Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<core::mem::manually_drop::ManuallyDrop<nix::errno::consts::Errno>>>>::boxed Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<core::mem::manually_drop::ManuallyDrop<std::io::error::Error>>>>::boxed Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<core::mem::manually_drop::ManuallyDrop<tokio::runtime::task::error::JoinError>>>>::boxed Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<core::mem::manually_drop::ManuallyDrop<hyper_util::client::legacy::client::Error>>>>::boxed Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<std::sync::mpsc::SendError<ztunnel::app::DataPlaneTask>>>>::boxed Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<core::fmt::Error>>>::boxed <anyhow::ptr::Own<anyhow::error::ErrorImpl<prost::error::DecodeError>>>::boxed Line | Count | Source | 44 | 14.5k | pub unsafe fn boxed(self) -> Box<T> { | 45 | 14.5k | unsafe { Box::from_raw(self.ptr.as_ptr()) } | 46 | 14.5k | } |
Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<ztunnel::xds::Error>>>::boxed Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<ztunnel::proxy::Error>>>::boxed Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<ztunnel::identity::Error>>>::boxed Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<protobuf::error::Error>>>::boxed Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<serde_yaml::error::Error>>>::boxed Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<serde_json::error::Error>>>::boxed Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<pprof::error::Error>>>::boxed Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<tracing_subscriber::filter::directive::ParseError>>>::boxed <anyhow::ptr::Own<anyhow::error::ErrorImpl<http::header::value::InvalidHeaderValue>>>::boxed Line | Count | Source | 44 | 179 | pub unsafe fn boxed(self) -> Box<T> { | 45 | 179 | unsafe { Box::from_raw(self.ptr.as_ptr()) } | 46 | 179 | } |
Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<core::net::parser::AddrParseError>>>::boxed Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<core::num::error::ParseIntError>>>::boxed <anyhow::ptr::Own<anyhow::error::ErrorImpl<core::str::error::Utf8Error>>>::boxed Line | Count | Source | 44 | 44 | pub unsafe fn boxed(self) -> Box<T> { | 45 | 44 | unsafe { Box::from_raw(self.ptr.as_ptr()) } | 46 | 44 | } |
Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<ztunnel::xds::client::AdsError>>>::boxed <anyhow::ptr::Own<anyhow::error::ErrorImpl<ztunnel::state::workload::WorkloadError>>>::boxed Line | Count | Source | 44 | 1.06k | pub unsafe fn boxed(self) -> Box<T> { | 45 | 1.06k | unsafe { Box::from_raw(self.ptr.as_ptr()) } | 46 | 1.06k | } |
Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<nix::errno::consts::Errno>>>::boxed Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<std::io::error::Error>>>::boxed Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<tokio::runtime::task::error::JoinError>>>::boxed Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<hyper_util::client::legacy::client::Error>>>::boxed Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<anyhow::wrapper::MessageError<alloc::string::String>>>>::boxed Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<anyhow::wrapper::MessageError<&str>>>>::boxed Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<core::mem::manually_drop::ManuallyDrop<alloc::boxed::Box<dyn core::error::Error + core::marker::Sync + core::marker::Send>>>>>::boxed Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<core::mem::manually_drop::ManuallyDrop<alloc::string::String>>>>::boxed Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<core::mem::manually_drop::ManuallyDrop<&str>>>>::boxed Unexecuted instantiation: <anyhow::ptr::Own<anyhow::error::ErrorImpl<anyhow::wrapper::BoxedError>>>::boxed |
47 | | |
48 | 0 | pub fn by_ref(&self) -> Ref<T> { |
49 | 0 | Ref { |
50 | 0 | ptr: self.ptr, |
51 | 0 | lifetime: PhantomData, |
52 | 0 | } |
53 | 0 | } |
54 | | |
55 | 0 | pub fn by_mut(&mut self) -> Mut<T> { |
56 | 0 | Mut { |
57 | 0 | ptr: self.ptr, |
58 | 0 | lifetime: PhantomData, |
59 | 0 | } |
60 | 0 | } |
61 | | } |
62 | | |
63 | | #[repr(transparent)] |
64 | | pub struct Ref<'a, T> |
65 | | where |
66 | | T: ?Sized, |
67 | | { |
68 | | pub ptr: NonNull<T>, |
69 | | lifetime: PhantomData<&'a T>, |
70 | | } |
71 | | |
72 | | impl<'a, T> Copy for Ref<'a, T> where T: ?Sized {} |
73 | | |
74 | | impl<'a, T> Clone for Ref<'a, T> |
75 | | where |
76 | | T: ?Sized, |
77 | | { |
78 | 0 | fn clone(&self) -> Self { |
79 | 0 | *self |
80 | 0 | } |
81 | | } |
82 | | |
83 | | impl<'a, T> Ref<'a, T> |
84 | | where |
85 | | T: ?Sized, |
86 | | { |
87 | 0 | pub fn new(ptr: &'a T) -> Self { |
88 | 0 | Ref { |
89 | 0 | ptr: NonNull::from(ptr), |
90 | 0 | lifetime: PhantomData, |
91 | 0 | } |
92 | 0 | } Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<http::header::value::ToStrError>>>::new Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<anyhow::error::ContextError<&str, anyhow::Error>>>>::new Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<std::sync::mpsc::SendError<ztunnel::app::DataPlaneTask>>>>::new Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<core::fmt::Error>>>::new Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<prost::error::DecodeError>>>::new Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<ztunnel::xds::Error>>>::new Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<ztunnel::proxy::Error>>>::new Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<ztunnel::identity::Error>>>::new Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<protobuf::error::Error>>>::new Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<serde_yaml::error::Error>>>::new Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<serde_json::error::Error>>>::new Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<pprof::error::Error>>>::new Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<tracing_subscriber::filter::directive::ParseError>>>::new Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<http::header::value::InvalidHeaderValue>>>::new Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<core::net::parser::AddrParseError>>>::new Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<core::num::error::ParseIntError>>>::new Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<core::str::error::Utf8Error>>>::new Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<ztunnel::xds::client::AdsError>>>::new Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<ztunnel::state::workload::WorkloadError>>>::new Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<nix::errno::consts::Errno>>>::new Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<std::io::error::Error>>>::new Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<tokio::runtime::task::error::JoinError>>>::new Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<hyper_util::client::legacy::client::Error>>>::new Unexecuted instantiation: <anyhow::ptr::Ref<&str>>::new Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<anyhow::wrapper::MessageError<alloc::string::String>>>>::new Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<anyhow::wrapper::MessageError<&str>>>>::new Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<anyhow::wrapper::BoxedError>>>::new |
93 | | |
94 | 0 | pub fn from_raw(ptr: NonNull<T>) -> Self { |
95 | 0 | Ref { |
96 | 0 | ptr, |
97 | 0 | lifetime: PhantomData, |
98 | 0 | } |
99 | 0 | } Unexecuted instantiation: <anyhow::ptr::Ref<http::header::value::ToStrError>>::from_raw Unexecuted instantiation: <anyhow::ptr::Ref<std::sync::mpsc::SendError<ztunnel::app::DataPlaneTask>>>::from_raw Unexecuted instantiation: <anyhow::ptr::Ref<core::fmt::Error>>::from_raw Unexecuted instantiation: <anyhow::ptr::Ref<prost::error::DecodeError>>::from_raw Unexecuted instantiation: <anyhow::ptr::Ref<ztunnel::xds::Error>>::from_raw Unexecuted instantiation: <anyhow::ptr::Ref<ztunnel::proxy::Error>>::from_raw Unexecuted instantiation: <anyhow::ptr::Ref<ztunnel::identity::Error>>::from_raw Unexecuted instantiation: <anyhow::ptr::Ref<protobuf::error::Error>>::from_raw Unexecuted instantiation: <anyhow::ptr::Ref<serde_yaml::error::Error>>::from_raw Unexecuted instantiation: <anyhow::ptr::Ref<serde_json::error::Error>>::from_raw Unexecuted instantiation: <anyhow::ptr::Ref<pprof::error::Error>>::from_raw Unexecuted instantiation: <anyhow::ptr::Ref<tracing_subscriber::filter::directive::ParseError>>::from_raw Unexecuted instantiation: <anyhow::ptr::Ref<http::header::value::InvalidHeaderValue>>::from_raw Unexecuted instantiation: <anyhow::ptr::Ref<core::net::parser::AddrParseError>>::from_raw Unexecuted instantiation: <anyhow::ptr::Ref<core::num::error::ParseIntError>>::from_raw Unexecuted instantiation: <anyhow::ptr::Ref<core::str::error::Utf8Error>>::from_raw Unexecuted instantiation: <anyhow::ptr::Ref<ztunnel::xds::client::AdsError>>::from_raw Unexecuted instantiation: <anyhow::ptr::Ref<ztunnel::state::workload::WorkloadError>>::from_raw Unexecuted instantiation: <anyhow::ptr::Ref<nix::errno::consts::Errno>>::from_raw Unexecuted instantiation: <anyhow::ptr::Ref<std::io::error::Error>>::from_raw Unexecuted instantiation: <anyhow::ptr::Ref<tokio::runtime::task::error::JoinError>>::from_raw Unexecuted instantiation: <anyhow::ptr::Ref<hyper_util::client::legacy::client::Error>>::from_raw Unexecuted instantiation: <anyhow::ptr::Ref<dyn core::error::Error + core::marker::Sync + core::marker::Send>>::from_raw Unexecuted instantiation: <anyhow::ptr::Ref<alloc::boxed::Box<dyn core::error::Error + core::marker::Sync + core::marker::Send>>>::from_raw Unexecuted instantiation: <anyhow::ptr::Ref<alloc::string::String>>::from_raw Unexecuted instantiation: <anyhow::ptr::Ref<&str>>::from_raw |
100 | | |
101 | 0 | pub fn cast<U: CastTo>(self) -> Ref<'a, U::Target> { |
102 | 0 | Ref { |
103 | 0 | ptr: self.ptr.cast(), |
104 | 0 | lifetime: PhantomData, |
105 | 0 | } |
106 | 0 | } Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<http::header::value::ToStrError>>>::cast::<anyhow::error::ErrorImpl> Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<http::header::value::ToStrError>> Unexecuted instantiation: <anyhow::ptr::Ref<http::header::value::ToStrError>>::cast::<()> Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<anyhow::error::ContextError<&str, anyhow::Error>>>>::cast::<anyhow::error::ErrorImpl> Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<std::sync::mpsc::SendError<ztunnel::app::DataPlaneTask>>>>::cast::<anyhow::error::ErrorImpl> Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<core::fmt::Error>>>::cast::<anyhow::error::ErrorImpl> Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<prost::error::DecodeError>>>::cast::<anyhow::error::ErrorImpl> Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<ztunnel::xds::Error>>>::cast::<anyhow::error::ErrorImpl> Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<ztunnel::proxy::Error>>>::cast::<anyhow::error::ErrorImpl> Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<ztunnel::identity::Error>>>::cast::<anyhow::error::ErrorImpl> Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<protobuf::error::Error>>>::cast::<anyhow::error::ErrorImpl> Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<serde_yaml::error::Error>>>::cast::<anyhow::error::ErrorImpl> Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<serde_json::error::Error>>>::cast::<anyhow::error::ErrorImpl> Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<pprof::error::Error>>>::cast::<anyhow::error::ErrorImpl> Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<tracing_subscriber::filter::directive::ParseError>>>::cast::<anyhow::error::ErrorImpl> Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<http::header::value::InvalidHeaderValue>>>::cast::<anyhow::error::ErrorImpl> Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<core::net::parser::AddrParseError>>>::cast::<anyhow::error::ErrorImpl> Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<core::num::error::ParseIntError>>>::cast::<anyhow::error::ErrorImpl> Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<core::str::error::Utf8Error>>>::cast::<anyhow::error::ErrorImpl> Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<ztunnel::xds::client::AdsError>>>::cast::<anyhow::error::ErrorImpl> Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<ztunnel::state::workload::WorkloadError>>>::cast::<anyhow::error::ErrorImpl> Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<nix::errno::consts::Errno>>>::cast::<anyhow::error::ErrorImpl> Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<std::io::error::Error>>>::cast::<anyhow::error::ErrorImpl> Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<tokio::runtime::task::error::JoinError>>>::cast::<anyhow::error::ErrorImpl> Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<hyper_util::client::legacy::client::Error>>>::cast::<anyhow::error::ErrorImpl> Unexecuted instantiation: <anyhow::ptr::Ref<std::sync::mpsc::SendError<ztunnel::app::DataPlaneTask>>>::cast::<()> Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<anyhow::error::ContextError<&str, anyhow::Error>>> Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<std::sync::mpsc::SendError<ztunnel::app::DataPlaneTask>>> Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<core::fmt::Error>> Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<prost::error::DecodeError>> Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<ztunnel::xds::Error>> Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<ztunnel::proxy::Error>> Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<ztunnel::identity::Error>> Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<protobuf::error::Error>> Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<serde_yaml::error::Error>> Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<serde_json::error::Error>> Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<pprof::error::Error>> Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<tracing_subscriber::filter::directive::ParseError>> Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<http::header::value::InvalidHeaderValue>> Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<core::net::parser::AddrParseError>> Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<core::num::error::ParseIntError>> Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<core::str::error::Utf8Error>> Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<ztunnel::xds::client::AdsError>> Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<ztunnel::state::workload::WorkloadError>> Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<nix::errno::consts::Errno>> Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<std::io::error::Error>> Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<tokio::runtime::task::error::JoinError>> Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<hyper_util::client::legacy::client::Error>> Unexecuted instantiation: <anyhow::ptr::Ref<core::fmt::Error>>::cast::<()> Unexecuted instantiation: <anyhow::ptr::Ref<prost::error::DecodeError>>::cast::<()> Unexecuted instantiation: <anyhow::ptr::Ref<ztunnel::xds::Error>>::cast::<()> Unexecuted instantiation: <anyhow::ptr::Ref<ztunnel::proxy::Error>>::cast::<()> Unexecuted instantiation: <anyhow::ptr::Ref<ztunnel::identity::Error>>::cast::<()> Unexecuted instantiation: <anyhow::ptr::Ref<protobuf::error::Error>>::cast::<()> Unexecuted instantiation: <anyhow::ptr::Ref<serde_yaml::error::Error>>::cast::<()> Unexecuted instantiation: <anyhow::ptr::Ref<serde_json::error::Error>>::cast::<()> Unexecuted instantiation: <anyhow::ptr::Ref<pprof::error::Error>>::cast::<()> Unexecuted instantiation: <anyhow::ptr::Ref<tracing_subscriber::filter::directive::ParseError>>::cast::<()> Unexecuted instantiation: <anyhow::ptr::Ref<http::header::value::InvalidHeaderValue>>::cast::<()> Unexecuted instantiation: <anyhow::ptr::Ref<core::net::parser::AddrParseError>>::cast::<()> Unexecuted instantiation: <anyhow::ptr::Ref<core::num::error::ParseIntError>>::cast::<()> Unexecuted instantiation: <anyhow::ptr::Ref<core::str::error::Utf8Error>>::cast::<()> Unexecuted instantiation: <anyhow::ptr::Ref<ztunnel::xds::client::AdsError>>::cast::<()> Unexecuted instantiation: <anyhow::ptr::Ref<ztunnel::state::workload::WorkloadError>>::cast::<()> Unexecuted instantiation: <anyhow::ptr::Ref<nix::errno::consts::Errno>>::cast::<()> Unexecuted instantiation: <anyhow::ptr::Ref<std::io::error::Error>>::cast::<()> Unexecuted instantiation: <anyhow::ptr::Ref<tokio::runtime::task::error::JoinError>>::cast::<()> Unexecuted instantiation: <anyhow::ptr::Ref<hyper_util::client::legacy::client::Error>>::cast::<()> Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<anyhow::wrapper::MessageError<alloc::string::String>>>>::cast::<anyhow::error::ErrorImpl> Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<anyhow::wrapper::MessageError<&str>>>>::cast::<anyhow::error::ErrorImpl> Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<anyhow::wrapper::BoxedError>>>::cast::<anyhow::error::ErrorImpl> Unexecuted instantiation: <anyhow::ptr::Ref<alloc::boxed::Box<dyn core::error::Error + core::marker::Sync + core::marker::Send>>>::cast::<()> Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<anyhow::wrapper::MessageError<alloc::string::String>>> Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<anyhow::wrapper::MessageError<&str>>> Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<alloc::boxed::Box<dyn core::error::Error + core::marker::Sync + core::marker::Send>>> Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<anyhow::wrapper::BoxedError>> Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<alloc::string::String>> Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl>>::cast::<anyhow::error::ErrorImpl<&str>> Unexecuted instantiation: <anyhow::ptr::Ref<alloc::string::String>>::cast::<()> Unexecuted instantiation: <anyhow::ptr::Ref<&str>>::cast::<()> |
107 | | |
108 | 0 | pub fn by_mut(self) -> Mut<'a, T> { |
109 | 0 | Mut { |
110 | 0 | ptr: self.ptr, |
111 | 0 | lifetime: PhantomData, |
112 | 0 | } |
113 | 0 | } |
114 | | |
115 | 0 | pub fn as_ptr(self) -> *const T { |
116 | 0 | self.ptr.as_ptr().cast_const() |
117 | 0 | } Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<http::header::value::ToStrError>>>::as_ptr Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<anyhow::error::ContextError<&str, anyhow::Error>>>>::as_ptr Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<std::sync::mpsc::SendError<ztunnel::app::DataPlaneTask>>>>::as_ptr Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<core::fmt::Error>>>::as_ptr Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<prost::error::DecodeError>>>::as_ptr Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<ztunnel::xds::Error>>>::as_ptr Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<ztunnel::proxy::Error>>>::as_ptr Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<ztunnel::identity::Error>>>::as_ptr Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<protobuf::error::Error>>>::as_ptr Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<serde_yaml::error::Error>>>::as_ptr Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<serde_json::error::Error>>>::as_ptr Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<pprof::error::Error>>>::as_ptr Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<tracing_subscriber::filter::directive::ParseError>>>::as_ptr Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<http::header::value::InvalidHeaderValue>>>::as_ptr Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<core::net::parser::AddrParseError>>>::as_ptr Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<core::num::error::ParseIntError>>>::as_ptr Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<core::str::error::Utf8Error>>>::as_ptr Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<ztunnel::xds::client::AdsError>>>::as_ptr Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<ztunnel::state::workload::WorkloadError>>>::as_ptr Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<nix::errno::consts::Errno>>>::as_ptr Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<std::io::error::Error>>>::as_ptr Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<tokio::runtime::task::error::JoinError>>>::as_ptr Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<hyper_util::client::legacy::client::Error>>>::as_ptr Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<anyhow::wrapper::MessageError<alloc::string::String>>>>::as_ptr Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<anyhow::wrapper::MessageError<&str>>>>::as_ptr Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<alloc::boxed::Box<dyn core::error::Error + core::marker::Sync + core::marker::Send>>>>::as_ptr Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<anyhow::wrapper::BoxedError>>>::as_ptr Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<alloc::string::String>>>::as_ptr Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<&str>>>::as_ptr |
118 | | |
119 | 0 | pub unsafe fn deref(self) -> &'a T { |
120 | 0 | unsafe { &*self.ptr.as_ptr() } |
121 | 0 | } Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl<anyhow::error::ContextError<&str, anyhow::Error>>>>::deref Unexecuted instantiation: <anyhow::ptr::Ref<dyn core::error::Error + core::marker::Sync + core::marker::Send>>::deref Unexecuted instantiation: <anyhow::ptr::Ref<anyhow::error::ErrorImpl>>::deref |
122 | | } |
123 | | |
124 | | #[repr(transparent)] |
125 | | pub struct Mut<'a, T> |
126 | | where |
127 | | T: ?Sized, |
128 | | { |
129 | | pub ptr: NonNull<T>, |
130 | | lifetime: PhantomData<&'a mut T>, |
131 | | } |
132 | | |
133 | | impl<'a, T> Copy for Mut<'a, T> where T: ?Sized {} |
134 | | |
135 | | impl<'a, T> Clone for Mut<'a, T> |
136 | | where |
137 | | T: ?Sized, |
138 | | { |
139 | 0 | fn clone(&self) -> Self { |
140 | 0 | *self |
141 | 0 | } |
142 | | } |
143 | | |
144 | | impl<'a, T> Mut<'a, T> |
145 | | where |
146 | | T: ?Sized, |
147 | | { |
148 | 0 | pub fn cast<U: CastTo>(self) -> Mut<'a, U::Target> { |
149 | 0 | Mut { |
150 | 0 | ptr: self.ptr.cast(), |
151 | 0 | lifetime: PhantomData, |
152 | 0 | } |
153 | 0 | } |
154 | | |
155 | 0 | pub fn by_ref(self) -> Ref<'a, T> { |
156 | 0 | Ref { |
157 | 0 | ptr: self.ptr, |
158 | 0 | lifetime: PhantomData, |
159 | 0 | } |
160 | 0 | } |
161 | | |
162 | 0 | pub fn extend<'b>(self) -> Mut<'b, T> { |
163 | 0 | Mut { |
164 | 0 | ptr: self.ptr, |
165 | 0 | lifetime: PhantomData, |
166 | 0 | } |
167 | 0 | } |
168 | | |
169 | 0 | pub unsafe fn deref_mut(self) -> &'a mut T { |
170 | 0 | unsafe { &mut *self.ptr.as_ptr() } |
171 | 0 | } |
172 | | } |
173 | | |
174 | | impl<'a, T> Mut<'a, T> { |
175 | 0 | pub unsafe fn read(self) -> T { |
176 | 0 | unsafe { self.ptr.as_ptr().read() } |
177 | 0 | } |
178 | | } |
179 | | |
180 | | // Force turbofish on all calls of `.cast::<U>()`. |
181 | | pub trait CastTo { |
182 | | type Target; |
183 | | } |
184 | | |
185 | | impl<T> CastTo for T { |
186 | | type Target = T; |
187 | | } |