pub struct ArraySlice<T> { /* private fields */ }Expand description
A view over length elements of a shared array starting at start.
Implementations§
Source§impl<T> ArraySlice<T>
impl<T> ArraySlice<T>
A slice over part of a shared array.
Panics when the range is outside the array.
Sourcepub fn span(&self) -> Ref<'_, [T]>
pub fn span(&self) -> Ref<'_, [T]>
Borrows the elements (C# Span).
Panics when the array is mutably borrowed.
Sourcepub fn span_mut(&self) -> RefMut<'_, [T]>
pub fn span_mut(&self) -> RefMut<'_, [T]>
Mutably borrows the elements (C# Span).
Panics when the array is borrowed.
Sourcepub fn slice(&self, start: usize, length: usize) -> Self
pub fn slice(&self, start: usize, length: usize) -> Self
A slice of the same array. As upstream, start is relative to the
underlying array, not to this slice.
Trait Implementations§
Source§impl<T> Clone for ArraySlice<T>
impl<T> Clone for ArraySlice<T>
Auto Trait Implementations§
impl<T> !RefUnwindSafe for ArraySlice<T>
impl<T> !Send for ArraySlice<T>
impl<T> !Sync for ArraySlice<T>
impl<T> !UnwindSafe for ArraySlice<T>
impl<T> Freeze for ArraySlice<T>
impl<T> Unpin for ArraySlice<T>
impl<T> UnsafeUnpin for ArraySlice<T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
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<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more