#[repr(transparent)]pub struct HRESULT(pub i32);
Tuple Fields
0: i32
Implementations
sourceimpl 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
sourceimpl Ord for HRESULT
impl Ord for HRESULT
sourceimpl PartialOrd<HRESULT> for HRESULT
impl PartialOrd<HRESULT> for HRESULT
sourcefn partial_cmp(&self, other: &HRESULT) -> Option<Ordering>
fn partial_cmp(&self, other: &HRESULT) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn 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
impl 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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more