1 #[cfg(feature = "Web_AtomPub")]
3 #[cfg(feature = "Web_Http")]
5 #[cfg(feature = "Web_Syndication")]
7 #[cfg(feature = "Web_UI")]
9 #[doc = "*Required features: `\"Web\"`*"]
11 pub struct IUriToStreamResolver(::windows
::core
::IUnknown
);
12 impl IUriToStreamResolver
{
13 #[doc = "*Required features: `\"Foundation\"`, `\"Storage_Streams\"`*"]
14 #[cfg(all(feature = "Foundation", feature = "Storage_Streams"))]
15 pub fn UriToStreamAsync(&self, uri
: &super::Foundation
::Uri
) -> ::windows
::core
::Result
<super::Foundation
::IAsyncOperation
<super::Storage
::Streams
::IInputStream
>> {
18 let mut result__
= ::windows
::core
::zeroed
::<super::Foundation
::IAsyncOperation
<super::Storage
::Streams
::IInputStream
>>();
19 (::windows
::core
::Interface
::vtable(this
).UriToStreamAsync
)(::windows
::core
::Interface
::as_raw(this
), ::core
::mem
::transmute_copy(uri
), &mut result__
).from_abi(result__
)
23 ::windows
::imp
::interface_hierarchy
!(IUriToStreamResolver
, ::windows
::core
::IUnknown
, ::windows
::core
::IInspectable
);
24 impl ::core
::cmp
::PartialEq
for IUriToStreamResolver
{
25 fn eq(&self, other
: &Self) -> bool
{
29 impl ::core
::cmp
::Eq
for IUriToStreamResolver {}
30 impl ::core
::fmt
::Debug
for IUriToStreamResolver
{
31 fn fmt(&self, f
: &mut ::core
::fmt
::Formatter
<'_
>) -> ::core
::fmt
::Result
{
32 f
.debug_tuple("IUriToStreamResolver").field(&self.0).finish()
35 impl ::windows
::core
::RuntimeType
for IUriToStreamResolver
{
36 const SIGNATURE
: ::windows
::imp
::ConstBuffer
= ::windows
::imp
::ConstBuffer
::from_slice(b
"{b0aba86a-9aeb-4d3a-9590-003e3ca7e290}");
38 unsafe impl ::windows
::core
::Interface
for IUriToStreamResolver
{
39 type Vtable
= IUriToStreamResolver_Vtbl
;
41 impl ::core
::clone
::Clone
for IUriToStreamResolver
{
42 fn clone(&self) -> Self {
46 unsafe impl ::windows
::core
::ComInterface
for IUriToStreamResolver
{
47 const IID
: ::windows
::core
::GUID
= ::windows
::core
::GUID
::from_u128(0xb0aba86a_9aeb_4d3a_9590_003e3ca7e290);
51 pub struct IUriToStreamResolver_Vtbl
{
52 pub base__
: ::windows
::core
::IInspectable_Vtbl
,
53 #[cfg(all(feature = "Foundation", feature = "Storage_Streams"))]
54 pub UriToStreamAsync
: unsafe extern "system" fn(this
: *mut ::core
::ffi
::c_void
, uri
: *mut ::core
::ffi
::c_void
, result__
: *mut *mut ::core
::ffi
::c_void
) -> ::windows
::core
::HRESULT
,
55 #[cfg(not(all(feature = "Foundation", feature = "Storage_Streams")))]
56 UriToStreamAsync
: usize,
60 pub struct IWebErrorStatics(::windows
::core
::IUnknown
);
61 unsafe impl ::windows
::core
::Interface
for IWebErrorStatics
{
62 type Vtable
= IWebErrorStatics_Vtbl
;
64 impl ::core
::clone
::Clone
for IWebErrorStatics
{
65 fn clone(&self) -> Self {
69 unsafe impl ::windows
::core
::ComInterface
for IWebErrorStatics
{
70 const IID
: ::windows
::core
::GUID
= ::windows
::core
::GUID
::from_u128(0xfe616766_bf27_4064_87b7_6563bb11ce2e);
74 pub struct IWebErrorStatics_Vtbl
{
75 pub base__
: ::windows
::core
::IInspectable_Vtbl
,
76 pub GetStatus
: unsafe extern "system" fn(this
: *mut ::core
::ffi
::c_void
, hresult
: i32, result__
: *mut WebErrorStatus
) -> ::windows
::core
::HRESULT
,
78 #[doc = "*Required features: `\"Web\"`*"]
81 pub fn GetStatus(hresult
: i32) -> ::windows
::core
::Result
<WebErrorStatus
> {
82 Self::IWebErrorStatics(|this
| unsafe {
83 let mut result__
= ::windows
::core
::zeroed
::<WebErrorStatus
>();
84 (::windows
::core
::Interface
::vtable(this
).GetStatus
)(::windows
::core
::Interface
::as_raw(this
), hresult
, &mut result__
).from_abi(result__
)
88 pub fn IWebErrorStatics
<R
, F
: FnOnce(&IWebErrorStatics
) -> ::windows
::core
::Result
<R
>>(callback
: F
) -> ::windows
::core
::Result
<R
> {
89 static SHARED
: ::windows
::imp
::FactoryCache
<WebError
, IWebErrorStatics
> = ::windows
::imp
::FactoryCache
::new();
93 impl ::windows
::core
::RuntimeName
for WebError
{
94 const NAME
: &'
static str = "Windows.Web.WebError";
96 #[doc = "*Required features: `\"Web\"`*"]
98 #[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
99 pub struct WebErrorStatus(pub i32);
100 impl WebErrorStatus
{
101 pub const Unknown
: Self = Self(0i32);
102 pub const CertificateCommonNameIsIncorrect
: Self = Self(1i32);
103 pub const CertificateExpired
: Self = Self(2i32);
104 pub const CertificateContainsErrors
: Self = Self(3i32);
105 pub const CertificateRevoked
: Self = Self(4i32);
106 pub const CertificateIsInvalid
: Self = Self(5i32);
107 pub const ServerUnreachable
: Self = Self(6i32);
108 pub const Timeout
: Self = Self(7i32);
109 pub const ErrorHttpInvalidServerResponse
: Self = Self(8i32);
110 pub const ConnectionAborted
: Self = Self(9i32);
111 pub const ConnectionReset
: Self = Self(10i32);
112 pub const Disconnected
: Self = Self(11i32);
113 pub const HttpToHttpsOnRedirection
: Self = Self(12i32);
114 pub const HttpsToHttpOnRedirection
: Self = Self(13i32);
115 pub const CannotConnect
: Self = Self(14i32);
116 pub const HostNameNotResolved
: Self = Self(15i32);
117 pub const OperationCanceled
: Self = Self(16i32);
118 pub const RedirectFailed
: Self = Self(17i32);
119 pub const UnexpectedStatusCode
: Self = Self(18i32);
120 pub const UnexpectedRedirection
: Self = Self(19i32);
121 pub const UnexpectedClientError
: Self = Self(20i32);
122 pub const UnexpectedServerError
: Self = Self(21i32);
123 pub const InsufficientRangeSupport
: Self = Self(22i32);
124 pub const MissingContentLengthSupport
: Self = Self(23i32);
125 pub const MultipleChoices
: Self = Self(300i32);
126 pub const MovedPermanently
: Self = Self(301i32);
127 pub const Found
: Self = Self(302i32);
128 pub const SeeOther
: Self = Self(303i32);
129 pub const NotModified
: Self = Self(304i32);
130 pub const UseProxy
: Self = Self(305i32);
131 pub const TemporaryRedirect
: Self = Self(307i32);
132 pub const BadRequest
: Self = Self(400i32);
133 pub const Unauthorized
: Self = Self(401i32);
134 pub const PaymentRequired
: Self = Self(402i32);
135 pub const Forbidden
: Self = Self(403i32);
136 pub const NotFound
: Self = Self(404i32);
137 pub const MethodNotAllowed
: Self = Self(405i32);
138 pub const NotAcceptable
: Self = Self(406i32);
139 pub const ProxyAuthenticationRequired
: Self = Self(407i32);
140 pub const RequestTimeout
: Self = Self(408i32);
141 pub const Conflict
: Self = Self(409i32);
142 pub const Gone
: Self = Self(410i32);
143 pub const LengthRequired
: Self = Self(411i32);
144 pub const PreconditionFailed
: Self = Self(412i32);
145 pub const RequestEntityTooLarge
: Self = Self(413i32);
146 pub const RequestUriTooLong
: Self = Self(414i32);
147 pub const UnsupportedMediaType
: Self = Self(415i32);
148 pub const RequestedRangeNotSatisfiable
: Self = Self(416i32);
149 pub const ExpectationFailed
: Self = Self(417i32);
150 pub const InternalServerError
: Self = Self(500i32);
151 pub const NotImplemented
: Self = Self(501i32);
152 pub const BadGateway
: Self = Self(502i32);
153 pub const ServiceUnavailable
: Self = Self(503i32);
154 pub const GatewayTimeout
: Self = Self(504i32);
155 pub const HttpVersionNotSupported
: Self = Self(505i32);
157 impl ::core
::marker
::Copy
for WebErrorStatus {}
158 impl ::core
::clone
::Clone
for WebErrorStatus
{
159 fn clone(&self) -> Self {
163 impl ::core
::default::Default
for WebErrorStatus
{
164 fn default() -> Self {
168 impl ::windows
::core
::TypeKind
for WebErrorStatus
{
169 type TypeKind
= ::windows
::core
::CopyType
;
171 impl ::core
::fmt
::Debug
for WebErrorStatus
{
172 fn fmt(&self, f
: &mut ::core
::fmt
::Formatter
<'_
>) -> ::core
::fmt
::Result
{
173 f
.debug_tuple("WebErrorStatus").field(&self.0).finish()
176 impl ::windows
::core
::RuntimeType
for WebErrorStatus
{
177 const SIGNATURE
: ::windows
::imp
::ConstBuffer
= ::windows
::imp
::ConstBuffer
::from_slice(b
"enum(Windows.Web.WebErrorStatus;i4)");
179 #[cfg(feature = "implement")]
180 ::core
::include
!("impl.rs");