Skip to main content

scope_for

Function scope_for 

Source
pub fn scope_for<'a, I>(props: I) -> RepaintScope
where I: IntoIterator<Item = &'a str>,
Expand description

このフレームで変化したプロパティ名の集合から、必要な処理範囲を決める。

  • 空なら Nothing
  • 全て再ペイントで足りるなら PaintOnly
  • 1 つでもレイアウトに影響する/判定不能なものがあれば Relayout

判定不能なプロパティ名(空文字)があった場合はエラーログを出したうえで Relayout を返す(安全側)。エラーを握りつぶさず、かつ描画は壊さない。