Struct serde_traitobject::Box
source · pub struct Box<T: ?Sized>(_);
Expand description
Convenience wrapper around std::boxed::Boxserde_traitobject
for (de)serialization.
Implementations§
source§impl Box<dyn Any + Send>
impl Box<dyn Any + Send>
sourcepub fn into_any_send(self) -> Box<dyn Any + Send>
pub fn into_any_send(self) -> Box<dyn Any + Send>
Convert into a std::boxed::Box<dyn std::any::Any + Send>
.
Trait Implementations§
source§impl<T: ?Sized> BorrowMut<T> for Box<T>
impl<T: ?Sized> BorrowMut<T> for Box<T>
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<'de, T: Deserialize + ?Sized + 'static> Deserialize<'de> for Box<T>
impl<'de, T: Deserialize + ?Sized + 'static> Deserialize<'de> for Box<T>
source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<T: Error> Error for Box<T>
impl<T: Error> Error for Box<T>
source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§fn cause(&self) -> Option<&dyn Error>
fn cause(&self) -> Option<&dyn Error>
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§impl<T: Ord + ?Sized> Ord for Box<T>
impl<T: Ord + ?Sized> Ord for Box<T>
source§impl<T: PartialEq + ?Sized> PartialEq<Box<T>> for Box<T>
impl<T: PartialEq + ?Sized> PartialEq<Box<T>> for Box<T>
source§impl<T: PartialOrd + ?Sized> PartialOrd<Box<T>> for Box<T>
impl<T: PartialOrd + ?Sized> PartialOrd<Box<T>> for Box<T>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl<T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<Box<U>> for Box<T>
impl<T: Eq + ?Sized> Eq for Box<T>
impl<T: ?Sized> StructuralEq for Box<T>
impl<T: ?Sized> StructuralPartialEq for Box<T>
Auto Trait Implementations§
impl<T: ?Sized> RefUnwindSafe for Box<T>where
T: RefUnwindSafe,
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,
Blanket Implementations§
source§impl<'a, F> Pattern<'a> for Fwhere
F: FnMut(char) -> bool,
impl<'a, F> Pattern<'a> for Fwhere
F: FnMut(char) -> bool,
§type Searcher = CharPredicateSearcher<'a, F>
type Searcher = CharPredicateSearcher<'a, F>
🔬This is a nightly-only experimental API. (
pattern
)Associated searcher for this pattern
source§fn into_searcher(self, haystack: &'a str) -> CharPredicateSearcher<'a, F>
fn into_searcher(self, haystack: &'a str) -> CharPredicateSearcher<'a, F>
🔬This is a nightly-only experimental API. (
pattern
)source§fn is_contained_in(self, haystack: &'a str) -> bool
fn is_contained_in(self, haystack: &'a str) -> bool
🔬This is a nightly-only experimental API. (
pattern
)Checks whether the pattern matches anywhere in the haystack
source§fn is_prefix_of(self, haystack: &'a str) -> bool
fn is_prefix_of(self, haystack: &'a str) -> bool
🔬This is a nightly-only experimental API. (
pattern
)Checks whether the pattern matches at the front of the haystack
source§fn strip_prefix_of(self, haystack: &'a str) -> Option<&'a str>
fn strip_prefix_of(self, haystack: &'a str) -> Option<&'a str>
🔬This is a nightly-only experimental API. (
pattern
)Removes the pattern from the front of haystack, if it matches.
source§fn is_suffix_of(self, haystack: &'a str) -> boolwhere
CharPredicateSearcher<'a, F>: ReverseSearcher<'a>,
fn is_suffix_of(self, haystack: &'a str) -> boolwhere
CharPredicateSearcher<'a, F>: ReverseSearcher<'a>,
🔬This is a nightly-only experimental API. (
pattern
)Checks whether the pattern matches at the back of the haystack
source§fn strip_suffix_of(self, haystack: &'a str) -> Option<&'a str>where
CharPredicateSearcher<'a, F>: ReverseSearcher<'a>,
fn strip_suffix_of(self, haystack: &'a str) -> Option<&'a str>where
CharPredicateSearcher<'a, F>: ReverseSearcher<'a>,
🔬This is a nightly-only experimental API. (
pattern
)Removes the pattern from the back of haystack, if it matches.
source§impl<T> Serialize for Twhere
T: Serialize + ?Sized,
impl<T> Serialize for Twhere
T: Serialize + ?Sized,
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<Ok, Error>
source§impl<T> Type for T
impl<T> Type for T
source§const METATYPE: MetaType = MetaType::Concrete
const METATYPE: MetaType = MetaType::Concrete
Enum describing whether a type is
TraitObject
, Slice
or Concrete
.source§fn dangling(_t: <T as Type>::Meta) -> NonNull<T>
fn dangling(_t: <T as Type>::Meta) -> NonNull<T>
Create a dangling non-null
*const Self
with the provided Self::Meta
.source§fn fatten(thin: *mut (), _t: <T as Type>::Meta) -> *mut T
fn fatten(thin: *mut (), _t: <T as Type>::Meta) -> *mut T
Create a
*mut Self
with the provided Self::Meta
.source§fn meta_type(self: *const Self) -> MetaType
fn meta_type(self: *const Self) -> MetaType
Helper method describing whether a type is
TraitObject
, Slice
or Concrete
.source§impl<T> Type for Twhere
T: ?Sized,
impl<T> Type for Twhere
T: ?Sized,
source§default fn dangling(t: <T as Type>::Meta) -> NonNull<T>
default fn dangling(t: <T as Type>::Meta) -> NonNull<T>
Create a dangling non-null
*const Self
with the provided Self::Meta
.source§default fn fatten(thin: *mut (), t: <T as Type>::Meta) -> *mut T
default fn fatten(thin: *mut (), t: <T as Type>::Meta) -> *mut T
Create a
*mut Self
with the provided Self::Meta
.source§fn meta_type(self: *const Self) -> MetaType
fn meta_type(self: *const Self) -> MetaType
Helper method describing whether a type is
TraitObject
, Slice
or Concrete
.