DebugCList

Struct DebugCList 

Source
pub struct DebugCList {
    pub inner: RawCList,
}
Expand description

The DebugCList struct.

§Example

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

Fields§

§inner: RawCList

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 get(&mut self, index: usize) -> CString

Get the CList with the given index.

§Example
let mut list = DebugCList::new(10);
let data = list.get(0);
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>,

Source§

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>,

Source§

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.