pub struct ForgedObject {
pub name: String,
pub id: Uuid,
pub forged_traits: Vec<Box<RefCell<dyn ForgedTrait>>>,
pub transform: Rc<RefCell<TransformSpecialTrait>>,
}Fields§
§name: String§id: Uuid§forged_traits: Vec<Box<RefCell<dyn ForgedTrait>>>§transform: Rc<RefCell<TransformSpecialTrait>>Implementations§
Source§impl ForgedObject
impl ForgedObject
pub fn new(name: String) -> ForgedObject
pub fn add_trait( &mut self, new_trait: Box<RefCell<dyn ForgedTrait>>, ) -> Result<(), LostLostLandsFaultForgedObject>
pub fn add_traits<T: TraitBundle>(&mut self, traits: T)
pub fn start(&self, lost_realm: &mut LostRealm)
pub fn update(&self, lost_realm: &mut LostRealm, dt: f32)
pub fn get_trait<T: 'static + ForgedTrait>( &self, ) -> Result<&T, LostLostLandsFaultForgedObject>
pub fn get_trait_mut<T: 'static + ForgedTrait>( &self, ) -> Result<&mut T, LostLostLandsFaultForgedObject>
pub fn remove_trait<T: 'static + ForgedTrait>( &mut self, ) -> Result<(), LostLostLandsFaultForgedObject>
pub fn set_transform_child(&self, child: Rc<RefCell<TransformSpecialTrait>>)
pub fn set_transform_parent(&self, parent: Rc<RefCell<TransformSpecialTrait>>)
pub fn set_transform_children( &self, children: Vec<Rc<RefCell<TransformSpecialTrait>>>, )
Auto Trait Implementations§
impl Freeze for ForgedObject
impl !RefUnwindSafe for ForgedObject
impl !Send for ForgedObject
impl !Sync for ForgedObject
impl Unpin for ForgedObject
impl !UnwindSafe for ForgedObject
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
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.