[−][src]Struct abi_stable::VirtualWrapper
VirtualWrapper implements ffi-safe trait objects,for a selection of traits.
Passing opaque values around with VirtualWrapper<_>
One can pass non-StableAbi types around by using type erasure,using this type.
It generally looks like VirtualWrapper<Pointer<OpaqueType<Interface>>>
,where:
-
Pointer is some
pointer_trait::StableDeref
pointer type. -
OpaqueType is a zero-sized marker type.
-
Interface is an
InterfaceType
,which describes what traits are required when constructing theVirtualWrapper<_>
and which ones it implements.
trait InterfaceType
allows describing which traits are required
when constructing a VirtualWrapper<_>
,and which ones it implements.
Construction
To construct a VirtualWrapper<_>
one can use these associated functions:
-
from_value: Can be constructed from the value directly. Requires a value that implements ImplType.
-
from_ptr: Can be constructed from a pointer of a value. Requires a value that implements ImplType.
-
from_any_value: Can be constructed from the value directly.Requires a
'static
value. -
from_any_ptr Can be constructed from a pointer of a value.Requires a
'static
value.
Trait object
VirtualWrapper<Pointer<OpaqueType< Interface >>>
can be used as a trait object for any combination of
the traits listed bellow.
These are the traits:
-
Clone
-
Display
-
Debug
-
Default: Can be called as an inherent method.
-
Eq
-
PartialEq
-
Ord
-
PartialOrd
-
Hash
-
serde::Deserialize: first deserializes from a string,and then calls the objects' Deserialize impl.
-
serde::Serialize: first calls the objects' Deserialize impl,then serializes that as a string.
Deconstruction
VirtualWrapper<_>
can then be unwrapped into a concrete type,
within the same dynamic library/executable that constructed it,
using these (fallible) conversion methods:
-
into_unerased: Unwraps into a pointer to
T
. WhereVirtualWrapper<P<OpaqueType< Interface >>>
's Interface must equal<T as ImplType>::Interface
-
as_unerased: Unwraps into a
&T
. WhereVirtualWrapper<P<OpaqueType< Interface >>>
's Interface must equal<T as ImplType>::Interface
-
as_unerased_mut: Unwraps into a
&mut T
. WhereVirtualWrapper<P<OpaqueType< Interface >>>
's Interface must equal<T as ImplType>::Interface
-
into_mut_unerased:Unwraps into a pointer to
T
.RequiresT:'static
. -
as_mut_unerased:Unwraps into a
&T
.RequiresT:'static
. -
as_mut_unerased_mut:Unwraps into a
&mut T
.RequiresT:'static
.
Methods
impl VirtualWrapper<()>
[src]
pub fn from_value<T>(
object: T
) -> VirtualWrapper<RBox<OpaqueType<T::Interface>>> where
T: GetVtable<T, RBox<T>> + ImplType,
[src]
object: T
) -> VirtualWrapper<RBox<OpaqueType<T::Interface>>> where
T: GetVtable<T, RBox<T>> + ImplType,
Constructors the VirtualWrapper<_>
from an ImplType implementor.
Use this whenever possible instead of from_any_value
,
because it produces better error messages when unerasing the VirtualWrapper<_>
pub fn from_ptr<P, T>(object: P) -> VirtualWrapper<P::TransmutedPtr> where
P: StableDeref<Target = T>,
T: GetVtable<T, P> + ImplType,
P: ErasedStableDeref<T::Interface>,
[src]
P: StableDeref<Target = T>,
T: GetVtable<T, P> + ImplType,
P: ErasedStableDeref<T::Interface>,
Constructors the VirtualWrapper<_>
from a pointer to an ImplType implementor.
Use this whenever possible instead of from_any_ptr
,
because it produces better error messages when unerasing the VirtualWrapper<_>
pub fn from_any_value<T, I>(
object: T,
interface: I
) -> VirtualWrapper<RBox<OpaqueType<I>>> where
T: 'static,
I: InterfaceType,
InterfaceFor<T, I>: GetVtable<T, RBox<T>>,
[src]
object: T,
interface: I
) -> VirtualWrapper<RBox<OpaqueType<I>>> where
T: 'static,
I: InterfaceType,
InterfaceFor<T, I>: GetVtable<T, RBox<T>>,
Constructors the VirtualWrapper<_>
from a type which doesn't borrow anything.
pub fn from_any_ptr<P, T, I>(
object: P,
_interface: I
) -> VirtualWrapper<P::TransmutedPtr> where
I: InterfaceType,
P: StableDeref<Target = T>,
T: 'static,
InterfaceFor<T, I>: GetVtable<T, P>,
P: ErasedStableDeref<I>,
[src]
object: P,
_interface: I
) -> VirtualWrapper<P::TransmutedPtr> where
I: InterfaceType,
P: StableDeref<Target = T>,
T: 'static,
InterfaceFor<T, I>: GetVtable<T, P>,
P: ErasedStableDeref<I>,
Constructors the VirtualWrapper<_>
from a pointer to a
type which doesn't borrow anything.
impl<P> VirtualWrapper<P>
[src]
pub fn is_same_type<Other>(&self, other: &VirtualWrapper<Other>) -> bool
[src]
Allows checking whether 2 VirtualWrapper<_>
s have a value of the same type.
Note that types from different dynamic libraries/executables are never considered equal.
pub fn object_address(&self) -> usize where
P: Deref,
[src]
P: Deref,
Returns the address of the wrapped object.
This will not change between calls for the same VirtualWrapper<_>
.
impl<P> VirtualWrapper<P>
[src]
pub fn into_unerased<T>(self) -> Result<P::TransmutedPtr, UneraseError> where
P: TransmuteElement<T>,
P::Target: Sized,
T: ImplType + GetVtable<T, P::TransmutedPtr>,
[src]
P: TransmuteElement<T>,
P::Target: Sized,
T: ImplType + GetVtable<T, P::TransmutedPtr>,
Unwraps the VirtualWrapper<_>
into a pointer of
the concrete type that it was constructed with.
T is required to implement ImplType.
Errors
This will return an error in any of these conditions:
-
It is called in a dynamic library/binary outside the one from which this
VirtualWrapper<_>
was constructed. -
T
is not the concrete type thisVirtualWrapper<_>
was constructed with.
pub fn as_unerased<T>(&self) -> Result<&T, UneraseError> where
P: Deref + TransmuteElement<T>,
T: ImplType + GetVtable<T, P::TransmutedPtr>,
[src]
P: Deref + TransmuteElement<T>,
T: ImplType + GetVtable<T, P::TransmutedPtr>,
Unwraps the VirtualWrapper<_>
into a reference of
the concrete type that it was constructed with.
T is required to implement ImplType.
Errors
This will return an error in any of these conditions:
-
It is called in a dynamic library/binary outside the one from which this
VirtualWrapper<_>
was constructed. -
T
is not the concrete type thisVirtualWrapper<_>
was constructed with.
pub fn as_unerased_mut<T>(&mut self) -> Result<&mut T, UneraseError> where
P: DerefMut + TransmuteElement<T>,
T: ImplType + GetVtable<T, P::TransmutedPtr>,
[src]
P: DerefMut + TransmuteElement<T>,
T: ImplType + GetVtable<T, P::TransmutedPtr>,
Unwraps the VirtualWrapper<_>
into a mutable reference of
the concrete type that it was constructed with.
T is required to implement ImplType.
Errors
This will return an error in any of these conditions:
-
It is called in a dynamic library/binary outside the one from which this
VirtualWrapper<_>
was constructed. -
T
is not the concrete type thisVirtualWrapper<_>
was constructed with.
pub fn into_any_unerased<T>(self) -> Result<P::TransmutedPtr, UneraseError> where
P: TransmuteElement<T>,
P::Target: Sized,
Self: VirtualWrapperTrait,
InterfaceFor<T, GetVWInterface<Self>>: GetVtable<T, P::TransmutedPtr>,
[src]
P: TransmuteElement<T>,
P::Target: Sized,
Self: VirtualWrapperTrait,
InterfaceFor<T, GetVWInterface<Self>>: GetVtable<T, P::TransmutedPtr>,
Unwraps the VirtualWrapper<_>
into a pointer of
the concrete type that it was constructed with.
T is required to not borrows anything.
Errors
This will return an error in any of these conditions:
-
It is called in a dynamic library/binary outside the one from which this
VirtualWrapper<_>
was constructed. -
T
is not the concrete type thisVirtualWrapper<_>
was constructed with.
pub fn as_any_unerased<T>(&self) -> Result<&T, UneraseError> where
P: Deref + TransmuteElement<T>,
Self: VirtualWrapperTrait,
InterfaceFor<T, GetVWInterface<Self>>: GetVtable<T, P::TransmutedPtr>,
[src]
P: Deref + TransmuteElement<T>,
Self: VirtualWrapperTrait,
InterfaceFor<T, GetVWInterface<Self>>: GetVtable<T, P::TransmutedPtr>,
Unwraps the VirtualWrapper<_>
into a reference of
the concrete type that it was constructed with.
T is required to not borrows anything.
Errors
This will return an error in any of these conditions:
-
It is called in a dynamic library/binary outside the one from which this
VirtualWrapper<_>
was constructed. -
T
is not the concrete type thisVirtualWrapper<_>
was constructed with.
pub fn as_any_unerased_mut<T>(&mut self) -> Result<&mut T, UneraseError> where
P: DerefMut + TransmuteElement<T>,
Self: VirtualWrapperTrait,
InterfaceFor<T, GetVWInterface<Self>>: GetVtable<T, P::TransmutedPtr>,
[src]
P: DerefMut + TransmuteElement<T>,
Self: VirtualWrapperTrait,
InterfaceFor<T, GetVWInterface<Self>>: GetVtable<T, P::TransmutedPtr>,
Unwraps the VirtualWrapper<_>
into a mutable reference of
the concrete type that it was constructed with.
T is required to not borrows anything.
Errors
This will return an error in any of these conditions:
-
It is called in a dynamic library/binary outside the one from which this
VirtualWrapper<_>
was constructed. -
T
is not the concrete type thisVirtualWrapper<_>
was constructed with.
impl<P> VirtualWrapper<P>
[src]
pub fn default<I>(&self) -> Self where
P: Deref<Target = OpaqueType<I>>,
I: InterfaceType<Default = True>,
[src]
P: Deref<Target = OpaqueType<I>>,
I: InterfaceType<Default = True>,
Constructs a VirtualWrapper<P>
with the default value for P
.
pub fn serialized<'a, I>(&'a self) -> Result<RCow<'a, str>, RBoxError> where
P: Deref<Target = OpaqueType<I>>,
I: InterfaceType<Serialize = True>,
[src]
P: Deref<Target = OpaqueType<I>>,
I: InterfaceType<Serialize = True>,
It serializes a VirtualWrapper<_>
into a string by using
<ConcreteType as SerializeImplType>::serialize_impl
.
pub fn deserialize_from_str<'a, I>(s: &'a str) -> Result<Self, RBoxError> where
P: Deref<Target = OpaqueType<I>>,
I: DeserializeInterfaceType<Deserialize = True, Deserialized = Self>,
[src]
P: Deref<Target = OpaqueType<I>>,
I: DeserializeInterfaceType<Deserialize = True, Deserialized = Self>,
Deserializes a string into a VirtualWrapper<_>
,by using
<I as DeserializeInterfaceType>::deserialize_impl
.
Trait Implementations
impl<P> StableAbi for VirtualWrapper<P> where
P: __StableAbi,
[src]
P: __StableAbi,
type IsNonZeroType = False
Whether this type has a single invalid bit-pattern. Read more
const LAYOUT: &'static TypeLayout
[src]
const ABI_INFO: &'static AbiInfoWrapper
[src]
The layout of the type,derived from Self::LAYOUT and associated types.
impl<P, I> VirtualWrapperTrait for VirtualWrapper<P> where
P: Deref<Target = OpaqueType<I>>,
I: InterfaceType,
[src]
P: Deref<Target = OpaqueType<I>>,
I: InterfaceType,
type Interface = I
impl<P, I> PartialOrd<VirtualWrapper<P>> for VirtualWrapper<P> where
P: Deref<Target = OpaqueType<I>>,
I: InterfaceType<PartialOrd = True>,
Self: PartialEq,
[src]
P: Deref<Target = OpaqueType<I>>,
I: InterfaceType<PartialOrd = True>,
Self: PartialEq,
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
[src]
#[must_use]
default fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]
default fn le(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
#[must_use]
default fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
#[must_use]
default fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl<P, I> PartialEq<VirtualWrapper<P>> for VirtualWrapper<P> where
P: Deref<Target = OpaqueType<I>>,
I: InterfaceType<PartialEq = True>,
[src]
P: Deref<Target = OpaqueType<I>>,
I: InterfaceType<PartialEq = True>,
fn eq(&self, other: &Self) -> bool
[src]
#[must_use]
default fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl<P, I> Eq for VirtualWrapper<P> where
Self: PartialEq,
P: Deref<Target = OpaqueType<I>>,
I: InterfaceType<Eq = True>,
[src]
Self: PartialEq,
P: Deref<Target = OpaqueType<I>>,
I: InterfaceType<Eq = True>,
impl<P, I> Ord for VirtualWrapper<P> where
P: Deref<Target = OpaqueType<I>>,
I: InterfaceType<Ord = True>,
Self: PartialOrd + Eq,
[src]
P: Deref<Target = OpaqueType<I>>,
I: InterfaceType<Ord = True>,
Self: PartialOrd + Eq,
fn cmp(&self, other: &Self) -> Ordering
[src]
default fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
default fn min(self, other: Self) -> Self
1.21.0[src]
Compares and returns the minimum of two values. Read more
default fn clamp(self, min: Self, max: Self) -> Self
[src]
clamp
)Restrict a value to a certain interval. Read more
impl<P, I> Clone for VirtualWrapper<P> where
P: Deref<Target = OpaqueType<I>>,
I: InterfaceType<Clone = True>,
[src]
P: Deref<Target = OpaqueType<I>>,
I: InterfaceType<Clone = True>,
fn clone(&self) -> Self
[src]
default fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<P, I> Hash for VirtualWrapper<P> where
P: Deref<Target = OpaqueType<I>>,
I: InterfaceType<Hash = True>,
[src]
P: Deref<Target = OpaqueType<I>>,
I: InterfaceType<Hash = True>,
fn hash<H>(&self, state: &mut H) where
H: Hasher,
[src]
H: Hasher,
default fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl<P, I> Display for VirtualWrapper<P> where
P: Deref<Target = OpaqueType<I>>,
I: InterfaceType<Display = True>,
[src]
P: Deref<Target = OpaqueType<I>>,
I: InterfaceType<Display = True>,
impl<P, I> Debug for VirtualWrapper<P> where
P: Deref<Target = OpaqueType<I>>,
I: InterfaceType<Debug = True>,
[src]
P: Deref<Target = OpaqueType<I>>,
I: InterfaceType<Debug = True>,
impl<P, I> Serialize for VirtualWrapper<P> where
P: Deref<Target = OpaqueType<I>>,
I: InterfaceType<Serialize = True>,
[src]
P: Deref<Target = OpaqueType<I>>,
I: InterfaceType<Serialize = True>,
First it serializes a VirtualWrapper<_>
into a string by using
impl<'a, P, I> Deserialize<'a> for VirtualWrapper<P> where
P: Deref<Target = OpaqueType<I>>,
I: DeserializeInterfaceType<Deserialize = True, Deserialized = Self>,
[src]
P: Deref<Target = OpaqueType<I>>,
I: DeserializeInterfaceType<Deserialize = True, Deserialized = Self>,
First it Deserializes a string,then it deserializes into a
VirtualWrapper<_>
,by using <I as DeserializeInterfaceType>::deserialize_impl
.
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'a>,
[src]
D: Deserializer<'a>,
Auto Trait Implementations
impl<P> Send for VirtualWrapper<P> where
P: Send,
P: Send,
impl<P> Sync for VirtualWrapper<P> where
P: Sync,
P: Sync,
Blanket Implementations
impl<T> MakeGetAbiInfo for T where
T: StableAbi,
[src]
T: StableAbi,
const CONST: GetAbiInfo
[src]
impl<T> MakeGetAbiInfo for T
[src]
const CONST: GetAbiInfo
[src]
impl<'a, T> BorrowOwned for T where
T: 'a + Clone + StableAbi,
[src]
T: 'a + Clone + StableAbi,
type ROwned = T
type RBorrowed = &'a T
fn r_borrow(
&'a <T as BorrowOwned<'a>>::ROwned
) -> <T as BorrowOwned<'a>>::RBorrowed
[src]
&'a <T as BorrowOwned<'a>>::ROwned
) -> <T as BorrowOwned<'a>>::RBorrowed
fn r_to_owned(
<T as BorrowOwned<'a>>::RBorrowed
) -> <T as BorrowOwned<'a>>::ROwned
[src]
<T as BorrowOwned<'a>>::RBorrowed
) -> <T as BorrowOwned<'a>>::ROwned
fn deref_borrowed(&<T as BorrowOwned<'a>>::RBorrowed) -> &T
[src]
fn deref_owned(&<T as BorrowOwned<'a>>::ROwned) -> &T
[src]
fn from_cow_borrow(&'a T) -> <T as BorrowOwned<'a>>::RBorrowed
[src]
fn from_cow_owned(<T as ToOwned>::Owned) -> <T as BorrowOwned<'a>>::ROwned
[src]
fn into_cow_borrow(<T as BorrowOwned<'a>>::RBorrowed) -> &'a T
[src]
fn into_cow_owned(<T as BorrowOwned<'a>>::ROwned) -> <T as ToOwned>::Owned
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> TypeIdentity for T where
T: ?Sized,
[src]
T: ?Sized,
type Type = T
The same type as Self. Read more
default fn into_type_val(self) -> Self::Type where
Self::Type: Sized,
[src]
Self::Type: Sized,
Converts a value back to the original type.
default fn into_type_ref(&self) -> &Self::Type
[src]
Converts a reference back to the original type.
default fn into_type_mut(&mut self) -> &mut Self::Type
[src]
Converts a mutable reference back to the original type.
default fn into_type_box(self: Box<Self>) -> Box<Self::Type>
[src]
Converts a box back to the original type.
default fn into_type_arc(this: Arc<Self>) -> Arc<Self::Type>
[src]
Converts an Arc back to the original type.
default fn into_type_rc(this: Rc<Self>) -> Rc<Self::Type>
[src]
Converts an Rc back to the original type.
default fn from_type_val(this: Self::Type) -> Self where
Self::Type: Sized,
[src]
Self::Type: Sized,
Converts a value back to the original type.
default fn from_type_ref(this: &Self::Type) -> &Self
[src]
Converts a reference back to the original type.
default fn from_type_mut(this: &mut Self::Type) -> &mut Self
[src]
Converts a mutable reference back to the original type.
default fn from_type_box(this: Box<Self::Type>) -> Box<Self>
[src]
Converts a box back to the original type.
default fn from_type_arc(this: Arc<Self::Type>) -> Arc<Self>
[src]
Converts an Arc back to the original type.
default fn from_type_rc(this: Rc<Self::Type>) -> Rc<Self>
[src]
Converts an Rc back to the original type.
impl<T> SelfOps for T where
T: ?Sized,
[src]
T: ?Sized,
const T: PhantomData<fn() -> Self>
[src]
Represents Self by using a VariantPhantom, using the syntax Type::T
to pass it in methods with _:VariantPhantom<T>
parameters. Read more
const T_D: PhantomData<Self>
[src]
Represents Self by using a VariantDropPhantom,for specialized cases. Read more
default fn assert_ty(self, _other: PhantomData<fn() -> Self>) -> Self
[src]
Asserts that other
is the same type as self
.
default fn assert_ty_ref(&self, _other: PhantomData<fn() -> Self>) -> &Self
[src]
Asserts that other
is the same type as self
.
default fn assert_ty_mut(
&mut self,
_other: PhantomData<fn() -> Self>
) -> &mut Self
[src]
&mut self,
_other: PhantomData<fn() -> Self>
) -> &mut Self
Asserts that other
is the same type as self
.
default fn ty_(&self) -> PhantomData<fn() -> Self>
[src]
Equivalent to SelfOps::T,as a method. Read more
default fn ty_d(&self) -> PhantomData<Self>
[src]
Equivalent to [Self::ty_],for specialized cases. Read more
default fn ty_inv(&self) -> PhantomData<fn(Self) -> Self>
[src]
Equivalent to [Self::ty_] with an invariant type.
default fn ty_inv_ref(&self) -> PhantomData<Cell<&Self>>
[src]
Equivalent to [Self::ty_] with an invariant lifetime.
default fn eq_id(&self, other: &Self) -> bool
[src]
Identity comparison to another value of the same type. Read more
default fn piped<F, U>(self, f: F) -> U where
F: FnOnce(Self) -> U,
[src]
F: FnOnce(Self) -> U,
Emulates the pipeline operator,allowing method syntax in more places. Read more
default fn piped_ref<'a, F, U>(&'a self, f: F) -> U where
F: FnOnce(&'a Self) -> U,
[src]
F: FnOnce(&'a Self) -> U,
The same as piped
except that the function takes &Self
Useful for functions that take &Self
instead of Self
. Read more
default fn piped_mut<'a, F, U>(&'a mut self, f: F) -> U where
F: FnOnce(&'a mut Self) -> U,
[src]
F: FnOnce(&'a mut Self) -> U,
The same as piped
except that the function takes &mut Self
. Useful for functions that take &mut Self
instead of Self
. Read more
default fn mutated<F>(self, f: F) -> Self where
F: FnOnce(&mut Self),
[src]
F: FnOnce(&mut Self),
Mutates self using a closure taking self by mutable reference, passing it along the method chain. Read more
default fn observe<F>(self, f: F) -> Self where
F: FnOnce(&Self),
[src]
F: FnOnce(&Self),
Observes the value of self passing it along unmodified. Useful in a long method chain. Read more
default fn into_<T>(self, PhantomData<fn() -> T>) -> T where
Self: Into<T>,
[src]
Self: Into<T>,
Performs a conversion using Into. Read more
default fn as_ref_<T>(&self) -> &T where
Self: AsRef<T>,
T: ?Sized,
[src]
Self: AsRef<T>,
T: ?Sized,
Performs a reference to reference conversion using AsRef, using the turbofish .as_ref_::<_>()
syntax. Read more
default fn as_mut_<T>(&mut self) -> &mut T where
Self: AsMut<T>,
T: ?Sized,
[src]
Self: AsMut<T>,
T: ?Sized,
Performs a mutable reference to mutable reference conversion using AsMut, using the turbofish .as_mut_::<_>()
syntax. Read more
default fn drop_(self)
[src]
Drops self
using method notation. Alternative to std::mem::drop
. Read more
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The error type returned when the conversion fails.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,