[][src]Trait prisma::channel::traits::ChannelCast

pub trait ChannelCast: ColorChannel {
    fn channel_cast<To>(self) -> To
    where
        Self::Format: ChannelFormatCast<To::Format>,
        To: ColorChannel<Tag = Self::Tag>
;
fn scalar_cast<To>(self) -> To
    where
        Self::Format: ChannelFormatCast<To>
; }

A channel able to have its format changed

This trait delegates to ChannelFormatCast to do most of its work.

Required methods

fn channel_cast<To>(self) -> To where
    Self::Format: ChannelFormatCast<To::Format>,
    To: ColorChannel<Tag = Self::Tag>, 

Convert from one format to another

fn scalar_cast<To>(self) -> To where
    Self::Format: ChannelFormatCast<To>, 

Convert to a new scalar type

Loading content...

Implementors

impl<T> ChannelCast for AngularChannel<T> where
    T: Angle + Default + Sub<T, Output = T> + Add<T, Output = T>, 
[src]

impl<T> ChannelCast for NormalBoundedChannel<T> where
    T: NormalChannelScalar
[src]

impl<T> ChannelCast for PosNormalBoundedChannel<T> where
    T: PosNormalChannelScalar
[src]

impl<T> ChannelCast for FreeChannel<T> where
    T: FreeChannelScalar
[src]

impl<T> ChannelCast for PosFreeChannel<T> where
    T: FreeChannelScalar
[src]

Loading content...