pub struct CornerShapeElement { /* private fields */ }Expand description
Element of the rounded corner shape a node’s backgrounds draw in.
Implementations§
Source§impl CornerShapeElement
impl CornerShapeElement
Sourcepub fn new(shape: RoundedCornerShape) -> Self
pub fn new(shape: RoundedCornerShape) -> Self
Creates an element that holds shape as the current rounded corner shape.
Sourcepub fn shape(&self) -> RoundedCornerShape
pub fn shape(&self) -> RoundedCornerShape
Returns the corner shape.
Trait Implementations§
Source§impl Clone for CornerShapeElement
impl Clone for CornerShapeElement
Source§impl Debug for CornerShapeElement
impl Debug for CornerShapeElement
Source§impl PartialEq for CornerShapeElement
impl PartialEq for CornerShapeElement
Source§impl PlainElement for CornerShapeElement
impl PlainElement for CornerShapeElement
Source§const WORDS: usize = 4
const WORDS: usize = 4
How many words the value takes: at most
PLAIN_WORDS_MAX.Source§const CAPABILITIES: NodeCapabilities = NodeCapabilities::DRAW
const CAPABILITIES: NodeCapabilities = NodeCapabilities::DRAW
What the element takes part in: layout, draw or both.
Source§fn to_words(&self, words: &mut [u32])
fn to_words(&self, words: &mut [u32])
Writes the value into
words, which holds Self::WORDS words.Source§fn from_words(words: &[u32]) -> Self
fn from_words(words: &[u32]) -> Self
The value that
Self::to_words wrote into words.Source§const UPDATE_INVALIDATION: Option<InvalidationKind> = None
const UPDATE_INVALIDATION: Option<InvalidationKind> = None
The one pipeline stage a changed value invalidates, or
None to
invalidate every stage of Self::CAPABILITIES.Source§const LAYOUT: Option<&'static PlainLayoutFns> = None
const LAYOUT: Option<&'static PlainLayoutFns> = None
How the element measures the content it wraps, for an element with
NodeCapabilities::LAYOUT: Some(&PlainLayoutFns::of::<Self>())
for a PlainLayout. None, the default, passes the content’s
measure through.Source§fn inspector_name(&self) -> &'static str
fn inspector_name(&self) -> &'static str
Human readable name surfaced to inspector tooling.
impl StructuralPartialEq for CornerShapeElement
Auto Trait Implementations§
impl Forget for CornerShapeElement
impl Freeze for CornerShapeElement
impl Move for CornerShapeElement
impl RefUnwindSafe for CornerShapeElement
impl Send for CornerShapeElement
impl Sync for CornerShapeElement
impl Unpin for CornerShapeElement
impl UnsafeUnpin for CornerShapeElement
impl UnwindSafe for CornerShapeElement
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more