[−][src]Trait yy_boss::YyResource
Associated Types
type AssociatedData: Debug
type SharedData: Debug
Required methods
fn name(&self) -> &str
Get's the resource's name.
fn set_name(&mut self, name: String)
Sets the name of the resource.
fn filesystem_path(&self) -> FilesystemPath
Get the relative filepath from the directory of the YYP
to the resource yy file. For a sprite called spr_player
,
that path would be sprites/spr_player/spr_player.yy
.
fn parent_path(&self) -> ViewPath
fn load_associated_data(
&self,
project_directory: &Path
) -> Result<Option<Self::AssociatedData>>
&self,
project_directory: &Path
) -> Result<Option<Self::AssociatedData>>
fn serialize_associated_data(
&self,
directory_path: &Path,
data: &Self::AssociatedData
) -> Result<()>
&self,
directory_path: &Path,
data: &Self::AssociatedData
) -> Result<()>
fn load_shared_data(
project_directory: &Path
) -> Result<Option<Self::SharedData>>
project_directory: &Path
) -> Result<Option<Self::SharedData>>
fn serialize_shared_data(
project_directory: &Path,
shared_data: &Self::SharedData
) -> Result<()>
project_directory: &Path,
shared_data: &Self::SharedData
) -> Result<()>
Implementations on Foreign Types
impl YyResource for Sprite
[src]
type AssociatedData = Vec<(FrameId, ImageBuffer<Rgba<u8>, Vec<u8>>)>
type SharedData = BTreeMap<String, FilesystemPath>
fn name(&self) -> &str
[src]
fn set_name(&mut self, name: String)
[src]
fn filesystem_path(&self) -> FilesystemPath
[src]
fn parent_path(&self) -> ViewPath
[src]
fn load_associated_data(
&self,
project_directory: &Path
) -> AnyResult<Option<Self::AssociatedData>>
[src]
&self,
project_directory: &Path
) -> AnyResult<Option<Self::AssociatedData>>
fn serialize_associated_data(
&self,
directory_path: &Path,
data: &Self::AssociatedData
) -> AnyResult<()>
[src]
&self,
directory_path: &Path,
data: &Self::AssociatedData
) -> AnyResult<()>
fn load_shared_data(
project_directory: &Path
) -> AnyResult<Option<Self::SharedData>>
[src]
project_directory: &Path
) -> AnyResult<Option<Self::SharedData>>
fn serialize_shared_data(
project_directory: &Path,
shared_data: &Self::SharedData
) -> AnyResult<()>
[src]
project_directory: &Path,
shared_data: &Self::SharedData
) -> AnyResult<()>