pub fn try_get_parent(&self) -> Result<Option<Arc<Realm>>, ModelError> {
        self.parent
            .as_ref()
            .map(|p| {
                p.upgrade()
                    .ok_or(ModelError::instance_not_found(self.abs_moniker.parent().unwrap()))
            })
            .transpose()
    }
/// Gets the parent, if it still exists, or returns an `InstanceNotFound` error. Returns `None`
/// for the root component.
Gets the parent, if it still exists, or returns an `InstanceNotFound` error. Returns `None`
for the root component.
Gets the parent if it still exists or returns an ` InstanceNotFound ` error . Returns ` None ` for the root component .
pub fn try_get_parent(&self) -> Result<Option<Arc<Realm>>, ModelError> {
        self.parent
            .as_ref()
            .map(|p| {
                p.upgrade()
                    .ok_or(ModelError::instance_not_found(self.abs_moniker.parent().unwrap()))
            })
            .transpose()
    }
pub fn try_get_parent ( & self ) -> Result < Option < Arc < Realm > > , ModelError > { self . parent . as_ref ( ) . map ( | p | { p . upgrade ( ) . ok_or ( ModelError :: instance_not_found ( self . abs_moniker . parent ( ) . unwrap ( ) ) ) } ) . transpose ( ) }
Gets the parent, if it still exists, or returns an `InstanceNotFound` error.
Gets the parent if it still exists or returns an ` InstanceNotFound ` error .
&self
&self