pub struct Look { /* private fields */ }Expand description
The theme and the sidebar frame one request wears over its Brand’s, which the function
passed to Brand::look answers for every page the panel renders, sign-in included: a
visitor’s own pick, read from a cookie the app writes.
A look that names a theme but no frame keeps the brand’s sidebar, else
takes the theme’s own.
fn visitor_look(cx: &Cx) -> Look {
match cookies(cx)
.get("acme_theme")
.as_ref()
.map(|cookie| cookie.value())
{
Some("iris") => Look::default().theme(Theme::Iris),
_ => Look::default(),
}
}
Brand::new("Acme").look(visitor_look);Implementations§
Trait Implementations§
impl Copy for Look
impl Eq for Look
impl StructuralPartialEq for Look
Auto Trait Implementations§
impl Freeze for Look
impl RefUnwindSafe for Look
impl Send for Look
impl Sync for Look
impl Unpin for Look
impl UnsafeUnpin for Look
impl UnwindSafe for Look
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.