pub struct CompositeSprite {
pub alignment: Vec2,
/* private fields */
}Fields
alignment: Vec2Implementations
sourceimpl CompositeSprite
impl CompositeSprite
pub fn new(sheet: Cow<'static, str>, frame: Cow<'static, str>) -> Self
pub fn align(self, value: Vec2) -> Self
pub fn sheet_frame(&self) -> Option<(&str, &str)>
pub fn set_sheet_frame(
&mut self,
sheet_frame: Option<(Cow<'static, str>, Cow<'static, str>)>
)
pub fn sheet(&self) -> Option<&str>
pub fn set_sheet(&mut self, sheet: Option<Cow<'static, str>>)
pub fn frame(&self) -> Option<&str>
pub fn set_frame(&mut self, frame: Option<Cow<'static, str>>)
pub fn apply(&mut self)
Trait Implementations
sourceimpl Clone for CompositeSprite
impl Clone for CompositeSprite
sourcefn clone(&self) -> CompositeSprite
fn clone(&self) -> CompositeSprite
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for CompositeSprite
impl Debug for CompositeSprite
sourceimpl Default for CompositeSprite
impl Default for CompositeSprite
sourcefn default() -> CompositeSprite
fn default() -> CompositeSprite
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for CompositeSprite
impl<'de> Deserialize<'de> for CompositeSprite
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Prefab for CompositeSprite
impl Prefab for CompositeSprite
fn post_from_prefab(&mut self)
fn from_prefab(data: Value) -> Result<Self, PrefabError>
fn from_prefab_with_extras(
data: Value,
_named_entities: &HashMap<String, Entity, RandomState>,
_state_token: ID<PhantomData<dyn State + Send + Sync + 'static>>
) -> Result<Self, PrefabError>
fn to_prefab(&self) -> Result<Value, PrefabError>
fn from_prefab_str(data: &str) -> Result<Self, PrefabError>
fn to_prefab_string(&self) -> Result<String, PrefabError>
sourceimpl Serialize for CompositeSprite
impl Serialize for CompositeSprite
impl PrefabComponent for CompositeSprite
Auto Trait Implementations
impl RefUnwindSafe for CompositeSprite
impl Send for CompositeSprite
impl Sync for CompositeSprite
impl Unpin for CompositeSprite
impl UnwindSafe for CompositeSprite
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more