[−][src]Struct abi_stable::std_types::RBox
Ffi-safe equivalent of std::box::Box
.
Example
Declaring a recursive datatype.
use abi_stable::{ std_types::{RBox,RString}, StableAbi, }; #[repr(u8)] #[derive(StableAbi)] enum Command{ SendProduct{ id:u64, }, GoProtest{ cause:RString, place:RString, }, SendComplaint{ cause:RString, website:RString, }, WithMetadata{ command:RBox<Command>, metadata:RString, }, }
Implementations
impl<T> RBox<T>
[src]
pub fn new(value: T) -> Self
[src]
Constucts an RBox<T>
from a value.
Example
use abi_stable::std_types::RBox; let baux=RBox::new(100); assert_eq!(*baux,100);
pub fn pin(value: T) -> Pin<RBox<T>>
[src]
Constructs a Pin<RBox<T>>
.
pub fn from_box(p: Box<T>) -> RBox<T>ⓘ
[src]
Converts a Box<T>
to an RBox<T>
,reusing its heap allocation.
Example
use abi_stable::std_types::RBox; let baux=Box::new(200); let baux=RBox::from_box(baux); assert_eq!(*baux,200);
pub fn from_move_ptr(p: MovePtr<'_, T>) -> RBox<T>ⓘ
[src]
Constructs a Box<T>
from a MovePtr<'_,T>
.
Example
use std::mem::ManuallyDrop; use abi_stable::{ pointer_trait::OwnedPointer, sabi_types::RSmallBox, std_types::RBox, }; let b=RSmallBox::<_,[u8;1]>::new(77u8); let rbox:RBox<_>=b.in_move_ptr(|x| RBox::from_move_ptr(x) ); assert_eq!(*rbox,77);
impl<T> RBox<T>
[src]
pub fn into_box(this: Self) -> Box<T>
[src]
Converts this RBox<T>
into a Box<T>
Allocation
If this is invoked outside of the dynamic library/binary that created the RBox<T>
,
it will allocate a new Box<T>
and move the data into it.
Example
use abi_stable::std_types::RBox; let baux:RBox<u32>=RBox::new(200); let baux:Box<u32>=RBox::into_box(baux); assert_eq!(*baux,200);
pub fn into_inner(this: Self) -> T
[src]
Unwraps this Box<T>
into the value it owns on the heap.
Example
use abi_stable::std_types::RBox; let baux:RBox<u32>=RBox::new(200); let baux:u32=RBox::into_inner(baux); assert_eq!(baux,200);
pub fn into_pin(self) -> Pin<RBox<T>>
[src]
Wraps this RBox
in a Pin
Trait Implementations
impl<T> AsMut<T> for RBox<T>
[src]
impl<T> AsRef<T> for RBox<T>
[src]
impl<T> Borrow<T> for RBox<T>
[src]
impl<T> BorrowMut<T> for RBox<T>
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> BufRead for RBox<T> where
T: BufRead,
[src]
T: BufRead,
pub fn fill_buf(&mut self) -> Result<&[u8]>
[src]
pub fn consume(&mut self, amt: usize)
[src]
pub fn read_until(&mut self, byte: u8, buf: &mut Vec<u8>) -> Result<usize>
[src]
pub fn read_line(&mut self, buf: &mut String) -> Result<usize>
[src]
pub fn split(self, byte: u8) -> Split<Self>
1.0.0[src]
pub fn lines(self) -> Lines<Self>
1.0.0[src]
impl<T, O> CanTransmuteElement<O> for RBox<T>
[src]
type TransmutedPtr = RBox<O>
The type of the pointer after it's element type has been changed.
impl<T> Clone for RBox<T> where
T: Clone,
[src]
T: Clone,
pub fn clone(&self) -> Self
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<T> Debug for RBox<T> where
T: Debug,
[src]
T: Debug,
impl<T> Default for RBox<T> where
T: Default,
[src]
T: Default,
impl<T> Deref for RBox<T>
[src]
impl<T> DerefMut for RBox<T>
[src]
impl<'de, T> Deserialize<'de> for RBox<T> where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
pub fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
impl<T> Display for RBox<T> where
T: Display,
[src]
T: Display,
impl<I> DoubleEndedIterator for RBox<I> where
I: DoubleEndedIterator,
[src]
I: DoubleEndedIterator,
pub fn next_back(&mut self) -> Option<I::Item>
[src]
pub fn nth_back(&mut self, n: usize) -> Option<I::Item>
[src]
pub fn advance_back_by(&mut self, n: usize) -> Result<(), usize>
[src]
pub fn try_rfold<B, F, R>(&mut self, init: B, f: F) -> R where
F: FnMut(B, Self::Item) -> R,
R: Try<Ok = B>,
1.27.0[src]
F: FnMut(B, Self::Item) -> R,
R: Try<Ok = B>,
pub fn rfold<B, F>(self, init: B, f: F) -> B where
F: FnMut(B, Self::Item) -> B,
1.27.0[src]
F: FnMut(B, Self::Item) -> B,
pub fn rfind<P>(&mut self, predicate: P) -> Option<Self::Item> where
P: FnMut(&Self::Item) -> bool,
1.27.0[src]
P: FnMut(&Self::Item) -> bool,
impl<T> Drop for RBox<T>
[src]
impl<T> Eq for RBox<T> where
T: Eq,
[src]
T: Eq,
impl<T> Error for RBox<T> where
T: StdError,
[src]
T: StdError,
pub fn description(&self) -> &str
[src]
pub fn cause(&self) -> Option<&dyn StdError>
[src]
pub fn source(&self) -> Option<&(dyn StdError + 'static)>
[src]
pub fn backtrace(&self) -> Option<&Backtrace>
[src]
impl<I> ExactSizeIterator for RBox<I> where
I: ExactSizeIterator,
[src]
I: ExactSizeIterator,
impl<T> From<Box<T, Global>> for RBox<T>
[src]
impl<T> From<RBox<T>> for Pin<RBox<T>>
[src]
impl<T, Inline> From<RBox<T>> for RSmallBox<T, Inline> where
Inline: InlineStorage,
[src]
Inline: InlineStorage,
Converts an RBox into an RSmallBox,currently this allocates.
impl<I> FusedIterator for RBox<I> where
I: FusedIterator,
[src]
I: FusedIterator,
impl<F> Future for RBox<F> where
F: Future + Unpin,
[src]
F: Future + Unpin,
type Output = F::Output
The type of value produced on completion.
pub fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>
[src]
impl<T> GetPointerKind for RBox<T>
[src]
impl<T> GetStaticEquivalent_ for RBox<T> where
T: __StableAbi,
[src]
T: __StableAbi,
type StaticEquivalent = _static_RBox<__GetStaticEquivalent<T>>
impl<T> Hash for RBox<T> where
T: Hash,
[src]
T: Hash,
pub fn hash<H>(&self, state: &mut H) where
H: Hasher,
[src]
H: Hasher,
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<T> Hasher for RBox<T> where
T: Hasher,
[src]
T: Hasher,
pub fn finish(&self) -> u64
[src]
pub fn write(&mut self, bytes: &[u8])
[src]
pub fn write_u8(&mut self, i: u8)
[src]
pub fn write_u16(&mut self, i: u16)
[src]
pub fn write_u32(&mut self, i: u32)
[src]
pub fn write_u64(&mut self, i: u64)
[src]
pub fn write_u128(&mut self, i: u128)
[src]
pub fn write_usize(&mut self, i: usize)
[src]
pub fn write_i8(&mut self, i: i8)
[src]
pub fn write_i16(&mut self, i: i16)
[src]
pub fn write_i32(&mut self, i: i32)
[src]
pub fn write_i64(&mut self, i: i64)
[src]
pub fn write_i128(&mut self, i: i128)
[src]
pub fn write_isize(&mut self, i: isize)
[src]
impl<T, Inline> Into<RBox<T>> for RSmallBox<T, Inline> where
Inline: InlineStorage,
[src]
Inline: InlineStorage,
Converts a RSmallBox into an RBox,currently this allocates.
impl<T> IntoReprRust for RBox<T>
[src]
impl<I> Iterator for RBox<I> where
I: Iterator,
[src]
I: Iterator,
type Item = I::Item
The type of the elements being iterated over.
pub fn next(&mut self) -> Option<I::Item>
[src]
pub fn size_hint(&self) -> (usize, Option<usize>)
[src]
pub fn nth(&mut self, n: usize) -> Option<I::Item>
[src]
pub fn last(self) -> Option<I::Item>
[src]
pub fn count(self) -> usize
1.0.0[src]
pub fn advance_by(&mut self, n: usize) -> Result<(), usize>
[src]
pub fn step_by(self, step: usize) -> StepBy<Self>
1.28.0[src]
pub fn chain<U>(self, other: U) -> Chain<Self, <U as IntoIterator>::IntoIter> where
U: IntoIterator<Item = Self::Item>,
1.0.0[src]
U: IntoIterator<Item = Self::Item>,
pub fn zip<U>(self, other: U) -> Zip<Self, <U as IntoIterator>::IntoIter> where
U: IntoIterator,
1.0.0[src]
U: IntoIterator,
pub fn map<B, F>(self, f: F) -> Map<Self, F> where
F: FnMut(Self::Item) -> B,
1.0.0[src]
F: FnMut(Self::Item) -> B,
pub fn for_each<F>(self, f: F) where
F: FnMut(Self::Item),
1.21.0[src]
F: FnMut(Self::Item),
pub fn filter<P>(self, predicate: P) -> Filter<Self, P> where
P: FnMut(&Self::Item) -> bool,
1.0.0[src]
P: FnMut(&Self::Item) -> bool,
pub fn filter_map<B, F>(self, f: F) -> FilterMap<Self, F> where
F: FnMut(Self::Item) -> Option<B>,
1.0.0[src]
F: FnMut(Self::Item) -> Option<B>,
pub fn enumerate(self) -> Enumerate<Self>
1.0.0[src]
pub fn peekable(self) -> Peekable<Self>
1.0.0[src]
pub fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P> where
P: FnMut(&Self::Item) -> bool,
1.0.0[src]
P: FnMut(&Self::Item) -> bool,
pub fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P> where
P: FnMut(&Self::Item) -> bool,
1.0.0[src]
P: FnMut(&Self::Item) -> bool,
pub fn map_while<B, P>(self, predicate: P) -> MapWhile<Self, P> where
P: FnMut(Self::Item) -> Option<B>,
[src]
P: FnMut(Self::Item) -> Option<B>,
pub fn skip(self, n: usize) -> Skip<Self>
1.0.0[src]
pub fn take(self, n: usize) -> Take<Self>
1.0.0[src]
pub fn scan<St, B, F>(self, initial_state: St, f: F) -> Scan<Self, St, F> where
F: FnMut(&mut St, Self::Item) -> Option<B>,
1.0.0[src]
F: FnMut(&mut St, Self::Item) -> Option<B>,
pub fn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F> where
F: FnMut(Self::Item) -> U,
U: IntoIterator,
1.0.0[src]
F: FnMut(Self::Item) -> U,
U: IntoIterator,
pub fn flatten(self) -> Flatten<Self> where
Self::Item: IntoIterator,
1.29.0[src]
Self::Item: IntoIterator,
pub fn fuse(self) -> Fuse<Self>
1.0.0[src]
pub fn inspect<F>(self, f: F) -> Inspect<Self, F> where
F: FnMut(&Self::Item),
1.0.0[src]
F: FnMut(&Self::Item),
pub fn by_ref(&mut self) -> &mut Self
1.0.0[src]
#[must_use =
"if you really need to exhaust the iterator, consider `.for_each(drop)` instead"]pub fn collect<B>(self) -> B where
B: FromIterator<Self::Item>,
1.0.0[src]
B: FromIterator<Self::Item>,
pub fn partition<B, F>(self, f: F) -> (B, B) where
B: Default + Extend<Self::Item>,
F: FnMut(&Self::Item) -> bool,
1.0.0[src]
B: Default + Extend<Self::Item>,
F: FnMut(&Self::Item) -> bool,
pub fn partition_in_place<'a, T, P>(self, predicate: P) -> usize where
P: FnMut(&T) -> bool,
Self: DoubleEndedIterator<Item = &'a mut T>,
T: 'a,
[src]
P: FnMut(&T) -> bool,
Self: DoubleEndedIterator<Item = &'a mut T>,
T: 'a,
pub fn is_partitioned<P>(self, predicate: P) -> bool where
P: FnMut(Self::Item) -> bool,
[src]
P: FnMut(Self::Item) -> bool,
pub fn try_fold<B, F, R>(&mut self, init: B, f: F) -> R where
F: FnMut(B, Self::Item) -> R,
R: Try<Ok = B>,
1.27.0[src]
F: FnMut(B, Self::Item) -> R,
R: Try<Ok = B>,
pub fn try_for_each<F, R>(&mut self, f: F) -> R where
F: FnMut(Self::Item) -> R,
R: Try<Ok = ()>,
1.27.0[src]
F: FnMut(Self::Item) -> R,
R: Try<Ok = ()>,
pub fn fold<B, F>(self, init: B, f: F) -> B where
F: FnMut(B, Self::Item) -> B,
1.0.0[src]
F: FnMut(B, Self::Item) -> B,
pub fn fold_first<F>(self, f: F) -> Option<Self::Item> where
F: FnMut(Self::Item, Self::Item) -> Self::Item,
[src]
F: FnMut(Self::Item, Self::Item) -> Self::Item,
pub fn all<F>(&mut self, f: F) -> bool where
F: FnMut(Self::Item) -> bool,
1.0.0[src]
F: FnMut(Self::Item) -> bool,
pub fn any<F>(&mut self, f: F) -> bool where
F: FnMut(Self::Item) -> bool,
1.0.0[src]
F: FnMut(Self::Item) -> bool,
pub fn find<P>(&mut self, predicate: P) -> Option<Self::Item> where
P: FnMut(&Self::Item) -> bool,
1.0.0[src]
P: FnMut(&Self::Item) -> bool,
pub fn find_map<B, F>(&mut self, f: F) -> Option<B> where
F: FnMut(Self::Item) -> Option<B>,
1.30.0[src]
F: FnMut(Self::Item) -> Option<B>,
pub fn try_find<F, R>(
&mut self,
f: F
) -> Result<Option<Self::Item>, <R as Try>::Error> where
F: FnMut(&Self::Item) -> R,
R: Try<Ok = bool>,
[src]
&mut self,
f: F
) -> Result<Option<Self::Item>, <R as Try>::Error> where
F: FnMut(&Self::Item) -> R,
R: Try<Ok = bool>,
pub fn position<P>(&mut self, predicate: P) -> Option<usize> where
P: FnMut(Self::Item) -> bool,
1.0.0[src]
P: FnMut(Self::Item) -> bool,
pub fn rposition<P>(&mut self, predicate: P) -> Option<usize> where
P: FnMut(Self::Item) -> bool,
Self: ExactSizeIterator + DoubleEndedIterator,
1.0.0[src]
P: FnMut(Self::Item) -> bool,
Self: ExactSizeIterator + DoubleEndedIterator,
pub fn max(self) -> Option<Self::Item> where
Self::Item: Ord,
1.0.0[src]
Self::Item: Ord,
pub fn min(self) -> Option<Self::Item> where
Self::Item: Ord,
1.0.0[src]
Self::Item: Ord,
pub fn max_by_key<B, F>(self, f: F) -> Option<Self::Item> where
B: Ord,
F: FnMut(&Self::Item) -> B,
1.6.0[src]
B: Ord,
F: FnMut(&Self::Item) -> B,
pub fn max_by<F>(self, compare: F) -> Option<Self::Item> where
F: FnMut(&Self::Item, &Self::Item) -> Ordering,
1.15.0[src]
F: FnMut(&Self::Item, &Self::Item) -> Ordering,
pub fn min_by_key<B, F>(self, f: F) -> Option<Self::Item> where
B: Ord,
F: FnMut(&Self::Item) -> B,
1.6.0[src]
B: Ord,
F: FnMut(&Self::Item) -> B,
pub fn min_by<F>(self, compare: F) -> Option<Self::Item> where
F: FnMut(&Self::Item, &Self::Item) -> Ordering,
1.15.0[src]
F: FnMut(&Self::Item, &Self::Item) -> Ordering,
pub fn rev(self) -> Rev<Self> where
Self: DoubleEndedIterator,
1.0.0[src]
Self: DoubleEndedIterator,
pub fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB) where
FromA: Default + Extend<A>,
FromB: Default + Extend<B>,
Self: Iterator<Item = (A, B)>,
1.0.0[src]
FromA: Default + Extend<A>,
FromB: Default + Extend<B>,
Self: Iterator<Item = (A, B)>,
pub fn copied<'a, T>(self) -> Copied<Self> where
Self: Iterator<Item = &'a T>,
T: 'a + Copy,
1.36.0[src]
Self: Iterator<Item = &'a T>,
T: 'a + Copy,
pub fn cloned<'a, T>(self) -> Cloned<Self> where
Self: Iterator<Item = &'a T>,
T: 'a + Clone,
1.0.0[src]
Self: Iterator<Item = &'a T>,
T: 'a + Clone,
pub fn cycle(self) -> Cycle<Self> where
Self: Clone,
1.0.0[src]
Self: Clone,
pub fn sum<S>(self) -> S where
S: Sum<Self::Item>,
1.11.0[src]
S: Sum<Self::Item>,
pub fn product<P>(self) -> P where
P: Product<Self::Item>,
1.11.0[src]
P: Product<Self::Item>,
pub fn cmp<I>(self, other: I) -> Ordering where
I: IntoIterator<Item = Self::Item>,
Self::Item: Ord,
1.5.0[src]
I: IntoIterator<Item = Self::Item>,
Self::Item: Ord,
pub fn cmp_by<I, F>(self, other: I, cmp: F) -> Ordering where
F: FnMut(Self::Item, <I as IntoIterator>::Item) -> Ordering,
I: IntoIterator,
[src]
F: FnMut(Self::Item, <I as IntoIterator>::Item) -> Ordering,
I: IntoIterator,
pub fn partial_cmp<I>(self, other: I) -> Option<Ordering> where
I: IntoIterator,
Self::Item: PartialOrd<<I as IntoIterator>::Item>,
1.5.0[src]
I: IntoIterator,
Self::Item: PartialOrd<<I as IntoIterator>::Item>,
pub fn partial_cmp_by<I, F>(self, other: I, partial_cmp: F) -> Option<Ordering> where
F: FnMut(Self::Item, <I as IntoIterator>::Item) -> Option<Ordering>,
I: IntoIterator,
[src]
F: FnMut(Self::Item, <I as IntoIterator>::Item) -> Option<Ordering>,
I: IntoIterator,
pub fn eq<I>(self, other: I) -> bool where
I: IntoIterator,
Self::Item: PartialEq<<I as IntoIterator>::Item>,
1.5.0[src]
I: IntoIterator,
Self::Item: PartialEq<<I as IntoIterator>::Item>,
pub fn eq_by<I, F>(self, other: I, eq: F) -> bool where
F: FnMut(Self::Item, <I as IntoIterator>::Item) -> bool,
I: IntoIterator,
[src]
F: FnMut(Self::Item, <I as IntoIterator>::Item) -> bool,
I: IntoIterator,
pub fn ne<I>(self, other: I) -> bool where
I: IntoIterator,
Self::Item: PartialEq<<I as IntoIterator>::Item>,
1.5.0[src]
I: IntoIterator,
Self::Item: PartialEq<<I as IntoIterator>::Item>,
pub fn lt<I>(self, other: I) -> bool where
I: IntoIterator,
Self::Item: PartialOrd<<I as IntoIterator>::Item>,
1.5.0[src]
I: IntoIterator,
Self::Item: PartialOrd<<I as IntoIterator>::Item>,
pub fn le<I>(self, other: I) -> bool where
I: IntoIterator,
Self::Item: PartialOrd<<I as IntoIterator>::Item>,
1.5.0[src]
I: IntoIterator,
Self::Item: PartialOrd<<I as IntoIterator>::Item>,
pub fn gt<I>(self, other: I) -> bool where
I: IntoIterator,
Self::Item: PartialOrd<<I as IntoIterator>::Item>,
1.5.0[src]
I: IntoIterator,
Self::Item: PartialOrd<<I as IntoIterator>::Item>,
pub fn ge<I>(self, other: I) -> bool where
I: IntoIterator,
Self::Item: PartialOrd<<I as IntoIterator>::Item>,
1.5.0[src]
I: IntoIterator,
Self::Item: PartialOrd<<I as IntoIterator>::Item>,
pub fn is_sorted(self) -> bool where
Self::Item: PartialOrd<Self::Item>,
[src]
Self::Item: PartialOrd<Self::Item>,
pub fn is_sorted_by<F>(self, compare: F) -> bool where
F: FnMut(&Self::Item, &Self::Item) -> Option<Ordering>,
[src]
F: FnMut(&Self::Item, &Self::Item) -> Option<Ordering>,
pub fn is_sorted_by_key<F, K>(self, f: F) -> bool where
F: FnMut(Self::Item) -> K,
K: PartialOrd<K>,
[src]
F: FnMut(Self::Item) -> K,
K: PartialOrd<K>,
impl<T> Ord for RBox<T> where
T: Ord,
[src]
T: Ord,
pub fn cmp(&self, other: &Self) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
[src]
impl<T> OwnedPointer for RBox<T>
[src]
pub unsafe fn get_move_ptr(
this: &mut ManuallyDrop<Self>
) -> MovePtr<'_, Self::Target>
[src]
this: &mut ManuallyDrop<Self>
) -> MovePtr<'_, Self::Target>
pub unsafe fn drop_allocation(this: &mut ManuallyDrop<Self>)
[src]
pub fn with_move_ptr<F, R>(this: ManuallyDrop<Self>, f: F) -> R where
F: FnOnce(MovePtr<'_, Self::Target>) -> R,
Self::Target: Sized,
[src]
F: FnOnce(MovePtr<'_, Self::Target>) -> R,
Self::Target: Sized,
pub fn in_move_ptr<F, R>(self, f: F) -> R where
F: FnOnce(MovePtr<'_, Self::Target>) -> R,
Self::Target: Sized,
[src]
F: FnOnce(MovePtr<'_, Self::Target>) -> R,
Self::Target: Sized,
impl<T> PartialEq<RBox<T>> for RBox<T> where
T: PartialEq,
[src]
T: PartialEq,
pub fn eq(&self, other: &Self) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl<T> PartialOrd<RBox<T>> for RBox<T> where
T: PartialOrd,
[src]
T: PartialOrd,
pub fn partial_cmp(&self, other: &Self) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl<T> Pointer for RBox<T>
[src]
impl<T> Read for RBox<T> where
T: Read,
[src]
T: Read,
pub fn read(&mut self, buf: &mut [u8]) -> Result<usize>
[src]
pub fn read_vectored(&mut self, bufs: &mut [IoSliceMut<'_>]) -> Result<usize>
[src]
pub fn read_to_end(&mut self, buf: &mut Vec<u8>) -> Result<usize>
[src]
pub fn read_to_string(&mut self, buf: &mut String) -> Result<usize>
[src]
pub fn read_exact(&mut self, buf: &mut [u8]) -> Result<()>
[src]
pub fn is_read_vectored(&self) -> bool
[src]
pub unsafe fn initializer(&self) -> Initializer
[src]
pub fn by_ref(&mut self) -> &mut Self
1.0.0[src]
pub fn bytes(self) -> Bytes<Self>
1.0.0[src]
pub fn chain<R>(self, next: R) -> Chain<Self, R> where
R: Read,
1.0.0[src]
R: Read,
pub fn take(self, limit: u64) -> Take<Self>
1.0.0[src]
impl<T> Seek for RBox<T> where
T: Seek,
[src]
T: Seek,
pub fn seek(&mut self, pos: SeekFrom) -> Result<u64>
[src]
pub fn stream_len(&mut self) -> Result<u64, Error>
[src]
pub fn stream_position(&mut self) -> Result<u64, Error>
[src]
impl<T: Send> Send for RBox<T>
[src]
impl<T> Serialize for RBox<T> where
T: Serialize,
[src]
T: Serialize,
impl<T> StableAbi for RBox<T> where
T: __StableAbi,
[src]
T: __StableAbi,
type IsNonZeroType = False
Whether this type has a single invalid bit-pattern. Read more
pub const LAYOUT: &'static TypeLayout
[src]
pub const ABI_CONSTS: AbiConsts
[src]
impl<T: Sync> Sync for RBox<T>
[src]
impl<T> Unpin for RBox<T>
[src]
impl<T> Write for RBox<T> where
T: Write,
[src]
T: Write,
pub fn write(&mut self, buf: &[u8]) -> Result<usize>
[src]
pub fn write_vectored(&mut self, bufs: &[IoSlice<'_>]) -> Result<usize>
[src]
pub fn flush(&mut self) -> Result<()>
[src]
pub fn write_all(&mut self, buf: &[u8]) -> Result<()>
[src]
pub fn write_fmt(&mut self, fmt: Arguments<'_>) -> Result<()>
[src]
pub fn is_write_vectored(&self) -> bool
[src]
pub fn write_all_vectored(
&mut self,
bufs: &mut [IoSlice<'_>]
) -> Result<(), Error>
[src]
&mut self,
bufs: &mut [IoSlice<'_>]
) -> Result<(), Error>
pub fn by_ref(&mut self) -> &mut Self
1.0.0[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for RBox<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> UnwindSafe for RBox<T> where
T: RefUnwindSafe + UnwindSafe,
T: RefUnwindSafe + UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<'a, T> BorrowOwned<'a> for T where
T: 'a + Clone,
[src]
T: 'a + Clone,
type ROwned = T
The owned type, stored in RCow::Owned
type RBorrowed = &'a T
The borrowed type, stored in RCow::Borrowed
pub 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
pub 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
pub fn deref_borrowed(&<T as BorrowOwned<'a>>::RBorrowed) -> &T
[src]
pub fn deref_owned(&<T as BorrowOwned<'a>>::ROwned) -> &T
[src]
pub fn from_cow_borrow(&'a T) -> <T as BorrowOwned<'a>>::RBorrowed
[src]
pub fn from_cow_owned(<T as ToOwned>::Owned) -> <T as BorrowOwned<'a>>::ROwned
[src]
pub fn into_cow_borrow(<T as BorrowOwned<'a>>::RBorrowed) -> &'a T
[src]
pub fn into_cow_owned(<T as BorrowOwned<'a>>::ROwned) -> <T as ToOwned>::Owned
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T> GetWithMetadata for T
[src]
type ForSelf = WithMetadata_<T, T>
This is always WithMetadata_<Self, Self>
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<F> IntoFuture for F where
F: Future,
[src]
F: Future,
type Output = <F as Future>::Output
into_future
)The output that the future will produce on completion.
type Future = F
into_future
)Which kind of future are we turning this into?
pub fn into_future(self) -> <F as IntoFuture>::Future
[src]
impl<I> IntoIterator for I where
I: Iterator,
[src]
I: Iterator,
type Item = <I as Iterator>::Item
The type of the elements being iterated over.
type IntoIter = I
Which kind of iterator are we turning this into?
pub fn into_iter(self) -> I
[src]
impl<I> IteratorExt for I where
I: Iterator,
[src]
I: Iterator,
pub fn collect_<T>(self, PhantomData<fn() -> T>) -> T where
T: FromIterator<Self::Item>,
[src]
T: FromIterator<Self::Item>,
pub fn extending<C>(self, extend: &mut C) where
C: Extend<Self::Item>,
[src]
C: Extend<Self::Item>,
pub fn collect_into<C>(self, extend: C) -> C where
C: Extend<Self::Item>,
[src]
C: Extend<Self::Item>,
pub fn replace_nth(self, nth: usize, with: Self::Item) -> ReplaceNth<Self>
[src]
impl<T> SelfOps for T where
T: ?Sized,
[src]
T: ?Sized,
pub const T: PhantomData<fn() -> Self>
[src]
pub const T_D: PhantomData<Self>
[src]
pub fn assert_ty(self, _other: PhantomData<fn() -> Self>) -> Self
[src]
pub fn assert_ty_ref(&self, _other: PhantomData<fn() -> Self>) -> &Self
[src]
pub fn assert_ty_mut(&mut self, _other: PhantomData<fn() -> Self>) -> &mut Self
[src]
pub fn ty_(&self) -> PhantomData<fn() -> Self>
[src]
pub fn ty_d(&self) -> PhantomData<Self>
[src]
pub fn ty_inv(&self) -> PhantomData<fn(Self) -> Self>
[src]
pub fn ty_inv_ref(&self) -> PhantomData<Cell<&Self>>
[src]
pub fn eq_id(&self, other: &Self) -> bool
[src]
pub fn piped<F, U>(self, f: F) -> U where
F: FnOnce(Self) -> U,
[src]
F: FnOnce(Self) -> U,
pub fn piped_ref<'a, F, U>(&'a self, f: F) -> U where
F: FnOnce(&'a Self) -> U,
[src]
F: FnOnce(&'a Self) -> U,
pub 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,
pub fn mutated<F>(self, f: F) -> Self where
F: FnOnce(&mut Self),
[src]
F: FnOnce(&mut Self),
pub fn observe<F>(self, f: F) -> Self where
F: FnOnce(&Self),
[src]
F: FnOnce(&Self),
pub fn into_<T>(self, PhantomData<fn() -> T>) -> T where
Self: Into<T>,
[src]
Self: Into<T>,
pub fn as_ref_<T>(&self) -> &T where
Self: AsRef<T>,
T: ?Sized,
[src]
Self: AsRef<T>,
T: ?Sized,
pub fn as_mut_<T>(&mut self) -> &mut T where
Self: AsMut<T>,
T: ?Sized,
[src]
Self: AsMut<T>,
T: ?Sized,
pub fn drop_(self)
[src]
impl<T> StringExt for T where
T: Borrow<str> + ?Sized,
[src]
T: Borrow<str> + ?Sized,
pub fn previous_char_boundary(&self, index: usize) -> usize
[src]
pub fn next_char_boundary(&self, index: usize) -> usize
[src]
pub fn left_char_boundary(&self, index: usize) -> usize
[src]
pub fn right_char_boundary(&self, index: usize) -> usize
[src]
pub fn get_offset_inside_of(&self, parent: &str) -> Option<usize>
[src]
pub fn offset_inside_of(&self, parent: &str) -> usize
[src]
pub fn is_substring_of(&self, parent: &str) -> bool
[src]
pub fn split_while<P, T>(&'a self, mapper: P) -> SplitWhile<'a, P, T> where
P: FnMut(char) -> T,
T: Clone + Eq,
[src]
P: FnMut(char) -> T,
T: Clone + Eq,
pub fn rsplit_while<P, T>(&'a self, mapper: P) -> RSplitWhile<'a, P, T> where
P: FnMut(char) -> T,
T: Clone + Eq,
[src]
P: FnMut(char) -> T,
T: Clone + Eq,
pub fn get_nth_char_index(&self, n: usize) -> Option<usize>
[src]
pub fn nth_char_index(&self, n: usize) -> usize
[src]
pub fn nth_char(&self, n: usize) -> Option<char>
[src]
pub fn first_chars(&self, n: usize) -> &str
[src]
pub fn last_chars(&self, n: usize) -> &str
[src]
pub fn from_nth_char(&self, n: usize) -> &str
[src]
pub fn calc_len_utf16(&self) -> usize
[src]
pub fn get_char_at(&self, at_byte: usize) -> Option<char>
[src]
pub fn char_indices_to(&self, to: usize) -> CharIndices<'_>
[src]
pub fn char_indices_from(&self, from: usize) -> CharIndicesFrom<'_>
[src]
pub fn left_pad(&self, how_much: usize) -> String
[src]
pub fn left_padder(&'a self, how_much: usize) -> LeftPadder<'a>
[src]
pub fn line_indentation(&self) -> usize
[src]
pub fn min_indentation(&self) -> usize
[src]
pub fn max_indentation(&self) -> usize
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<This> TransmuteElement for This where
This: ?Sized,
[src]
This: ?Sized,
pub unsafe fn transmute_element<T>(self) -> Self::TransmutedPtr where
Self: CanTransmuteElement<T>,
Self::Target: Sized,
[src]
Self: CanTransmuteElement<T>,
Self::Target: Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> 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.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T, U> TryInto<U> 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.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> TypeIdentity for T where
T: ?Sized,
[src]
T: ?Sized,
type Type = T
The same type as Self. Read more
pub fn into_type_val(self) -> Self::Type where
Self::Type: Sized,
[src]
Self::Type: Sized,
pub fn into_type_ref(&self) -> &Self::Type
[src]
pub fn into_type_mut(&mut self) -> &mut Self::Type
[src]
pub fn into_type_box(self: Box<Self, Global>) -> Box<Self::Type, Global>
[src]
pub fn into_type_arc(this: Arc<Self>) -> Arc<Self::Type>
[src]
pub fn into_type_rc(this: Rc<Self>) -> Rc<Self::Type>
[src]
pub fn from_type_val(this: Self::Type) -> Self where
Self::Type: Sized,
[src]
Self::Type: Sized,
pub fn from_type_ref(this: &Self::Type) -> &Self
[src]
pub fn from_type_mut(this: &mut Self::Type) -> &mut Self
[src]
pub fn from_type_box(this: Box<Self::Type, Global>) -> Box<Self, Global>
[src]
pub fn from_type_arc(this: Arc<Self::Type>) -> Arc<Self>
[src]
pub fn from_type_rc(this: Rc<Self::Type>) -> Rc<Self>
[src]
impl<This> ValidTag_Bounds for This where
This: Debug + Clone + PartialEq<This>,
[src]
This: Debug + Clone + PartialEq<This>,