Struct dexalt_lib::clist::raw::DebugCList

source ·
pub struct DebugCList { /* private fields */ }
Expand description

The DebugCList struct.

§Example

let mut list = DebugCList::new(10);

Implementations§

source§

impl DebugCList

source

pub fn new(size: usize) -> Self

Create a new CList with the given size.

§Example
let mut list = DebugCList::new(10);
source

pub fn clear(&mut self)

Clear the CList.

§Example
let mut list = DebugCList::new(10);
list.clear();
source

pub fn append(&mut self, data: CString)

Append the CList with the given data.

§Example
let mut list = DebugCList::new(10);
list.append(ffi::CString::new("Hello").unwrap());
source

pub fn extend(&mut self, list: &mut RawCList)

Extend the CList with the given data.

§Example
let mut list = DebugCList::new(10);
list.extend(&mut list);
source

pub fn push(&mut self, data: Data)

Push the CList with the given data.

§Example
let mut list = DebugCList::new(10);
list.push(Data::Int(10));
source

pub fn remove(&mut self, data: CString)

Remove the CList with the given data.

§Example
let mut list = DebugCList::new(10);
list.remove(ffi::CString::new("Hello").unwrap());
source

pub fn pop(&mut self, index: usize)

Pop the CList with the given index.

§Example
let mut list = DebugCList::new(10);
list.pop(0);
source

pub fn to_array(&mut self, array: &mut Vec<CString>)

Convert the CList to an array.

§Example
let mut list = DebugCList::new(10);
let mut array = Vec::new();
list.to_array(&mut array);
source

pub fn to_array_new(&mut self) -> Vec<CString>

Convert the CList to an array.

§Example
let mut list = DebugCList::new(10);
let array = list.to_array_new();
source

pub fn size(&mut self) -> usize

Get the size of the CList.

§Example
let mut list = DebugCList::new(10);
let size = list.size();
source

pub fn len(&mut self) -> usize

Get the length of the CList.

§Example
let mut list = DebugCList::new(10);
let len = list.len();
source

pub fn lock(&mut self)

Lock the CList.

§Example
let mut list = DebugCList::new(10);
list.lock();
source

pub fn unlock(&mut self)

Unlock the CList.

§Example
let mut list = DebugCList::new(10);
list.unlock();
source

pub fn is_locked(&mut self) -> bool

Check if the CList is locked.

§Example
let mut list = DebugCList::new(10);
let is_locked = list.is_locked();

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.