Struct net_ensembles::sampling::PaletteRGB
source · [−]pub struct PaletteRGB { /* private fields */ }
Expand description
Implementations
sourceimpl PaletteRGB
impl PaletteRGB
sourcepub fn new(colors: Vec<ColorRGB, Global>) -> Option<PaletteRGB>
pub fn new(colors: Vec<ColorRGB, Global>) -> Option<PaletteRGB>
Initialize Palette
Note: Palette needs at least two colors,
therefore None
will be returned if the
colors
has a length less than 2
sourcepub fn into_gnuplot_palette(self) -> GnuplotPalette
pub fn into_gnuplot_palette(self) -> GnuplotPalette
Converts self
into the corresponding enum of GnuplotPallet
Trait Implementations
sourceimpl Clone for PaletteRGB
impl Clone for PaletteRGB
sourcefn clone(&self) -> PaletteRGB
fn clone(&self) -> PaletteRGB
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for PaletteRGB
impl Debug for PaletteRGB
sourceimpl<'de> Deserialize<'de> for PaletteRGB
impl<'de> Deserialize<'de> for PaletteRGB
sourcefn deserialize<__D>(
__deserializer: __D
) -> Result<PaletteRGB, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<PaletteRGB, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl From<PaletteRGB> for GnuplotPalette
impl From<PaletteRGB> for GnuplotPalette
sourcefn from(palette: PaletteRGB) -> GnuplotPalette
fn from(palette: PaletteRGB) -> GnuplotPalette
Converts to this type from the input type.
sourceimpl Serialize for PaletteRGB
impl Serialize for PaletteRGB
sourcefn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for PaletteRGB
impl Send for PaletteRGB
impl Sync for PaletteRGB
impl Unpin for PaletteRGB
impl UnwindSafe for PaletteRGB
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<S, T> CastFloat<T> for Swhere
T: ConvFloat<S>,
impl<S, T> CastFloat<T> for Swhere
T: ConvFloat<S>,
fn cast_trunc(self) -> T
fn cast_trunc(self) -> T
Cast to integer, truncating Read more
fn cast_nearest(self) -> T
fn cast_nearest(self) -> T
Cast to the nearest integer Read more
fn cast_floor(self) -> T
fn cast_floor(self) -> T
Cast the floor to an integer Read more
fn try_cast_trunc(self) -> Result<T, Error>
fn try_cast_trunc(self) -> Result<T, Error>
Try converting to integer with truncation Read more
fn try_cast_nearest(self) -> Result<T, Error>
fn try_cast_nearest(self) -> Result<T, Error>
Try converting to the nearest integer Read more
fn try_cast_floor(self) -> Result<T, Error>
fn try_cast_floor(self) -> Result<T, Error>
Try converting the floor to an integer Read more
fn try_cast_ceil(self) -> Result<T, Error>
fn try_cast_ceil(self) -> Result<T, Error>
Try convert the ceiling to an integer Read more