pub struct UnitySprite {
pub name: String,
pub rect: UnityRect,
pub pivot: UnityVector2,
pub border: UnityVector4,
}Expand description
Unity sprite definition.
Fields§
§name: StringSprite name
rect: UnityRectRectangle in texture (x, y from bottom-left in Unity)
pivot: UnityVector2Pivot point (0-1 normalized)
border: UnityVector4Border for 9-slice (left, bottom, right, top)
Trait Implementations§
Source§impl Clone for UnitySprite
impl Clone for UnitySprite
Source§fn clone(&self) -> UnitySprite
fn clone(&self) -> UnitySprite
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for UnitySprite
impl Debug for UnitySprite
Auto Trait Implementations§
impl Freeze for UnitySprite
impl RefUnwindSafe for UnitySprite
impl Send for UnitySprite
impl Sync for UnitySprite
impl Unpin for UnitySprite
impl UnsafeUnpin for UnitySprite
impl UnwindSafe for UnitySprite
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,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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