Skip to main content

SetSize

Trait SetSize 

Source
pub trait SetSize<T, const N: usize>: GetSize<T, N>
where T: Number,
{ // Required method fn set_size(&mut self, size: Vector<T, N>) -> &mut Self; // Provided methods fn resize(&mut self, size: Vector<T, N>) -> &mut Self { ... } fn set_size_x(&mut self, x: T) -> &mut Self where Vector<T, N>: HaveX<T> { ... } fn set_size_y(&mut self, y: T) -> &mut Self where Vector<T, N>: HaveY<T> { ... } fn set_size_z(&mut self, z: T) -> &mut Self where Vector<T, N>: HaveZ<T> { ... } fn set_size_w(&mut self, w: T) -> &mut Self where Vector<T, N>: HaveW<T> { ... } fn with_size(self, size: Vector<T, N>) -> Self where Self: Sized { ... } fn with_size_x(self, x: T) -> Self where Vector<T, N>: HaveX<T>, Self: Sized { ... } fn with_size_y(self, y: T) -> Self where Vector<T, N>: HaveY<T>, Self: Sized { ... } fn with_size_z(self, z: T) -> Self where Vector<T, N>: HaveZ<T>, Self: Sized { ... } fn with_size_w(self, w: T) -> Self where Vector<T, N>: HaveW<T>, Self: Sized { ... } }

Required Methods§

Source

fn set_size(&mut self, size: Vector<T, N>) -> &mut Self

Provided Methods§

Source

fn resize(&mut self, size: Vector<T, N>) -> &mut Self

Source

fn set_size_x(&mut self, x: T) -> &mut Self
where Vector<T, N>: HaveX<T>,

Source

fn set_size_y(&mut self, y: T) -> &mut Self
where Vector<T, N>: HaveY<T>,

Source

fn set_size_z(&mut self, z: T) -> &mut Self
where Vector<T, N>: HaveZ<T>,

Source

fn set_size_w(&mut self, w: T) -> &mut Self
where Vector<T, N>: HaveW<T>,

Source

fn with_size(self, size: Vector<T, N>) -> Self
where Self: Sized,

Source

fn with_size_x(self, x: T) -> Self
where Vector<T, N>: HaveX<T>, Self: Sized,

Source

fn with_size_y(self, y: T) -> Self
where Vector<T, N>: HaveY<T>, Self: Sized,

Source

fn with_size_z(self, z: T) -> Self
where Vector<T, N>: HaveZ<T>, Self: Sized,

Source

fn with_size_w(self, w: T) -> Self
where Vector<T, N>: HaveW<T>, Self: Sized,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl SetSize<i32, 2> for AppWindow

Source§

impl SetSize<i32, 2> for Window

Source§

impl<'a> SetSize<i32, 2> for GpuConfiguredSurface<'a>

Source§

impl<T, const N: usize> SetSize<T, N> for RectangleOf<Vector<T, N>>
where T: Number,