pub type CapeArrayIntegerOut<'a> = CapeArrayOut<'a, CapeInteger, ICapeArrayInteger>;Expand description
CapeArrayIntegerOut wraps an ICapeArrayInteger interface pointer.
Given an ICapeArrayInteger 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 ICapeArrayInteger output arguments.
§Examples
use cobia::*;
fn set_content(a: &mut CapeArrayIntegerOut) {
a.put_array(&[2,8,10]).unwrap();
}
let mut arr = cobia::CapeArrayIntegerVec::new();
set_content(&mut CapeArrayIntegerOutFromProvider::from(&mut arr).as_cape_array_integer_out());
assert_eq!(arr.as_vec(), &vec![2,8,10]);Aliased Type§
pub struct CapeArrayIntegerOut<'a> {
pub(crate) interface: &'a mut *mut ICapeArrayInteger,
data: *mut i32,
size: u32,
}Fields§
§interface: &'a mut *mut ICapeArrayInteger§data: *mut i32§size: u32Implementations§
Source§impl<'a> CapeArrayIntegerOut<'a>
impl<'a> CapeArrayIntegerOut<'a>
Sourcepub fn set<T: CapeArrayIntegerProviderIn>(
&mut self,
array: &T,
) -> Result<(), COBIAError>
pub fn set<T: CapeArrayIntegerProviderIn>( &mut self, array: &T, ) -> Result<(), COBIAError>
Set the content of the integer array from any object that implements CapeArrayIntegerProviderIn.
§Arguments
array- An object that implements CapeArrayIntegerProviderIn
§Examples
use cobia::*;
let mut arr = cobia::CapeArrayIntegerVec::new();
let mut arr1 = cobia::CapeArrayIntegerVec::from_slice(&vec![17,14,9,0]);
CapeArrayIntegerOutFromProvider::from(&mut arr).as_cape_array_integer_out().set(&arr1);
assert_eq!(arr.as_vec(), &[17,14,9,0]);Trait Implementations§
Source§impl<'a> CapeArrayIntegerProviderOut for CapeArrayIntegerOut<'a>
impl<'a> CapeArrayIntegerProviderOut for CapeArrayIntegerOut<'a>
Source§fn as_cape_array_integer_out(&mut self) -> ICapeArrayInteger
fn as_cape_array_integer_out(&mut self) -> ICapeArrayInteger
Convert to ICapeArrayInteger