pub struct UeMap<K, V>where
K: ContainerElement,
V: ContainerElement,{ /* private fields */ }Expand description
A view into a UE TMap<K, V> property on a UObject.
Implementations§
Source§impl<K, V> UeMap<K, V>where
K: ContainerElement,
V: ContainerElement,
impl<K, V> UeMap<K, V>where
K: ContainerElement,
V: ContainerElement,
pub fn new(owner: UObjectHandle, prop: FPropertyHandle) -> UeMap<K, V>
Sourcepub fn len(&self) -> Result<usize, RustealError>
pub fn len(&self) -> Result<usize, RustealError>
Returns the number of key-value pairs in the map.
pub fn is_empty(&self) -> Result<bool, RustealError>
Sourcepub fn find(&self, key: &K) -> Result<V, RustealError>
pub fn find(&self, key: &K) -> Result<V, RustealError>
Look up a value by key. Returns Err(PropertyNotFound) if the key
is not in the map.
Sourcepub fn add(&self, key: &K, val: &V) -> Result<(), RustealError>
pub fn add(&self, key: &K, val: &V) -> Result<(), RustealError>
Insert or replace a key-value pair.
Sourcepub fn clear(&self) -> Result<(), RustealError>
pub fn clear(&self) -> Result<(), RustealError>
Remove all key-value pairs.
Source§impl<K, V> UeMap<K, V>where
K: ContainerElement,
V: ContainerElement,
impl<K, V> UeMap<K, V>where
K: ContainerElement,
V: ContainerElement,
Sourcepub fn bulk_iter(&self) -> Result<BulkMapIter<K, V>, RustealError>
pub fn bulk_iter(&self) -> Result<BulkMapIter<K, V>, RustealError>
Bulk-fetch all key-value pairs as a lazy iterator (single FFI call).
Source§impl<K, V> UeMap<K, V>
impl<K, V> UeMap<K, V>
Sourcepub fn to_hash_map(&self) -> Result<HashMap<K, V>, RustealError>
pub fn to_hash_map(&self) -> Result<HashMap<K, V>, RustealError>
Bulk-copy all key-value pairs to a HashMap in a single FFI call.
Trait Implementations§
impl<K, V> Copy for UeMap<K, V>
Source§impl<'a, K, V> IntoIterator for &'a UeMap<K, V>where
K: ContainerElement,
V: ContainerElement,
impl<'a, K, V> IntoIterator for &'a UeMap<K, V>where
K: ContainerElement,
V: ContainerElement,
Auto Trait Implementations§
impl<K, V> Freeze for UeMap<K, V>
impl<K, V> RefUnwindSafe for UeMap<K, V>
impl<K, V> Send for UeMap<K, V>
impl<K, V> Sync for UeMap<K, V>
impl<K, V> Unpin for UeMap<K, V>
impl<K, V> UnsafeUnpin for UeMap<K, V>
impl<K, V> UnwindSafe for UeMap<K, V>
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