Struct anyscript_compiler::types::list::List
source · pub struct List<T: Default + Display + Clone + Send + Sync> {
pub items: Vec<T>,
pub size: usize,
}Expand description
Class to Handle a List
Fields§
§items: Vec<T>§size: usizeImplementations§
source§impl<T: Default + Display + Clone + Send + Sync> List<T>
impl<T: Default + Display + Clone + Send + Sync> List<T>
pub fn new() -> Self
pub fn append(&mut self, item: T)
pub fn to_string2(&self) -> String
pub fn to_cstring(&self) -> CString
pub fn extend(&mut self, items: List<T>)
pub fn to_list(&self) -> Vec<T>where
T: Copy,
pub fn replace(&mut self, index: usize, item: T)
pub fn remove(&mut self, index: usize)
pub fn get(&self, index: usize) -> Twhere
T: Copy,
pub fn get_size(&self) -> usize
pub fn get_type(&self) -> String
pub fn destroy(&mut self)
pub fn from(liste: Vec<T>) -> Self
pub fn from_string(string: String) -> Self
pub fn from_cstring(cstring: CString) -> Self
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for List<T>
impl<T> RefUnwindSafe for List<T>where
T: RefUnwindSafe,
impl<T> Send for List<T>
impl<T> Sync for List<T>
impl<T> Unpin for List<T>where
T: Unpin,
impl<T> UnwindSafe for List<T>where
T: UnwindSafe,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more