pub trait FocusChainExt
where Self: Sized,
{ // Required methods fn len(&self) -> usize; fn duplicate(&self) -> Result<Self, Status>; fn koids( &self ) -> Box<dyn ExactSizeIterator<Item = Result<Koid, Status>> + '_>; fn to_focus_koid_chain(&self) -> Result<FocusKoidChain, Status>; // Provided methods fn is_empty(&self) -> bool { ... } fn equivalent<O: FocusChainExt>(&self, other: &O) -> Result<bool, Status> { ... } }
Expand description

Required Methods§

source

fn len(&self) -> usize

Returns the number of views in the chain.

source

fn duplicate(&self) -> Result<Self, Status>

Creates a new chain, in which all of the ViewRefs (or koids) have been duplicated from the original. Returns an error if duplicating any of the ViewRefs fails.

source

fn koids(&self) -> Box<dyn ExactSizeIterator<Item = Result<Koid, Status>> + '_>

Returns a fallible iterator over the chain’s koids. If any koid cannot be retrieved, the iterator yields an error in its place.

source

fn to_focus_koid_chain(&self) -> Result<FocusKoidChain, Status>

Converts this chain into a FocusKoidChain, which contains just koids instead of [ViewRef]s.

Provided Methods§

source

fn is_empty(&self) -> bool

Returns true if there are no views in the chain.

source

fn equivalent<O: FocusChainExt>(&self, other: &O) -> Result<bool, Status>

Returns true if the two chains’ ViewRefs correspond to the same koids, in the same order. If any of the koids cannot be retrieved, returns an error.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl FocusChainExt for FocusChain

source§

fn len(&self) -> usize

source§

fn duplicate(&self) -> Result<Self, Status>

source§

fn koids(&self) -> Box<dyn ExactSizeIterator<Item = Result<Koid, Status>> + '_>

source§

fn to_focus_koid_chain(&self) -> Result<FocusKoidChain, Status>

source§

impl FocusChainExt for FocusKoidChain

source§

fn duplicate(&self) -> Result<Self, Status>

Clones this FocusKoidChain.

source§

fn to_focus_koid_chain(&self) -> Result<FocusKoidChain, Status>

Clones this FocusKoidChain.

source§

fn len(&self) -> usize

source§

fn koids(&self) -> Box<dyn ExactSizeIterator<Item = Result<Koid, Status>> + '_>

Implementors§