#[repr(C)]pub struct ExtraDataList { /* private fields */ }
Implementations§
Source§impl ExtraDataList
impl ExtraDataList
Sourcepub fn has_type(&self, type_: ExtraDataType) -> bool
pub fn has_type(&self, type_: ExtraDataType) -> bool
- calc cost: O(n)
Sourcepub fn remove(
&mut self,
type_: ExtraDataType,
to_remove: *mut BSExtraData,
) -> bool
pub fn remove( &mut self, type_: ExtraDataType, to_remove: *mut BSExtraData, ) -> bool
The target to_remove
is removed from the LinkedList, but the memory itself is not removed in this function.
If to_remove
is not removed by the user, it will remain a memory leak.
Sourcepub fn remove_by_type(&mut self, type_: ExtraDataType) -> bool
pub fn remove_by_type(&mut self, type_: ExtraDataType) -> bool
The type to be removed is removed from the LinkedList and the memory itself is Drop::drop
.
Sourcepub fn add(&mut self, item: *mut BSExtraData) -> *mut BSExtraData
pub fn add(&mut self, item: *mut BSExtraData) -> *mut BSExtraData
Add item
to Self
’s list. & Return prev?
pub fn get_ash_pile_ref(&mut self) -> ObjectRefHandle
pub fn get_count(&self) -> i32
pub fn get_display_name<'a>( &mut self, base_object: &'a TESBoundObject, ) -> Option<&'a CStr>
pub fn get_encounter_zone(&self) -> Option<NonNull<BGSEncounterZone>>
pub fn get_extra_text_display_data( &self, ) -> Option<NonNull<ExtraTextDisplayData>>
Sourcepub fn get_by_type(&self, type_: ExtraDataType) -> Option<*mut BSExtraData>
pub fn get_by_type(&self, type_: ExtraDataType) -> Option<*mut BSExtraData>
Gets the pointer to the matched type of data from the linked list.
- calc cost: O(n)
Sourcepub fn get_by_type_as<T>(&self) -> Option<NonNull<T>>where
T: DerivedBSExtraData,
pub fn get_by_type_as<T>(&self) -> Option<NonNull<T>>where
T: DerivedBSExtraData,
Gets the pointer to the matched type of data from the linked list.
Then downcast to the specified one.
If the type T does not inherit from BSExtraData
, it will be UB.
- calc cost: O(n)
Trait Implementations§
Source§impl Clone for ExtraDataList
impl Clone for ExtraDataList
Source§fn clone(&self) -> ExtraDataList
fn clone(&self) -> ExtraDataList
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ExtraDataList
impl Debug for ExtraDataList
impl Zeroable for ExtraDataList
Auto Trait Implementations§
impl Freeze for ExtraDataList
impl RefUnwindSafe for ExtraDataList
impl !Send for ExtraDataList
impl !Sync for ExtraDataList
impl Unpin for ExtraDataList
impl UnwindSafe for ExtraDataList
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