pub struct SoftObjectRef<T>where
T: UeClass,{ /* private fields */ }Expand description
A soft reference to an object of class T: its path
(/Game/Meshes/SM_Rifle.SM_Rifle), loaded on demand. A #[uproperty] or
#[ustruct] field of this type is a TSoftObjectPtr<T>.
Implementations§
Source§impl<T> SoftObjectRef<T>where
T: UeClass,
impl<T> SoftObjectRef<T>where
T: UeClass,
Sourcepub fn new(path: impl Into<String>) -> SoftObjectRef<T>
pub fn new(path: impl Into<String>) -> SoftObjectRef<T>
A reference to the object at path; empty for none.
Sourcepub fn null() -> SoftObjectRef<T>
pub fn null() -> SoftObjectRef<T>
No reference.
Sourcepub fn get(&self) -> UObjectRef<T>
pub fn get(&self) -> UObjectRef<T>
The object if it is loaded, without loading it (TSoftObjectPtr::Get).
Sourcepub fn load_synchronous(&self) -> Result<UObjectRef<T>, RustealError>
pub fn load_synchronous(&self) -> Result<UObjectRef<T>, RustealError>
The object, loaded if it is not (TSoftObjectPtr::LoadSynchronous); a
null reference for none.
Trait Implementations§
Source§impl<T> Clone for SoftObjectRef<T>where
T: UeClass,
impl<T> Clone for SoftObjectRef<T>where
T: UeClass,
Source§fn clone(&self) -> SoftObjectRef<T>
fn clone(&self) -> SoftObjectRef<T>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T> Debug for SoftObjectRef<T>where
T: UeClass,
impl<T> Debug for SoftObjectRef<T>where
T: UeClass,
Source§impl<T> Default for SoftObjectRef<T>where
T: UeClass,
impl<T> Default for SoftObjectRef<T>where
T: UeClass,
Source§fn default() -> SoftObjectRef<T>
fn default() -> SoftObjectRef<T>
Returns the “default value” for a type. Read more
impl<T> Eq for SoftObjectRef<T>where
T: UeClass,
Auto Trait Implementations§
impl<T> Freeze for SoftObjectRef<T>where
PhantomData<T>: Freeze,
impl<T> RefUnwindSafe for SoftObjectRef<T>where
PhantomData<T>: RefUnwindSafe,
impl<T> Send for SoftObjectRef<T>where
PhantomData<T>: Send,
impl<T> Sync for SoftObjectRef<T>where
PhantomData<T>: Sync,
impl<T> Unpin for SoftObjectRef<T>where
PhantomData<T>: Unpin,
impl<T> UnsafeUnpin for SoftObjectRef<T>where
PhantomData<T>: UnsafeUnpin,
impl<T> UnwindSafe for SoftObjectRef<T>where
PhantomData<T>: UnwindSafe,
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