Struct scratchpad::MarkerFront [−][src]
Scratchpad
marker for allocations from the front of the allocation
buffer.
A MarkerFront
is created when calling the mark_front()
method on a
Scratchpad
instance. Object allocations can only be made from the most
recently created MarkerFront
or MarkerBack
that is still active.
Markers are statically bound to the lifetime of the Scratchpad
from
which they are created, ensuring that no dangling references are left when
the Scratchpad
is dropped.
This struct wraps Marker
trait methods to avoid the need to import
Marker
into scope.
Implementations
impl<'scratchpad, BufferT, TrackingT> MarkerFront<'scratchpad, BufferT, TrackingT> where
BufferT: 'scratchpad + Buffer,
TrackingT: 'scratchpad + Tracking,
[src]
BufferT: 'scratchpad + Buffer,
TrackingT: 'scratchpad + Tracking,
pub fn allocate<T>(&self, value: T) -> Result<Allocation<'_, T>, Error<(T,)>>
[src]
Allocates space for the given value, moving it into the allocation.
Examples
use scratchpad::Scratchpad; let scratchpad = Scratchpad::<[u64; 1], [usize; 1]>::new([0], [0]); let marker = scratchpad.mark_front().unwrap(); let x = marker.allocate(3.14159).unwrap(); assert_eq!(*x, 3.14159);
pub fn allocate_default<T: Default>(
&self
) -> Result<Allocation<'_, T>, Error<()>>
[src]
&self
) -> Result<Allocation<'_, T>, Error<()>>
Allocates space for a value, initializing it to its default.
Examples
use scratchpad::Scratchpad; let scratchpad = Scratchpad::<[u64; 1], [usize; 1]>::new([0], [0]); let marker = scratchpad.mark_front().unwrap(); let x = marker.allocate_default::<f64>().unwrap(); assert_eq!(*x, 0.0);
pub unsafe fn allocate_uninitialized<T>(
&self
) -> Result<Allocation<'_, T>, Error<()>>
[src]
&self
) -> Result<Allocation<'_, T>, Error<()>>
Allocates uninitialized space for the given type.
Safety
Since memory for the allocated data is uninitialized, it can
potentially be in an invalid state for a given type, leading to
undefined program behavior. It is recommended that one of the safe
allocate*()
methods are used instead if possible.
Examples
use scratchpad::Scratchpad; let scratchpad = Scratchpad::<[u64; 1], [usize; 1]>::new([0], [0]); let marker = scratchpad.mark_front().unwrap(); let mut x = unsafe { marker.allocate_uninitialized().unwrap() }; *x = 3.14159; assert_eq!(*x, 3.14159);
pub fn allocate_array<T: Clone>(
&self,
len: usize,
value: T
) -> Result<Allocation<'_, [T]>, Error<(T,)>>
[src]
&self,
len: usize,
value: T
) -> Result<Allocation<'_, [T]>, Error<(T,)>>
Allocates space for an array, initializing each element with the given value.
Examples
use scratchpad::Scratchpad; let scratchpad = Scratchpad::<[u64; 3], [usize; 1]>::new([0; 3], [0]); let marker = scratchpad.mark_front().unwrap(); let x = marker.allocate_array(3, 3.14159).unwrap(); assert_eq!(*x, [3.14159, 3.14159, 3.14159]);
pub fn allocate_array_default<T: Default>(
&self,
len: usize
) -> Result<Allocation<'_, [T]>, Error<()>>
[src]
&self,
len: usize
) -> Result<Allocation<'_, [T]>, Error<()>>
Allocates space for an array, initializing each element to its default value.
Examples
use scratchpad::Scratchpad; let scratchpad = Scratchpad::<[u64; 3], [usize; 1]>::new([0; 3], [0]); let marker = scratchpad.mark_front().unwrap(); let x = marker.allocate_array_default::<f64>(3).unwrap(); assert_eq!(*x, [0.0, 0.0, 0.0]);
pub fn allocate_array_with<T, F: FnMut(usize) -> T>(
&self,
len: usize,
func: F
) -> Result<Allocation<'_, [T]>, Error<()>>
[src]
&self,
len: usize,
func: F
) -> Result<Allocation<'_, [T]>, Error<()>>
Allocates space for an array, initializing each element with the result of a function.
The function func
takes a single parameter containing the index of
the element being initialized.
Examples
use scratchpad::Scratchpad; let scratchpad = Scratchpad::<[u64; 3], [usize; 1]>::new([0; 3], [0]); let marker = scratchpad.mark_front().unwrap(); let x = marker.allocate_array_with(3, |index| index as f64).unwrap(); assert_eq!(*x, [0.0, 1.0, 2.0]);
pub unsafe fn allocate_array_uninitialized<T>(
&self,
len: usize
) -> Result<Allocation<'_, [T]>, Error<()>>
[src]
&self,
len: usize
) -> Result<Allocation<'_, [T]>, Error<()>>
Allocates uninitialized space for an array of the given type.
Safety
Since memory for the allocated data is uninitialized, it can
potentially be in an invalid state for a given type, leading to
undefined program behavior. It is recommended that one of the safe
allocate*()
methods are used instead if possible.
Examples
use scratchpad::Scratchpad; let scratchpad = Scratchpad::<[u64; 3], [usize; 1]>::new([0; 3], [0]); let marker = scratchpad.mark_front().unwrap(); let mut x = unsafe { marker.allocate_array_uninitialized(3).unwrap() }; x[0] = 3.14159; x[1] = 4.14159; x[2] = 5.14159; assert_eq!(*x, [3.14159, 4.14159, 5.14159]);
pub fn allocate_slice<T: ?Sized, U>(
&self,
values: U
) -> Result<Allocation<'_, T>, Error<(U,)>> where
T: SliceLike,
U: SliceMoveSource<T>,
[src]
&self,
values: U
) -> Result<Allocation<'_, T>, Error<(U,)>> where
T: SliceLike,
U: SliceMoveSource<T>,
Allocates a slice, initializing its contents by moving the given values into the allocation.
Examples
use scratchpad::Scratchpad; let scratchpad = Scratchpad::<[u64; 3], [usize; 1]>::static_new(); let marker = scratchpad.mark_front().unwrap(); let values = [3.14159, 4.14159, 5.14159]; let allocation = marker.allocate_slice(values).unwrap(); let allocation_slice: &[f64] = &*allocation; assert_eq!(*allocation_slice, [3.14159, 4.14159, 5.14159]);
pub fn allocate_slice_clone<T: ?Sized, U>(
&self,
values: U
) -> Result<Allocation<'_, T>, Error<()>> where
T: SliceLike,
<T as SliceLike>::Element: Clone,
U: SliceSource<T>,
[src]
&self,
values: U
) -> Result<Allocation<'_, T>, Error<()>> where
T: SliceLike,
<T as SliceLike>::Element: Clone,
U: SliceSource<T>,
Allocates a copy of a slice by cloning each individual element.
Examples
use scratchpad::Scratchpad; let scratchpad = Scratchpad::<[u8; 32], [usize; 1]>::static_new(); let marker = scratchpad.mark_front().unwrap(); let message = "foo"; let allocation = marker.allocate_slice_clone(message).unwrap(); assert_eq!(&*allocation, "foo");
pub fn allocate_slice_copy<T: ?Sized, U>(
&self,
values: U
) -> Result<Allocation<'_, T>, Error<()>> where
T: SliceLike,
<T as SliceLike>::Element: Copy,
U: SliceSource<T>,
[src]
&self,
values: U
) -> Result<Allocation<'_, T>, Error<()>> where
T: SliceLike,
<T as SliceLike>::Element: Copy,
U: SliceSource<T>,
Allocates a copy of a slice by performing a fast copy (equivalent to
C's memcpy()
function) into the new allocation.
Examples
use scratchpad::Scratchpad; let scratchpad = Scratchpad::<[u8; 32], [usize; 1]>::static_new(); let marker = scratchpad.mark_front().unwrap(); let message = "foo"; let allocation = marker.allocate_slice_copy(message).unwrap(); assert_eq!(&*allocation, "foo");
pub fn append<'marker, T: ?Sized, U: ?Sized, V>(
&'marker self,
allocation: Allocation<'marker, U>,
values: V
) -> Result<Allocation<'marker, T>, Error<(Allocation<'marker, U>, V)>> where
T: ConcatenateSlice,
U: IntoMutSliceLikePtr<T>,
V: SliceMoveSource<T>,
[src]
&'marker self,
allocation: Allocation<'marker, U>,
values: V
) -> Result<Allocation<'marker, T>, Error<(Allocation<'marker, U>, V)>> where
T: ConcatenateSlice,
U: IntoMutSliceLikePtr<T>,
V: SliceMoveSource<T>,
Extends an allocation by moving values onto its end, converting the allocation to a slice if necessary.
The following requirements must be met to allow elements to be appended:
- The marker must be the most recently created front marker from its scratchpad.
- The allocation must contain a scalar, array, or slice of the type being pushed.
- The data being pushed must be a scalar, array, boxed slice, or vector of the same type.
- The allocation must be the most recent allocation made from this marker, even if other, more recent allocations have been released.
Examples
use scratchpad::Scratchpad; let scratchpad = Scratchpad::<[u32; 5], [usize; 1]>::static_new(); let marker = scratchpad.mark_front().unwrap(); let a = marker.allocate([3.14159f32, 2.71828f32]).unwrap(); let ab = marker.append(a, [0.70711f32]).unwrap(); assert_eq!(*ab, [3.14159f32, 2.71828f32, 0.70711f32]); let abc = marker.append(ab, vec![0.57722f32, 1.61803f32]).unwrap(); assert_eq!( *abc, [3.14159f32, 2.71828f32, 0.70711f32, 0.57722f32, 1.61803f32], );
pub fn append_clone<'marker, T: ?Sized, U: ?Sized, V>(
&'marker self,
allocation: Allocation<'marker, U>,
values: V
) -> Result<Allocation<'marker, T>, Error<(Allocation<'marker, U>,)>> where
T: ConcatenateSlice,
<T as SliceLike>::Element: Clone,
U: IntoMutSliceLikePtr<T>,
V: SliceSource<T>,
[src]
&'marker self,
allocation: Allocation<'marker, U>,
values: V
) -> Result<Allocation<'marker, T>, Error<(Allocation<'marker, U>,)>> where
T: ConcatenateSlice,
<T as SliceLike>::Element: Clone,
U: IntoMutSliceLikePtr<T>,
V: SliceSource<T>,
Extends an allocation by cloning values onto its end, converting the allocation to a slice if necessary.
The following requirements must be met to allow elements to be appended:
- The marker must be the most recently created front marker from its scratchpad.
- The allocation must contain a scalar, array, or slice of the type being pushed.
- The data being pushed must be a scalar, array, boxed slice, or vector of the same type.
- The allocation must be the most recent allocation made from this marker, even if other, more recent allocations have been released.
Note that the values
parameter is consumed as part of the allocation
process and cannot be returned on error.
Examples
use scratchpad::{Allocation, Scratchpad}; let scratchpad = Scratchpad::<[u32; 5], [usize; 1]>::static_new(); let marker = scratchpad.mark_front().unwrap(); let a: Allocation<[f32]> = marker.allocate([3.14159f32, 2.71828f32]) .unwrap() .into_slice_like_allocation(); let ab = marker.append_clone(a, &[0.57722f32, 1.61803f32][..]) .unwrap(); assert_eq!(*ab, [3.14159f32, 2.71828f32, 0.57722f32, 1.61803f32]);
pub fn append_copy<'marker, T: ?Sized, U: ?Sized, V>(
&'marker self,
allocation: Allocation<'marker, U>,
values: V
) -> Result<Allocation<'marker, T>, Error<(Allocation<'marker, U>,)>> where
T: ConcatenateSlice,
<T as SliceLike>::Element: Copy,
U: IntoMutSliceLikePtr<T>,
V: SliceSource<T>,
[src]
&'marker self,
allocation: Allocation<'marker, U>,
values: V
) -> Result<Allocation<'marker, T>, Error<(Allocation<'marker, U>,)>> where
T: ConcatenateSlice,
<T as SliceLike>::Element: Copy,
U: IntoMutSliceLikePtr<T>,
V: SliceSource<T>,
Extends an allocation by copying values onto its end, converting the allocation to a slice if necessary.
The following requirements must be met to allow elements to be appended:
- The marker must be the most recently created front marker from its scratchpad.
- The allocation must contain a scalar, array, or slice of the type being pushed.
- The data being pushed must be a scalar, array, boxed slice, or vector of the same type.
- The allocation must be the most recent allocation made from this marker, even if other, more recent allocations have been released.
Note that the values
parameter is consumed as part of the allocation
process and cannot be returned on error.
Examples
use scratchpad::{Allocation, Scratchpad}; let scratchpad = Scratchpad::<[u32; 5], [usize; 1]>::static_new(); let marker = scratchpad.mark_front().unwrap(); let a: Allocation<[f32]> = marker.allocate([3.14159f32, 2.71828f32]) .unwrap() .into_slice_like_allocation(); let ab = marker.append_copy(a, &[0.57722f32, 1.61803f32][..]) .unwrap(); assert_eq!(*ab, [3.14159f32, 2.71828f32, 0.57722f32, 1.61803f32]);
pub fn concat_slices<T: ?Sized, U>(
&self,
values: U
) -> Result<Allocation<'_, T>, Error<(U,)>> where
T: ConcatenateSlice,
U: SliceMoveSourceCollection<T>,
[src]
&self,
values: U
) -> Result<Allocation<'_, T>, Error<(U,)>> where
T: ConcatenateSlice,
U: SliceMoveSourceCollection<T>,
Combines each of the provided slices into a single slice allocated from this marker, moving the slice values into the new allocation.
Examples
use scratchpad::Scratchpad; let scratchpad = Scratchpad::<[u8; 16], [usize; 1]>::static_new(); let marker = scratchpad.mark_front().unwrap(); let combined = marker.concat_slices(("Hello,", " world", "!")) .unwrap(); assert_eq!(&*combined, "Hello, world!");
pub fn concat_slices_clone<T: ?Sized, U>(
&self,
values: U
) -> Result<Allocation<'_, T>, Error<()>> where
T: ConcatenateSlice,
<T as SliceLike>::Element: Clone,
U: SliceSourceCollection<T>,
[src]
&self,
values: U
) -> Result<Allocation<'_, T>, Error<()>> where
T: ConcatenateSlice,
<T as SliceLike>::Element: Clone,
U: SliceSourceCollection<T>,
Combines cloned copies of each of the provided slices into a single slice allocated from this marker.
Examples
use scratchpad::Scratchpad; let scratchpad = Scratchpad::<[u8; 16], [usize; 1]>::static_new(); let marker = scratchpad.mark_front().unwrap(); let combined = marker.concat_slices_clone(("Hello,", " world", "!")) .unwrap(); assert_eq!(&*combined, "Hello, world!");
pub fn concat_slices_copy<T: ?Sized, U>(
&self,
values: U
) -> Result<Allocation<'_, T>, Error<()>> where
T: ConcatenateSlice,
<T as SliceLike>::Element: Copy,
U: SliceSourceCollection<T>,
[src]
&self,
values: U
) -> Result<Allocation<'_, T>, Error<()>> where
T: ConcatenateSlice,
<T as SliceLike>::Element: Copy,
U: SliceSourceCollection<T>,
Combines copies of each of the provided slices into a single slice allocated from this marker.
Slices are copied by performing a fast memory copy from each of the
source slices (equivalent to C's memcpy()
function).
Examples
use scratchpad::Scratchpad; let scratchpad = Scratchpad::<[u8; 16], [usize; 1]>::static_new(); let marker = scratchpad.mark_front().unwrap(); let combined = marker.concat_slices_copy(("Hello,", " world", "!")) .unwrap(); assert_eq!(&*combined, "Hello, world!");
Trait Implementations
impl<'scratchpad, BufferT: Debug, TrackingT: Debug> Debug for MarkerFront<'scratchpad, BufferT, TrackingT> where
BufferT: 'scratchpad + Buffer,
TrackingT: 'scratchpad + Tracking,
[src]
BufferT: 'scratchpad + Buffer,
TrackingT: 'scratchpad + Tracking,
impl<'scratchpad, BufferT, TrackingT> Drop for MarkerFront<'scratchpad, BufferT, TrackingT> where
BufferT: 'scratchpad + Buffer,
TrackingT: 'scratchpad + Tracking,
[src]
BufferT: 'scratchpad + Buffer,
TrackingT: 'scratchpad + Tracking,
impl<'scratchpad, BufferT, TrackingT> Marker for MarkerFront<'scratchpad, BufferT, TrackingT> where
BufferT: 'scratchpad + Buffer,
TrackingT: 'scratchpad + Tracking,
[src]
BufferT: 'scratchpad + Buffer,
TrackingT: 'scratchpad + Tracking,
unsafe fn allocate_memory(
&self,
alignment: usize,
size: usize,
len: usize
) -> Result<*mut u8, Error<()>>
[src]
&self,
alignment: usize,
size: usize,
len: usize
) -> Result<*mut u8, Error<()>>
fn is_allocation_at_end<'marker, T: ?Sized, U: ?Sized>(
&'marker self,
allocation: &Allocation<'marker, T>
) -> bool where
T: IntoMutSliceLikePtr<U>,
U: SliceLike,
[src]
&'marker self,
allocation: &Allocation<'marker, T>
) -> bool where
T: IntoMutSliceLikePtr<U>,
U: SliceLike,
unsafe fn concat_allocations_unchecked<'marker, T: ?Sized, U: ?Sized, V: ?Sized>(
base: Allocation<'marker, U>,
extension: Allocation<'marker, V>
) -> Allocation<'marker, T> where
T: ConcatenateSlice,
U: IntoMutSliceLikePtr<T>,
V: IntoMutSliceLikePtr<T>,
[src]
base: Allocation<'marker, U>,
extension: Allocation<'marker, V>
) -> Allocation<'marker, T> where
T: ConcatenateSlice,
U: IntoMutSliceLikePtr<T>,
V: IntoMutSliceLikePtr<T>,
fn allocate<T>(&self, value: T) -> Result<Allocation<'_, T>, Error<(T,)>>
[src]
fn allocate_default<T: Default>(&self) -> Result<Allocation<'_, T>, Error<()>>
[src]
unsafe fn allocate_uninitialized<T>(
&self
) -> Result<Allocation<'_, T>, Error<()>>
[src]
&self
) -> Result<Allocation<'_, T>, Error<()>>
fn allocate_array<T: Clone>(
&self,
len: usize,
value: T
) -> Result<Allocation<'_, [T]>, Error<(T,)>>
[src]
&self,
len: usize,
value: T
) -> Result<Allocation<'_, [T]>, Error<(T,)>>
fn allocate_array_default<T: Default>(
&self,
len: usize
) -> Result<Allocation<'_, [T]>, Error<()>>
[src]
&self,
len: usize
) -> Result<Allocation<'_, [T]>, Error<()>>
fn allocate_array_with<T, F: FnMut(usize) -> T>(
&self,
len: usize,
func: F
) -> Result<Allocation<'_, [T]>, Error<()>>
[src]
&self,
len: usize,
func: F
) -> Result<Allocation<'_, [T]>, Error<()>>
unsafe fn allocate_array_uninitialized<T>(
&self,
len: usize
) -> Result<Allocation<'_, [T]>, Error<()>>
[src]
&self,
len: usize
) -> Result<Allocation<'_, [T]>, Error<()>>
fn allocate_slice<T: ?Sized, U>(
&self,
values: U
) -> Result<Allocation<'_, T>, Error<(U,)>> where
T: SliceLike,
U: SliceMoveSource<T>,
[src]
&self,
values: U
) -> Result<Allocation<'_, T>, Error<(U,)>> where
T: SliceLike,
U: SliceMoveSource<T>,
fn allocate_slice_clone<T: ?Sized, U>(
&self,
values: U
) -> Result<Allocation<'_, T>, Error<()>> where
T: SliceLike,
<T as SliceLike>::Element: Clone,
U: SliceSource<T>,
[src]
&self,
values: U
) -> Result<Allocation<'_, T>, Error<()>> where
T: SliceLike,
<T as SliceLike>::Element: Clone,
U: SliceSource<T>,
fn allocate_slice_copy<T: ?Sized, U>(
&self,
values: U
) -> Result<Allocation<'_, T>, Error<()>> where
T: SliceLike,
<T as SliceLike>::Element: Copy,
U: SliceSource<T>,
[src]
&self,
values: U
) -> Result<Allocation<'_, T>, Error<()>> where
T: SliceLike,
<T as SliceLike>::Element: Copy,
U: SliceSource<T>,
fn extend<'marker, T: ?Sized, U: ?Sized, V>(
&'marker self,
allocation: Allocation<'marker, U>,
values: V
) -> Result<Allocation<'marker, T>, Error<(Allocation<'marker, U>, V)>> where
T: ConcatenateSlice,
U: IntoMutSliceLikePtr<T>,
V: SliceMoveSource<T>,
[src]
&'marker self,
allocation: Allocation<'marker, U>,
values: V
) -> Result<Allocation<'marker, T>, Error<(Allocation<'marker, U>, V)>> where
T: ConcatenateSlice,
U: IntoMutSliceLikePtr<T>,
V: SliceMoveSource<T>,
fn extend_clone<'marker, T: ?Sized, U: ?Sized, V>(
&'marker self,
allocation: Allocation<'marker, U>,
values: V
) -> Result<Allocation<'marker, T>, Error<(Allocation<'marker, U>,)>> where
T: ConcatenateSlice,
<T as SliceLike>::Element: Clone,
U: IntoMutSliceLikePtr<T>,
V: SliceSource<T>,
[src]
&'marker self,
allocation: Allocation<'marker, U>,
values: V
) -> Result<Allocation<'marker, T>, Error<(Allocation<'marker, U>,)>> where
T: ConcatenateSlice,
<T as SliceLike>::Element: Clone,
U: IntoMutSliceLikePtr<T>,
V: SliceSource<T>,
fn extend_copy<'marker, T: ?Sized, U: ?Sized, V>(
&'marker self,
allocation: Allocation<'marker, U>,
values: V
) -> Result<Allocation<'marker, T>, Error<(Allocation<'marker, U>,)>> where
T: ConcatenateSlice,
<T as SliceLike>::Element: Copy,
U: IntoMutSliceLikePtr<T>,
V: SliceSource<T>,
[src]
&'marker self,
allocation: Allocation<'marker, U>,
values: V
) -> Result<Allocation<'marker, T>, Error<(Allocation<'marker, U>,)>> where
T: ConcatenateSlice,
<T as SliceLike>::Element: Copy,
U: IntoMutSliceLikePtr<T>,
V: SliceSource<T>,
fn concat_slices<T: ?Sized, U>(
&self,
values: U
) -> Result<Allocation<'_, T>, Error<(U,)>> where
T: ConcatenateSlice,
U: SliceMoveSourceCollection<T>,
[src]
&self,
values: U
) -> Result<Allocation<'_, T>, Error<(U,)>> where
T: ConcatenateSlice,
U: SliceMoveSourceCollection<T>,
fn concat_slices_clone<T: ?Sized, U>(
&self,
values: U
) -> Result<Allocation<'_, T>, Error<()>> where
T: ConcatenateSlice,
<T as SliceLike>::Element: Clone,
U: SliceSourceCollection<T>,
[src]
&self,
values: U
) -> Result<Allocation<'_, T>, Error<()>> where
T: ConcatenateSlice,
<T as SliceLike>::Element: Clone,
U: SliceSourceCollection<T>,
fn concat_slices_copy<T: ?Sized, U>(
&self,
values: U
) -> Result<Allocation<'_, T>, Error<()>> where
T: ConcatenateSlice,
<T as SliceLike>::Element: Copy,
U: SliceSourceCollection<T>,
[src]
&self,
values: U
) -> Result<Allocation<'_, T>, Error<()>> where
T: ConcatenateSlice,
<T as SliceLike>::Element: Copy,
U: SliceSourceCollection<T>,
Auto Trait Implementations
impl<'scratchpad, BufferT, TrackingT> !RefUnwindSafe for MarkerFront<'scratchpad, BufferT, TrackingT>
[src]
impl<'scratchpad, BufferT, TrackingT> !Send for MarkerFront<'scratchpad, BufferT, TrackingT>
[src]
impl<'scratchpad, BufferT, TrackingT> !Sync for MarkerFront<'scratchpad, BufferT, TrackingT>
[src]
impl<'scratchpad, BufferT, TrackingT> Unpin for MarkerFront<'scratchpad, BufferT, TrackingT>
[src]
impl<'scratchpad, BufferT, TrackingT> !UnwindSafe for MarkerFront<'scratchpad, BufferT, TrackingT>
[src]
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<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>,