pub struct SliceObj<T> { /* private fields */ }
Implementations§
Source§impl<T> SliceObj<T>where
T: Element,
impl<T> SliceObj<T>where
T: Element,
pub fn with_array( arr: GosValue, begin: isize, end: isize, ) -> Result<SliceObj<T>, RuntimeError>
pub fn array_obj(&self) -> &ArrayObj<T>
pub fn begin(&self) -> usize
pub fn end(&self) -> usize
pub fn len(&self) -> usize
pub fn cap(&self) -> usize
pub fn range(&self) -> Range<usize>
pub fn as_rust_slice(&self) -> Ref<'_, [T]>
pub fn as_rust_slice_mut(&self) -> RefMut<'_, [T]>
pub fn sharing_with(&self, other: &SliceObj<T>) -> bool
Sourcepub fn get_array_equivalent(&self, i: usize) -> (&GosValue, usize)
pub fn get_array_equivalent(&self, i: usize) -> (&GosValue, usize)
get_array_equivalent returns the underlying array and mapped index
pub fn index_elem(&self, i: usize) -> T
pub fn get(&self, i: usize, t: ValueType) -> Result<GosValue, RuntimeError>
pub fn set(&self, i: usize, val: &GosValue) -> Result<(), RuntimeError>
pub fn push(&mut self, val: GosValue)
pub fn append(&mut self, other: &SliceObj<T>)
pub fn copy_from(&self, other: &SliceObj<T>) -> usize
pub fn slice( &self, begin: isize, end: isize, max: isize, ) -> Result<SliceObj<T>, RuntimeError>
pub fn swap(&self, i: usize, j: usize) -> Result<(), RuntimeError>
Source§impl<T> SliceObj<CellElem<T>>where
T: CellData,
impl<T> SliceObj<CellElem<T>>where
T: CellData,
pub fn as_raw_slice<U>(&self) -> Ref<'_, [U]>
pub fn as_raw_slice_mut<U>(&self) -> RefMut<'_, [U]>
Source§impl SliceObj<CellElem<u8>>
impl SliceObj<CellElem<u8>>
Trait Implementations§
impl<T> Eq for SliceObj<T>
Auto Trait Implementations§
impl<T> !Freeze for SliceObj<T>
impl<T> !RefUnwindSafe for SliceObj<T>
impl<T> !Send for SliceObj<T>
impl<T> !Sync for SliceObj<T>
impl<T> Unpin for SliceObj<T>where
T: Unpin,
impl<T> !UnwindSafe for SliceObj<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