pub struct Img<'a> {
pub width: i16,
pub height: i16,
pub source: SpriteSource<'a>,
}Expand description
贴图与图标掩码原语节点(最终编译为 DrawPayload::Sprite)。
Fields§
§width: i16§height: i16§source: SpriteSource<'a>Implementations§
Trait Implementations§
impl<'a> Copy for Img<'a>
Source§impl<'a> IntoElement<'a> for Img<'a>
impl<'a> IntoElement<'a> for Img<'a>
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<'a> !RefUnwindSafe for Img<'a>
impl<'a> !Send for Img<'a>
impl<'a> !Sync for Img<'a>
impl<'a> !UnwindSafe for Img<'a>
impl<'a> Forget for Img<'a>
impl<'a> Freeze for Img<'a>
impl<'a> Move for Img<'a>
impl<'a> Unpin for Img<'a>
impl<'a> UnsafeUnpin for Img<'a>
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) 时执行闭包修饰自身,否则原样返回。