Struct yy_typings::ViewPath
source · [−]pub struct ViewPath {
pub name: String,
pub path: ViewPathLocation,
}
Expand description
Viewpaths in the virtual file system created by the Folders in the Yyp,
deliminated by /
, and with a ViewPathLocation which ends in .yy
or in
.yyp
.
Please note, the Default
implementation in this type is never a valid
option. It is provided for convenience, but the default Root for any file
not in a folder is as follows:
#use yy_typings::{ViewPathLocation, ViewPath};
#const PROJECT_NAME: &'static str = "A project Name";
let root_path = ViewPath {
name: PROJECT_NAME.to_string(),
path: ViewPathLocation(format!("{}.yyp", PROJECT_NAME))
};
Fields
name: String
The human readable name of the parent. for a spr_player
, this
might correspond to Sprites
.
path: ViewPathLocation
The path to the view member itself.
Implementations
sourceimpl ViewPath
impl ViewPath
pub fn root_folder() -> Self
Trait Implementations
sourceimpl<'de> Deserialize<'de> for ViewPath
impl<'de> Deserialize<'de> for ViewPath
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 Ord for ViewPath
impl Ord for ViewPath
sourceimpl PartialOrd<ViewPath> for ViewPath
impl PartialOrd<ViewPath> for ViewPath
sourcefn partial_cmp(&self, other: &ViewPath) -> Option<Ordering>
fn partial_cmp(&self, other: &ViewPath) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Eq for ViewPath
impl StructuralEq for ViewPath
impl StructuralPartialEq for ViewPath
Auto Trait Implementations
impl RefUnwindSafe for ViewPath
impl Send for ViewPath
impl Sync for ViewPath
impl Unpin for ViewPath
impl UnwindSafe for ViewPath
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
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.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more