pub trait FocusChainExtwhere
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
Extension trait for fidl_fuchsia_ui_focus::FocusChain
and
fidl_fuchsia_ui_focus::FocusKoidChain
.
Required Methods§
sourcefn duplicate(&self) -> Result<Self, Status>
fn duplicate(&self) -> Result<Self, Status>
Creates a new chain, in which all of the ViewRef
s (or koids) have been duplicated from the
original. Returns an error if duplicating any of the ViewRef
s fails.
sourcefn koids(&self) -> Box<dyn ExactSizeIterator<Item = Result<Koid, Status>> + '_>
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.
sourcefn to_focus_koid_chain(&self) -> Result<FocusKoidChain, Status>
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§
sourcefn equivalent<O: FocusChainExt>(&self, other: &O) -> Result<bool, Status>
fn equivalent<O: FocusChainExt>(&self, other: &O) -> Result<bool, Status>
Returns true if the two chains’ ViewRef
s correspond to the same koids, in the same
order. If any of the koids cannot be retrieved, returns an error.