#[repr(transparent)]pub struct HRESULT(pub HRESULT);
Tuple Fields§
§0: HRESULT
Implementations§
source§impl HRESULT
impl HRESULT
sourcepub fn result(self) -> Result<()>
pub fn result(self) -> Result<()>
Turns an HRESULT
from the COM crate::ffi
API declaration
into a Result
containing HassleError
.
sourcepub fn result_with_success<T>(self, v: T) -> Result<T>
pub fn result_with_success<T>(self, v: T) -> Result<T>
Turns an HRESULT
from the COM crate::ffi
API declaration
into a Result
containing HassleError
, with the desired value.
Note that v
is passed by value and is not a closure that is executed
lazily. Use the short-circuiting ?
operator for such cases:
let mut blob: ComPtr<IDxcBlob> = ComPtr::new();
unsafe { self.inner.get_result(blob.as_mut_ptr()) }.result()?;
Ok(DxcBlob::new(blob))
Trait Implementations§
source§impl Ord for HRESULT
impl Ord for HRESULT
source§impl PartialEq<HRESULT> for HRESULT
impl PartialEq<HRESULT> for HRESULT
source§impl PartialOrd<HRESULT> for HRESULT
impl PartialOrd<HRESULT> for HRESULT
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more