#[repr(transparent)]pub struct HRESULT(pub i32);
Tuple Fields§
§0: i32
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 for HRESULT
impl PartialEq for HRESULT
source§impl PartialOrd for HRESULT
impl PartialOrd 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 moreimpl Copy for HRESULT
impl Eq for HRESULT
impl StructuralEq for HRESULT
impl StructuralPartialEq for HRESULT
Auto Trait Implementations§
impl RefUnwindSafe for HRESULT
impl Send for HRESULT
impl Sync for HRESULT
impl Unpin for HRESULT
impl UnwindSafe for HRESULT
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more