[−][src]Struct pebble_skip::Box
Just a standard Box, more or less. The main difference is that its constructor is fallible instead of panicking.
It probably has fewer features than Rust's version, but it should be possible to add or emulate those.
Implementations
impl<'a, T> Box<'a, T>
[src]
pub fn new(value: T) -> Result<Self, T>
[src]
#[must_use]pub fn into_inner(r#box: Self) -> T
[src]
Moves r#box
's value off the Pebble heap.
impl<'a> Box<'a, [MaybeUninit<u8>]>
[src]
pub fn new_buffer_uninit(len: usize) -> Result<Self, ()>
[src]
Errors
Iff not enough heap memory could be allocated.
#[must_use]pub fn assume_init(r#box: Self) -> Box<'a, [u8]>ⓘ
[src]
impl<'a, T: ?Sized> Box<'a, T>
[src]
#[must_use =
"If the Box instance is not reassembled later, a memory leak occurs."]pub fn leak(r#box: Self) -> &'a mut T where
T: 'a,
[src]
T: 'a,
pub unsafe fn from_raw(raw: &'a mut T) -> Self
[src]
Reassembles a Box
instance from a leaked reference.
Safety
Iff the reference was previously leaked from a matching Box
instance.
#[must_use]pub unsafe fn downcast_unchecked<U: Unsize<T>>(r#box: Self) -> Box<'a, U>ⓘ
[src]
impl Box<'static, CStr<Heap>>
[src]
pub fn clone_to_c_str(value: &str) -> Result<Self, ()>
[src]
Trait Implementations
impl<'a, T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<Box<'a, U>> for Box<'a, T>
[src]
impl<'a, T: ?Sized> Deref for Box<'a, T>
[src]
impl<'a, T: ?Sized> DerefMut for Box<'a, T>
[src]
impl<'a, T: ?Sized> Drop for Box<'a, T>
[src]
impl<'a> From<Box<'a, CStr<Heap>>> for Box<'a, str>
[src]
impl<'a, F: ?Sized + Future + Unpin> Future for Box<'a, F>
[src]
type Output = F::Output
The type of value produced on completion.
fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>
[src]
impl<'a> TryFrom<Box<'a, str>> for Box<'a, CStr<Heap>>
[src]
type Error = ()
The type returned in the event of a conversion error.
fn try_from(value: Box<'_, str>) -> Result<Self, Self::Error>
[src]
impl<'a, T: ?Sized> Unpin for Box<'a, T>
[src]
Auto Trait Implementations
impl<'a, T: ?Sized> Send for Box<'a, T> where
T: Send,
T: Send,
impl<'a, T: ?Sized> Sync for Box<'a, T> where
T: Sync,
T: Sync,
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<T> From<T> for T
[src]
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
🔬 This is a nightly-only experimental API. (
into_future
)The output that the future will produce on completion.
type Future = F
🔬 This is a nightly-only experimental API. (
into_future
)Which kind of future are we turning this into?
pub fn into_future(self) -> <F as IntoFuture>::Future
[src]
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>,