Skip to main content

ctry_t

Struct ctry_t 

pub struct ctry_t { /* private fields */ }
Expand description

C++ Try statement. This structure is also used to represent wind statements.

Implementations§

§

impl ctry_t

pub unsafe fn is_wind(&self) -> bool

Is C++ wind statement? (not part of the C++ language) MSVC generates code like the following to keep track of constructed objects and destroy them upon an exception. Example:

// an object is constructed at this point __wind { // some other code that may throw an exception } __unwind { // this code is executed only if there was an exception // in the __wind block. normally here we destroy the object // after that the exception is passed to the // exception handler, regular control flow is interrupted here. } // regular logic continues here, if there were no exceptions // also the object’s destructor is called

pub unsafe fn is_synchronized_block(&self) -> bool

Is a synchronized block? Such a block matches this pattern: monitor_enter(obj); try { … } finally { monitor_exit(obj); }

§

impl ctry_t

pub unsafe fn compare(self: &ctry_t, r: &ctry_t) -> c_int

pub unsafe fn print( self: &ctry_t, parent: *const citem_t, indent: c_int, vp: Pin<&mut vc_printer_t>, )

Trait Implementations§

§

impl AsRef<cblock_t> for ctry_t

§

fn as_ref(self: &ctry_t) -> &cblock_t

Converts this type into a shared reference of the (usually inferred) input type.
§

impl Drop for ctry_t

§

fn drop(self: &mut ctry_t)

Synthesized destructor.

Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more
§

impl ExternType for ctry_t

§

type Id = (c, t, r, y, __, t)

A type-level representation of the type’s C++ namespace and type name. Read more
§

type Kind = Opaque

§

impl MakeCppStorage for ctry_t

§

unsafe fn allocate_uninitialized_cpp_storage() -> *mut ctry_t

Allocates heap space for this type in C++ and return a pointer to that space, but do not initialize that space (i.e. do not yet call a constructor). Read more
§

unsafe fn free_uninitialized_cpp_storage(arg0: *mut ctry_t)

Frees a C++ allocation which has not yet had a constructor called. Read more
§

impl SharedPtrTarget for ctry_t

§

impl UniquePtrTarget for ctry_t

§

impl WeakPtrTarget for ctry_t

Auto Trait Implementations§

§

impl !Freeze for ctry_t

§

impl !RefUnwindSafe for ctry_t

§

impl !Send for ctry_t

§

impl !Sync for ctry_t

§

impl Unpin for ctry_t

§

impl UnsafeUnpin for ctry_t

§

impl !UnwindSafe for ctry_t

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.