pub enum StockShader {
SolidQuad,
RoundedRect,
Text,
DividerLine,
Image,
Spinner,
Skeleton,
ProgressIndeterminate,
}Expand description
Shipped shader inventory. See docs/SHADER_VISION.md for the shader model.
Variants§
SolidQuad
Flat colored rect. Fallback / debug.
RoundedRect
Fill + stroke + radius + shadow + focus ring. The workhorse —
handles ~80% of UI surfaces. Focus indicator is a uniform on
this shader, not a separate pipeline (see widget_kit.md).
Text
Alpha-mask glyph rendering. Backends sample per-glyph bitmaps
from a crate::text::atlas::GlyphAtlas page texture and tint
by per-glyph color. The historical TextSdf name was aspirational;
the actual rasterization is alpha-coverage via swash.
DividerLine
Antialiased 1px line.
Image
Per-image raster sampling. Backend binds a per-image texture at
group 1 and the fragment shader composes sampled * tint with
rounded-corner AA. See crate::image::Image for the data side.
Spinner
Indeterminate loading spinner — circular SDF arc swept around a
dim track, animated by frame.time. Continuous: any node bound
to this shader keeps needs_redraw set so the host idle loop
keeps ticking.
Skeleton
Pulsing loading placeholder — a rounded rect with a cosine
alpha breathe (0.5 → 1.0 → 0.5 over 2 s by default) matching
shadcn’s animate-pulse. Continuous.
ProgressIndeterminate
Indeterminate linear progress — a track with a small bar sliding left-to-right on loop, for in-line “still working…” feedback when no completion ratio is known. Continuous.
Implementations§
Source§impl StockShader
impl StockShader
Trait Implementations§
Source§impl Clone for StockShader
impl Clone for StockShader
Source§fn clone(&self) -> StockShader
fn clone(&self) -> StockShader
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for StockShader
impl Debug for StockShader
Source§impl Hash for StockShader
impl Hash for StockShader
Source§impl PartialEq for StockShader
impl PartialEq for StockShader
Source§fn eq(&self, other: &StockShader) -> bool
fn eq(&self, other: &StockShader) -> bool
self and other values to be equal, and is used by ==.impl Copy for StockShader
impl Eq for StockShader
impl StructuralPartialEq for StockShader
Auto Trait Implementations§
impl Freeze for StockShader
impl RefUnwindSafe for StockShader
impl Send for StockShader
impl Sync for StockShader
impl Unpin for StockShader
impl UnsafeUnpin for StockShader
impl UnwindSafe for StockShader
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.