#[repr(transparent)]
pub struct PxFoundation<Allocator: AllocatorCallback> { /* private fields */ }
Expand description

A new type wrapper for PxFoundation.

Parametrized by its Allocator type.

Trait Implementations§

source§

impl<P, Allocator: AllocatorCallback> Class<P> for PxFoundation<Allocator>where PxFoundation: Class<P>,

source§

fn as_ptr(&self) -> *const P

Returns a raw const pointer to the wrapped type. Retrieving a raw pointer is safe. However, pretty much any use of a raw pointer is unsafe. In particular: this pointer should not be used to construct a second owning wrapper around the pointer.
source§

fn as_mut_ptr(&mut self) -> *mut P

Returns a raw mut pointer to the wrapped type. Retrieving a raw pointer is safe. However, pretty much any use of a raw pointer is unsafe. In particular: this pointer should not be used to construct a second owning wrapper around the pointer.
source§

impl<Allocator: AllocatorCallback> Drop for PxFoundation<Allocator>

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl<Allocator: AllocatorCallback> Foundation for PxFoundation<Allocator>

§

type Allocator = Allocator

source§

fn new(allocator: Self::Allocator) -> Option<Owner<Self>>

Tries to create a PxFoundation of the given version with the default allocator and error callbacks. Returns None if phys_PxCreateFoundation returns a null pointer.
source§

unsafe fn with_allocator_error_callback( allocator: Self::Allocator, error_callback: *mut PxErrorCallback ) -> Option<Owner<Self>>

Tries to create a PxFoundation with the provided allocator and error callbacks. Returns None if phys_PxCreateFoundation returns a null pointer. Read more
source§

fn get_error_callback(&mut self) -> Option<&mut PxErrorCallback>

Get the error callback.
source§

fn set_error_level(&mut self, mask: ErrorCodes)

Set the error level.
source§

fn get_error_level(&self) -> ErrorCodes

Get the error level.
source§

fn get_allocator_callback(&mut self) -> Option<&mut Self::Allocator>

Get the allocator callback.
source§

fn get_report_allocation_names(&self) -> bool

Get whether allocation names are reported.
source§

fn set_report_allocation_names(&mut self, value: bool)

Set whether allocation names are reported.
source§

impl<Allocator: AllocatorCallback + Send> Send for PxFoundation<Allocator>

source§

impl<Allocator: AllocatorCallback + Sync> Sync for PxFoundation<Allocator>

Auto Trait Implementations§

§

impl<Allocator> RefUnwindSafe for PxFoundation<Allocator>where Allocator: RefUnwindSafe,

§

impl<Allocator> Unpin for PxFoundation<Allocator>where Allocator: Unpin,

§

impl<Allocator> UnwindSafe for PxFoundation<Allocator>where Allocator: UnwindSafe,

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

const: unstable · 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 Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
source§

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

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.