Struct hapi_rs::attribute::NumericAttr
source · pub struct NumericAttr<T: AttribAccess>(/* private fields */);
Implementations§
source§impl<T: AttribAccess> NumericAttr<T>
impl<T: AttribAccess> NumericAttr<T>
sourcepub fn get(&self, part_id: i32) -> Result<Vec<T>>
pub fn get(&self, part_id: i32) -> Result<Vec<T>>
Get attribute value. Allocates a new vector on every call
sourcepub fn read_into(&self, part_id: i32, buffer: &mut Vec<T>) -> Result<()>
pub fn read_into(&self, part_id: i32, buffer: &mut Vec<T>) -> Result<()>
Read the attribute data into a provided buffer. The buffer will be auto-resized from the attribute info.
pub fn set(&self, part_id: i32, values: &[T]) -> Result<()>
Auto Trait Implementations§
impl<T> !RefUnwindSafe for NumericAttr<T>
impl<T> Send for NumericAttr<T>where
T: Send,
impl<T> Sync for NumericAttr<T>where
T: Sync,
impl<T> Unpin for NumericAttr<T>where
T: Unpin,
impl<T> !UnwindSafe for NumericAttr<T>
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