Type Alias CapeArrayBooleanIn

Source
pub type CapeArrayBooleanIn<'a> = CapeArrayIn<'a, CapeBoolean, ICapeArrayBoolean>;
Expand description

CapeArrayBooleanIn wraps an ICapeArrayBoolean interface pointer.

Given an ICapeArrayBoolean interface pointer, this allows setting and getting the elements.

This interface is typically used as arguments to rust methods on traits that are generated from CAPE-OPEN interfaces that have ICapeArrayBoolean input arguments.

§Examples

use cobia::*;

fn test_content(a: &CapeArrayBooleanIn) {
    assert_eq!(a.as_bool_vec(), vec![false,true,true,false]);
}
 
let arr = cobia::CapeArrayBooleanVec::from_bool_slice(&[false,true,true,false]);
test_content(&CapeArrayBooleanInFromProvider::from(&arr).as_cape_array_boolean_in())

Aliased Type§

pub struct CapeArrayBooleanIn<'a> {
    data: *const u32,
    size: u32,
    pub(crate) interface: &'a *mut ICapeArrayBoolean,
    _lifetime: PhantomData<&'a ()>,
    _interface_type: PhantomData<ICapeArrayBoolean>,
}

Fields§

§data: *const u32§size: u32§interface: &'a *mut ICapeArrayBoolean§_lifetime: PhantomData<&'a ()>§_interface_type: PhantomData<ICapeArrayBoolean>

Implementations§

Source§

impl<'a> CapeArrayBooleanIn<'a>

Source

pub fn as_bool_vec(&self) -> Vec<bool>

Returns the elements of the array as a Vec<bool>.

§Examples
use cobia::*;

fn test_content(a: &CapeArrayBooleanIn) {
    assert_eq!(a.as_bool_vec(), vec![false,true,true,false]);
}
 
let arr = cobia::CapeArrayBooleanVec::from_bool_slice(&[false,true,true,false]);
test_content(&CapeArrayBooleanInFromProvider::from(&arr).as_cape_array_boolean_in())

Trait Implementations§