[][src]Struct serde_traitobject::Box

pub struct Box<T: ?Sized>(_);

Convenience wrapper around std::boxed::Box that automatically uses serde_traitobject for (de)serialization.

Methods

impl<T> Box<T>[src]

pub fn new(t: T) -> Self[src]

Create a new Box wrapper

impl<T: ?Sized> Box<T>[src]

pub fn into_box(self) -> Box<T>[src]

Convert to a regular std::Boxed::Box<T>. Coherence rules prevent currently prevent impl Into<std::boxed::Box<T>> for Box<T>.

impl Box<dyn Any>[src]

pub fn into_any(self) -> Box<dyn Any>[src]

Convert into a std::boxed::Box<dyn std::any::Any>.

impl Box<dyn Any + Send>[src]

pub fn into_any_send(self) -> Box<dyn Any + Send>[src]

Convert into a std::boxed::Box<dyn std::any::Any + Send>.

impl Box<dyn Any + Sync>[src]

pub fn into_any_sync(self) -> Box<dyn Any + Sync>[src]

Convert into a std::boxed::Box<dyn std::any::Any + Sync>.

impl Box<dyn Any + Send + Sync>[src]

pub fn into_any_send_sync(self) -> Box<dyn Any + Send + Sync>[src]

Convert into a std::boxed::Box<dyn std::any::Any + Send + Sync>.

Methods from Deref<Target = Box<T>>

Trait Implementations

impl<A, F: ?Sized> Fn<A> for Box<F> where
    F: Fn<A>, 
[src]

impl<A, F: ?Sized> FnMut<A> for Box<F> where
    F: FnMut<A>, 
[src]

impl<A, F: ?Sized> FnOnce<A> for Box<F> where
    F: FnOnce<A>, 
[src]

type Output = F::Output

The returned type after the call operator is used.

impl<T: ?Sized> AsRef<Box<T>> for Box<T>[src]

impl<T: ?Sized> AsRef<T> for Box<T>[src]

impl<T: ?Sized> AsMut<Box<T>> for Box<T>[src]

impl<T: ?Sized> AsMut<T> for Box<T>[src]

impl<T: ?Sized> From<Box<T>> for Box<T>[src]

impl<T> From<T> for Box<T>[src]

impl<'a, E: Error + Serialize + Deserialize + 'a> From<E> for Box<dyn Error + 'a>[src]

impl<T: Clone + ?Sized> Clone for Box<T>[src]

impl<T: Default + ?Sized> Default for Box<T>[src]

impl<T: Eq + ?Sized> Eq for Box<T>[src]

impl<T: Ord + ?Sized> Ord for Box<T>[src]

impl<T: PartialEq + ?Sized> PartialEq<Box<T>> for Box<T>[src]

impl<T: PartialOrd + ?Sized> PartialOrd<Box<T>> for Box<T>[src]

impl<T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<Box<U>> for Box<T>[src]

impl<T: Display + ?Sized> Display for Box<T>[src]

impl<T: Debug + ?Sized> Debug for Box<T>[src]

impl<T: ?Sized> Deref for Box<T>[src]

type Target = Box<T>

The resulting type after dereferencing.

impl<T: ?Sized> DerefMut for Box<T>[src]

impl<T: Hash + ?Sized> Hash for Box<T>[src]

impl<T: ?Sized> Borrow<T> for Box<T>[src]

impl<T: ?Sized> BorrowMut<T> for Box<T>[src]

impl<T: Error> Error for Box<T>[src]

impl<T: Serialize + ?Sized + 'static> Serialize for Box<T>[src]

impl<'de, T: Deserialize + ?Sized + 'static> Deserialize<'de> for Box<T>[src]

Auto Trait Implementations

impl<T: ?Sized> Send for Box<T> where
    T: Send

impl<T: ?Sized> Sync for Box<T> where
    T: Sync

impl<T: ?Sized> Unpin for Box<T>

impl<T: ?Sized> UnwindSafe for Box<T> where
    T: UnwindSafe

impl<T: ?Sized> RefUnwindSafe for Box<T> where
    T: RefUnwindSafe

Blanket Implementations

impl<T> Serialize for T where
    T: Serialize + ?Sized
[src]

impl<T> Deserialize for T where
    T: DeserializeOwned
[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<!> for T[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<'a, F> Pattern<'a> for F where
    F: FnMut(char) -> bool
[src]

type Searcher = CharPredicateSearcher<'a, F>

🔬 This is a nightly-only experimental API. (pattern)

API not fully fleshed out and ready to be stabilized

Associated searcher for this pattern

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Serialize for T where
    T: Serialize + ?Sized
[src]