[][src]Trait coord_2d::StaticAxis

pub trait StaticAxis: Sealed {
    type Other;
    fn axis() -> Axis;
fn new_coord(this_axis: i32, other_axis: i32) -> Coord;
fn coord_get(coord: Coord) -> i32;
fn coord_get_mut(coord: &mut Coord) -> &mut i32;
fn coord_with_axis<F: FnMut(i32) -> i32>(coord: Coord, f: F) -> Coord;
fn coord_set(coord: Coord, value: i32) -> Coord;
fn coord_set_in_place(coord: &mut Coord, value: i32);
fn try_new_size(
        this_axis: u32,
        other_axis: u32
    ) -> Result<Size, DimensionTooLargeForSize>;
fn size_get(size: Size) -> u32;
fn size_get_mut(size: &mut Size) -> &mut u32;
fn size_with_axis<F: FnMut(u32) -> u32>(size: Size, f: F) -> Size;
fn try_size_set(
        size: Size,
        value: u32
    ) -> Result<Size, DimensionTooLargeForSize>;
fn try_size_set_in_place(
        size: &mut Size,
        value: u32
    ) -> Result<(), DimensionTooLargeForSize>; fn size_set(size: Size, value: u32) -> Size { ... }
fn size_set_in_place(size: &mut Size, value: u32) { ... }
fn new_size(this_axis: u32, other_axis: u32) -> Size { ... } }

Associated Types

type Other

Loading content...

Required methods

fn axis() -> Axis

fn new_coord(this_axis: i32, other_axis: i32) -> Coord

fn coord_get(coord: Coord) -> i32

fn coord_get_mut(coord: &mut Coord) -> &mut i32

fn coord_with_axis<F: FnMut(i32) -> i32>(coord: Coord, f: F) -> Coord

fn coord_set(coord: Coord, value: i32) -> Coord

fn coord_set_in_place(coord: &mut Coord, value: i32)

fn try_new_size(
    this_axis: u32,
    other_axis: u32
) -> Result<Size, DimensionTooLargeForSize>

fn size_get(size: Size) -> u32

fn size_get_mut(size: &mut Size) -> &mut u32

fn size_with_axis<F: FnMut(u32) -> u32>(size: Size, f: F) -> Size

fn try_size_set(
    size: Size,
    value: u32
) -> Result<Size, DimensionTooLargeForSize>

fn try_size_set_in_place(
    size: &mut Size,
    value: u32
) -> Result<(), DimensionTooLargeForSize>

Loading content...

Provided methods

fn size_set(size: Size, value: u32) -> Size

fn size_set_in_place(size: &mut Size, value: u32)

fn new_size(this_axis: u32, other_axis: u32) -> Size

Loading content...

Implementors

impl StaticAxis for X[src]

type Other = Y

fn size_set(size: Size, value: u32) -> Size[src]

fn size_set_in_place(size: &mut Size, value: u32)[src]

fn new_size(this_axis: u32, other_axis: u32) -> Size[src]

impl StaticAxis for Y[src]

type Other = X

fn size_set(size: Size, value: u32) -> Size[src]

fn size_set_in_place(size: &mut Size, value: u32)[src]

fn new_size(this_axis: u32, other_axis: u32) -> Size[src]

Loading content...