const STUB_MSG: &str = "arcis::std::slice is documentation-only; \
inside `#[encrypted]` code the interpreter intercepts the real method before this stub runs.";
pub trait SupportedSlice<T> {
fn len(&self) -> usize {
unimplemented!("{STUB_MSG}")
}
fn is_empty(&self) -> bool {
unimplemented!("{STUB_MSG}")
}
fn swap(&mut self, a: usize, b: usize) {
unimplemented!("{STUB_MSG}")
}
fn fill(&mut self, value: T)
where
T: Clone,
{
unimplemented!("{STUB_MSG}")
}
fn reverse(&mut self) {
unimplemented!("{STUB_MSG}")
}
fn iter(&self) -> ::std::slice::Iter<'_, T> {
unimplemented!("{STUB_MSG}")
}
fn iter_mut(&mut self) -> ::std::slice::IterMut<'_, T> {
unimplemented!("{STUB_MSG}")
}
fn windows(&self, size: usize) -> ::std::slice::Windows<'_, T> {
unimplemented!("{STUB_MSG}")
}
fn copy_from_slice(&mut self, src: &[T])
where
T: Copy,
{
unimplemented!("{STUB_MSG}")
}
fn clone_from_slice(&mut self, src: &[T])
where
T: Clone,
{
unimplemented!("{STUB_MSG}")
}
fn split_at(&self, mid: usize) -> (&[T], &[T]) {
unimplemented!("{STUB_MSG}")
}
fn split_at_mut(&mut self, mid: usize) -> (&mut [T], &mut [T]) {
unimplemented!("{STUB_MSG}")
}
fn rotate_left(&mut self, mid: usize) {
unimplemented!("{STUB_MSG}")
}
fn rotate_right(&mut self, k: usize) {
unimplemented!("{STUB_MSG}")
}
fn contains(&self, x: &T) -> bool
where
T: PartialEq,
{
unimplemented!("{STUB_MSG}")
}
fn starts_with(&self, needle: &[T]) -> bool
where
T: PartialEq,
{
unimplemented!("{STUB_MSG}")
}
fn ends_with(&self, needle: &[T]) -> bool
where
T: PartialEq,
{
unimplemented!("{STUB_MSG}")
}
fn as_slice(&self) -> &[T] {
unimplemented!("{STUB_MSG}")
}
fn as_mut_slice(&mut self) -> &mut [T] {
unimplemented!("{STUB_MSG}")
}
fn first(&self) -> Option<&T> {
unimplemented!("{STUB_MSG}")
}
fn first_mut(&mut self) -> Option<&mut T> {
unimplemented!("{STUB_MSG}")
}
fn last(&self) -> Option<&T> {
unimplemented!("{STUB_MSG}")
}
fn last_mut(&mut self) -> Option<&mut T> {
unimplemented!("{STUB_MSG}")
}
fn get(&self, index: usize) -> Option<&T> {
unimplemented!("{STUB_MSG}")
}
fn get_mut(&mut self, index: usize) -> Option<&mut T> {
unimplemented!("{STUB_MSG}")
}
fn split_first(&self) -> Option<(&T, &[T])> {
unimplemented!("{STUB_MSG}")
}
fn split_first_mut(&mut self) -> Option<(&mut T, &mut [T])> {
unimplemented!("{STUB_MSG}")
}
fn split_last(&self) -> Option<(&T, &[T])> {
unimplemented!("{STUB_MSG}")
}
fn split_last_mut(&mut self) -> Option<(&mut T, &mut [T])> {
unimplemented!("{STUB_MSG}")
}
fn first_chunk<const N: usize>(&self) -> Option<&[T; N]> {
unimplemented!("{STUB_MSG}")
}
fn first_chunk_mut<const N: usize>(&mut self) -> Option<&mut [T; N]> {
unimplemented!("{STUB_MSG}")
}
fn last_chunk<const N: usize>(&self) -> Option<&[T; N]> {
unimplemented!("{STUB_MSG}")
}
fn last_chunk_mut<const N: usize>(&mut self) -> Option<&mut [T; N]> {
unimplemented!("{STUB_MSG}")
}
fn split_first_chunk<const N: usize>(&self) -> Option<(&[T; N], &[T])> {
unimplemented!("{STUB_MSG}")
}
fn split_first_chunk_mut<const N: usize>(&mut self) -> Option<(&mut [T; N], &mut [T])> {
unimplemented!("{STUB_MSG}")
}
fn split_last_chunk<const N: usize>(&self) -> Option<(&[T], &[T; N])> {
unimplemented!("{STUB_MSG}")
}
fn split_last_chunk_mut<const N: usize>(&mut self) -> Option<(&mut [T], &mut [T; N])> {
unimplemented!("{STUB_MSG}")
}
fn as_array<const N: usize>(&self) -> Option<&[T; N]> {
unimplemented!("{STUB_MSG}")
}
fn as_mut_array<const N: usize>(&mut self) -> Option<&mut [T; N]> {
unimplemented!("{STUB_MSG}")
}
fn sort(&mut self)
where
T: Ord,
{
unimplemented!("{STUB_MSG}")
}
}
impl<T> SupportedSlice<T> for [T] {}
pub trait SupportedArray<T, const N: usize> {
fn map<U, F>(self, f: F) -> [U; N]
where
Self: Sized,
F: FnMut(T) -> U,
{
unimplemented!("{STUB_MSG}")
}
fn each_ref(&self) -> [&T; N] {
unimplemented!("{STUB_MSG}")
}
fn each_mut(&mut self) -> [&mut T; N] {
unimplemented!("{STUB_MSG}")
}
}
impl<T, const N: usize> SupportedArray<T, N> for [T; N] {}