pub struct DecodedImage {
pub spec: DecodedImageSpec,
}Expand description
声明式解码图像构建器。
Fields§
§spec: DecodedImageSpecImplementations§
Source§impl DecodedImage
impl DecodedImage
pub const fn fit(self, fit: ObjectFit) -> Self
pub const fn nine_slice(self, insets: NineSliceInsets) -> Self
pub const fn rounded(self, r: u8) -> Self
pub const fn rounded_corners(self, radii: CornerRadii) -> Self
pub const fn opacity(self, opacity: u8) -> Self
pub const fn tint(self, tint: Color) -> Self
pub const fn fallback_bg(self, color: Color) -> Self
pub const fn revision(self, rev: u64) -> Self
Trait Implementations§
Source§impl Clone for DecodedImage
impl Clone for DecodedImage
impl Copy for DecodedImage
Source§impl Debug for DecodedImage
impl Debug for DecodedImage
Source§impl<'a> IntoElement<'a> for DecodedImage
impl<'a> IntoElement<'a> for DecodedImage
fn into_element(self, cx: &'a FrameScope) -> Element<'a>
Source§fn into_any_element(self, cx: &'a FrameScope) -> Element<'a>
fn into_any_element(self, cx: &'a FrameScope) -> Element<'a>
与 GPUI
.into_any_element() 对应的语义别名(零堆分配返回闭合枚举 Element<'a>)。Auto Trait Implementations§
impl Forget for DecodedImage
impl Freeze for DecodedImage
impl Move for DecodedImage
impl RefUnwindSafe for DecodedImage
impl Send for DecodedImage
impl Sync for DecodedImage
impl Unpin for DecodedImage
impl UnsafeUnpin for DecodedImage
impl UnwindSafe for DecodedImage
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FluentBuilder for T
impl<T> FluentBuilder for T
Source§fn when(self, condition: bool, then: impl FnOnce(Self) -> Self) -> Self
fn when(self, condition: bool, then: impl FnOnce(Self) -> Self) -> Self
当
condition 为 true 时执行闭包修饰自身,否则原样返回。Source§fn when_else(
self,
condition: bool,
then: impl FnOnce(Self) -> Self,
else_fn: impl FnOnce(Self) -> Self,
) -> Self
fn when_else( self, condition: bool, then: impl FnOnce(Self) -> Self, else_fn: impl FnOnce(Self) -> Self, ) -> Self
根据
condition 在两个修饰分支之间二选一。Source§fn when_some<O>(
self,
option: Option<O>,
then: impl FnOnce(Self, O) -> Self,
) -> Self
fn when_some<O>( self, option: Option<O>, then: impl FnOnce(Self, O) -> Self, ) -> Self
当
option 为 Some(value) 时执行闭包修饰自身,否则原样返回。