pub struct ShapeBorderRef(/* private fields */);Expand description
A ShapeBorder held by value: what a Dart field or parameter typed ShapeBorder
becomes.
Clones share one border, as Dart’s references do, so a border handed on keeps its identity:
a widget given the same border again sees an unchanged one. Two refs are equal when they
share a border or when eq_shape says so, Dart’s ==.
Implementations§
Source§impl ShapeBorderRef
impl ShapeBorderRef
Sourcepub fn new(border: impl ShapeBorder) -> ShapeBorderRef
pub fn new(border: impl ShapeBorder) -> ShapeBorderRef
Erases a ShapeBorder.
Shares an already shared border.
Sourcepub fn as_box_border_ref(&self) -> Option<BoxBorderRef>
pub fn as_box_border_ref(&self) -> Option<BoxBorderRef>
The border as a BoxBorderRef, sharing it, when it
is a BoxBorder.
Sourcepub fn as_outlined_border_ref(&self) -> Option<OutlinedBorderRef>
pub fn as_outlined_border_ref(&self) -> Option<OutlinedBorderRef>
The border as an OutlinedBorderRef, sharing it, when it is an OutlinedBorder.
Sourcepub fn plus(&self, other: &ShapeBorderRef) -> ShapeBorderRef
pub fn plus(&self, other: &ShapeBorderRef) -> ShapeBorderRef
Creates a new border consisting of the two borders on either side of the operator.
If the borders belong to classes that know how to add themselves, then
this results in a new border that represents the intelligent addition of
those two borders (see ShapeBorder::add). Otherwise, an object is
returned that merely paints the two borders sequentially, with the left
hand operand on the inside and the right hand operand on the outside.
Sourcepub fn lerp(
a: Option<&ShapeBorderRef>,
b: Option<&ShapeBorderRef>,
t: f64,
) -> Option<ShapeBorderRef>
pub fn lerp( a: Option<&ShapeBorderRef>, b: Option<&ShapeBorderRef>, t: f64, ) -> Option<ShapeBorderRef>
Linearly interpolates between two ShapeBorders.
Trait Implementations§
Source§impl Clone for ShapeBorderRef
impl Clone for ShapeBorderRef
Source§fn clone(&self) -> ShapeBorderRef
fn clone(&self) -> ShapeBorderRef
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ShapeBorderRef
impl Debug for ShapeBorderRef
Source§impl Deref for ShapeBorderRef
impl Deref for ShapeBorderRef
Source§type Target = dyn ShapeBorder
type Target = dyn ShapeBorder
Source§fn deref(&self) -> &(dyn ShapeBorder + 'static)
fn deref(&self) -> &(dyn ShapeBorder + 'static)
Source§impl Display for ShapeBorderRef
Dart’s ShapeBorder.toString, which the inner border’s Debug already renders.
impl Display for ShapeBorderRef
Dart’s ShapeBorder.toString, which the inner border’s Debug already renders.