pub struct ViewContext<C = ColModifyIdentity>where
C: ColModify,{
pub offset: Coord,
pub depth: i8,
pub col_modify: C,
pub size: Size,
}
Fields§
§offset: Coord
§depth: i8
§col_modify: C
§size: Size
Implementations§
Source§impl ViewContext
impl ViewContext
pub fn default_with_size(size: Size) -> ViewContext
Source§impl<C> ViewContext<C>where
C: ColModify,
impl<C> ViewContext<C>where
C: ColModify,
pub fn new( offset: Coord, depth: i8, col_modify: C, size: Size, ) -> ViewContext<C>
pub fn add_offset(self, offset_delta: Coord) -> ViewContext<C>
pub fn add_depth(self, depth_delta: i8) -> ViewContext<C>
pub fn constrain_size_to(self, size: Size) -> ViewContext<C>
pub fn constrain_size_by(self, size: Size) -> ViewContext<C>
pub fn compose_col_modify<Inner>(
self,
inner: Inner,
) -> ViewContext<ColModifyCompose<Inner, C>>where
Inner: ColModify,
Trait Implementations§
Source§impl<C> Clone for ViewContext<C>
impl<C> Clone for ViewContext<C>
Source§fn clone(&self) -> ViewContext<C>
fn clone(&self) -> ViewContext<C>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreimpl<C> Copy for ViewContext<C>
Auto Trait Implementations§
impl<C> Freeze for ViewContext<C>where
C: Freeze,
impl<C> RefUnwindSafe for ViewContext<C>where
C: RefUnwindSafe,
impl<C> Send for ViewContext<C>where
C: Send,
impl<C> Sync for ViewContext<C>where
C: Sync,
impl<C> Unpin for ViewContext<C>where
C: Unpin,
impl<C> UnwindSafe for ViewContext<C>where
C: 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