fn singleton(mut self) -> Result<Self::Item, ComponentSingletonError>
    where
        Self: Sized,
    {
        let (item, _) = self.scan(None).ok_or(ComponentSingletonError::Missing)?;
        if self.scan(None).is_some() {
            Err(ComponentSingletonError::Multiple)
        } else {
            Ok(item)
        }
    }
/// If only a single entity should match, get the result out and error if there is not exactly
/// one entry available.
If only a single entity should match, get the result out and error if there is not exactly
one entry available.
If only a single entity should match get the result out and error if there is not exactly one entry available .
fn singleton(mut self) -> Result<Self::Item, ComponentSingletonError>
    where
        Self: Sized,
    {
        let (item, _) = self.scan(None).ok_or(ComponentSingletonError::Missing)?;
        if self.scan(None).is_some() {
            Err(ComponentSingletonError::Multiple)
        } else {
            Ok(item)
        }
    }
fn singleton ( mut self ) -> Result < Self :: Item , ComponentSingletonError > where Self : Sized , { let ( item , _ ) = self . scan ( None ) . ok_or ( ComponentSingletonError :: Missing ) ? ; if self . scan ( None ) . is_some ( ) { Err ( ComponentSingletonError :: Multiple ) } else { Ok ( item ) } }
If only a single entity should match, get the result out and error if there is not exactly
one entry available.
If only a single entity should match get the result out and error if there is not exactly one entry available .
mut self
mut self