Struct oaidl::Ptr [−][src]
pub struct Ptr<T> { /* fields omitted */ }
Convenience type for holding value of *mut T
Mostly just a projection of NonNull<T>
functionality
Methods
impl<T> Ptr<T>
[src]
impl<T> Ptr<T>
pub fn new(p: NonNull<T>) -> Ptr<T>
[src]
pub fn new(p: NonNull<T>) -> Ptr<T>
Wraps a valid NonNull<T>
pub fn with_checked(p: *mut T) -> Option<Ptr<T>>
[src]
pub fn with_checked(p: *mut T) -> Option<Ptr<T>>
Checks a *mut T
for null and wraps it up for easier handling.
pub fn as_ptr(&self) -> *mut T
[src]
pub fn as_ptr(&self) -> *mut T
Get inner ptr
pub unsafe fn as_ref(&self) -> &T
[src]
pub unsafe fn as_ref(&self) -> &T
Get inner reference
pub fn cast<U>(self) -> Ptr<U>
[src]
pub fn cast<U>(self) -> Ptr<U>
Cast a Ptr<T>
to Ptr<U>
Trait Implementations
impl SafeArrayElement for Ptr<IDispatch>
[src]
impl SafeArrayElement for Ptr<IDispatch>
const SFTYPE: u32
SFTYPE: u32 = VT_DISPATCH
This is the VT value used to create the SAFEARRAY
fn from_safearray(
psa: *mut SAFEARRAY,
ix: i32
) -> Result<Self, FromSafeArrElemError>
[src]
fn from_safearray(
psa: *mut SAFEARRAY,
ix: i32
) -> Result<Self, FromSafeArrElemError>
gets a type from the safearray at the specified index (default impls use SafeArrayGetElement)
fn into_safearray(
&mut self,
psa: *mut SAFEARRAY,
ix: i32
) -> Result<(), IntoSafeArrElemError>
[src]
fn into_safearray(
&mut self,
psa: *mut SAFEARRAY,
ix: i32
) -> Result<(), IntoSafeArrElemError>
puts a type into the safearray at the specified index (default impls use SafeArrayPutElement)
impl SafeArrayElement for Ptr<IUnknown>
[src]
impl SafeArrayElement for Ptr<IUnknown>
const SFTYPE: u32
SFTYPE: u32 = VT_UNKNOWN
This is the VT value used to create the SAFEARRAY
fn from_safearray(
psa: *mut SAFEARRAY,
ix: i32
) -> Result<Self, FromSafeArrElemError>
[src]
fn from_safearray(
psa: *mut SAFEARRAY,
ix: i32
) -> Result<Self, FromSafeArrElemError>
gets a type from the safearray at the specified index (default impls use SafeArrayGetElement)
fn into_safearray(
&mut self,
psa: *mut SAFEARRAY,
ix: i32
) -> Result<(), IntoSafeArrElemError>
[src]
fn into_safearray(
&mut self,
psa: *mut SAFEARRAY,
ix: i32
) -> Result<(), IntoSafeArrElemError>
puts a type into the safearray at the specified index (default impls use SafeArrayPutElement)
impl<T: Debug> Debug for Ptr<T>
[src]
impl<T: Debug> Debug for Ptr<T>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<T: Eq> Eq for Ptr<T>
[src]
impl<T: Eq> Eq for Ptr<T>
impl<T: Hash> Hash for Ptr<T>
[src]
impl<T: Hash> Hash for Ptr<T>
fn hash<__HT: Hasher>(&self, state: &mut __HT)
[src]
fn hash<__HT: Hasher>(&self, state: &mut __HT)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl<T: PartialOrd> PartialOrd for Ptr<T>
[src]
impl<T: PartialOrd> PartialOrd for Ptr<T>
fn partial_cmp(&self, other: &Ptr<T>) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &Ptr<T>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Ptr<T>) -> bool
[src]
fn lt(&self, other: &Ptr<T>) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Ptr<T>) -> bool
[src]
fn le(&self, other: &Ptr<T>) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Ptr<T>) -> bool
[src]
fn gt(&self, other: &Ptr<T>) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Ptr<T>) -> bool
[src]
fn ge(&self, other: &Ptr<T>) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl<T: PartialEq> PartialEq for Ptr<T>
[src]
impl<T: PartialEq> PartialEq for Ptr<T>
fn eq(&self, other: &Ptr<T>) -> bool
[src]
fn eq(&self, other: &Ptr<T>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Ptr<T>) -> bool
[src]
fn ne(&self, other: &Ptr<T>) -> bool
This method tests for !=
.
impl<T: Copy> Copy for Ptr<T>
[src]
impl<T: Copy> Copy for Ptr<T>
impl<T: Clone> Clone for Ptr<T>
[src]
impl<T: Clone> Clone for Ptr<T>
fn clone(&self) -> Self
[src]
fn clone(&self) -> Self
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl<T> Pointer for Ptr<T>
[src]
impl<T> Pointer for Ptr<T>
impl<T> From<NonNull<T>> for Ptr<T>
[src]
impl<T> From<NonNull<T>> for Ptr<T>
impl<T> Into<NonNull<T>> for Ptr<T>
[src]
impl<T> Into<NonNull<T>> for Ptr<T>
impl<T> AsRef<T> for Ptr<T>
[src]
impl<T> AsRef<T> for Ptr<T>
impl VariantExt for Ptr<IUnknown>
[src]
impl VariantExt for Ptr<IUnknown>
const VARTYPE: u32
VARTYPE: u32 = VT_UNKNOWN
VARTYPE constant value for the type
fn from_variant(var: Ptr<VARIANT>) -> Result<Self, FromVariantError>
[src]
fn from_variant(var: Ptr<VARIANT>) -> Result<Self, FromVariantError>
Call this associated function on a Ptr to obtain a value T
fn into_variant(&mut self) -> Result<Ptr<VARIANT>, IntoVariantError>
[src]
fn into_variant(&mut self) -> Result<Ptr<VARIANT>, IntoVariantError>
Convert a value of type T into a Ptr
impl VariantExt for Ptr<IDispatch>
[src]
impl VariantExt for Ptr<IDispatch>
const VARTYPE: u32
VARTYPE: u32 = VT_DISPATCH
VARTYPE constant value for the type
fn from_variant(var: Ptr<VARIANT>) -> Result<Self, FromVariantError>
[src]
fn from_variant(var: Ptr<VARIANT>) -> Result<Self, FromVariantError>
Call this associated function on a Ptr to obtain a value T
fn into_variant(&mut self) -> Result<Ptr<VARIANT>, IntoVariantError>
[src]
fn into_variant(&mut self) -> Result<Ptr<VARIANT>, IntoVariantError>
Convert a value of type T into a Ptr
impl VariantExt for Ptr<c_void>
[src]
impl VariantExt for Ptr<c_void>
const VARTYPE: u32
VARTYPE: u32 = VT_BYREF
VARTYPE constant value for the type
fn from_variant(var: Ptr<VARIANT>) -> Result<Self, FromVariantError>
[src]
fn from_variant(var: Ptr<VARIANT>) -> Result<Self, FromVariantError>
Call this associated function on a Ptr to obtain a value T
fn into_variant(&mut self) -> Result<Ptr<VARIANT>, IntoVariantError>
[src]
fn into_variant(&mut self) -> Result<Ptr<VARIANT>, IntoVariantError>
Convert a value of type T into a Ptr