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§
Provided Methods§
fn resize(&mut self, size: Vector<T, N>) -> &mut Self
fn set_size_x(&mut self, x: T) -> &mut Self
fn set_size_y(&mut self, y: T) -> &mut Self
fn set_size_z(&mut self, z: T) -> &mut Self
fn set_size_w(&mut self, w: T) -> &mut Self
fn with_size(self, size: Vector<T, N>) -> Selfwhere
Self: Sized,
fn with_size_x(self, x: T) -> Self
fn with_size_y(self, y: T) -> Self
fn with_size_z(self, z: T) -> Self
fn with_size_w(self, w: T) -> Self
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.