pub struct CustomizableView<W, H, C, N>where
W: ArrayLength,
H: ArrayLength,
C: Send + Clone + Sync + 'static,
N: NavigationEntry<W, H, C>,{ /* private fields */ }Expand description
A customizable view.
This struct represents a customizable view in the view system. It allows for programmatic creation of views with custom buttons.
Implementations§
Source§impl<W, H, C, N> CustomizableView<W, H, C, N>where
W: ArrayLength,
H: ArrayLength,
C: Send + Clone + Sync + 'static,
N: NavigationEntry<W, H, C>,
impl<W, H, C, N> CustomizableView<W, H, C, N>where
W: ArrayLength,
H: ArrayLength,
C: Send + Clone + Sync + 'static,
N: NavigationEntry<W, H, C>,
Set a button at the given coordinates.
This method sets a custom button at the given coordinates.
Set a navigation button at the given coordinates.
This method sets a navigation button at the given coordinates.
Remove a button at the given coordinates.
This method removes the button at the given coordinates.
Trait Implementations§
Source§impl<W, H, C, N> Default for CustomizableView<W, H, C, N>where
W: ArrayLength,
H: ArrayLength,
C: Send + Clone + Sync + 'static,
N: NavigationEntry<W, H, C>,
impl<W, H, C, N> Default for CustomizableView<W, H, C, N>where
W: ArrayLength,
H: ArrayLength,
C: Send + Clone + Sync + 'static,
N: NavigationEntry<W, H, C>,
Source§impl<W, H, C, N> View<W, H, C, N> for CustomizableView<W, H, C, N>where
W: ArrayLength,
H: ArrayLength,
C: Send + Clone + Sync + 'static,
N: NavigationEntry<W, H, C>,
impl<W, H, C, N> View<W, H, C, N> for CustomizableView<W, H, C, N>where
W: ArrayLength,
H: ArrayLength,
C: Send + Clone + Sync + 'static,
N: NavigationEntry<W, H, C>,
Source§fn render<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ButtonMatrix<W, H>, Box<dyn Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn render<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ButtonMatrix<W, H>, Box<dyn Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Render the view to a button matrix. Read more
Source§fn on_click<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 C,
index: u8,
navigation: Arc<Sender<N>>,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn on_click<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 C,
index: u8,
navigation: Arc<Sender<N>>,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Handle a button click. Read more
Auto Trait Implementations§
impl<W, H, C, N> Freeze for CustomizableView<W, H, C, N>where
<H as ArrayLength>::ArrayType<GenericArray<Option<CustomizableViewButton<W, H, C, N>>, W>>: Freeze,
impl<W, H, C, N> RefUnwindSafe for CustomizableView<W, H, C, N>where
<H as ArrayLength>::ArrayType<GenericArray<Option<CustomizableViewButton<W, H, C, N>>, W>>: RefUnwindSafe,
N: RefUnwindSafe,
impl<W, H, C, N> Send for CustomizableView<W, H, C, N>
impl<W, H, C, N> Sync for CustomizableView<W, H, C, N>
impl<W, H, C, N> Unpin for CustomizableView<W, H, C, N>where
<H as ArrayLength>::ArrayType<GenericArray<Option<CustomizableViewButton<W, H, C, N>>, W>>: Unpin,
N: Unpin,
impl<W, H, C, N> UnwindSafe for CustomizableView<W, H, C, N>where
<H as ArrayLength>::ArrayType<GenericArray<Option<CustomizableViewButton<W, H, C, N>>, W>>: UnwindSafe,
N: UnwindSafe,
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
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().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>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
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
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.