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:
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
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialEq<ViewPath> for ViewPath
impl PartialEq<ViewPath> 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 Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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