pub struct Environment { /* private fields */ }
Expand description
Unified environment for managing Unity assets
Implementations§
Source§impl Environment
impl Environment
Sourcepub fn load<P: AsRef<Path>>(&mut self, path: P) -> Result<()>
pub fn load<P: AsRef<Path>>(&mut self, path: P) -> Result<()>
Load assets from a path (file or directory)
Sourcepub fn load_directory<P: AsRef<Path>>(&mut self, path: P) -> Result<()>
pub fn load_directory<P: AsRef<Path>>(&mut self, path: P) -> Result<()>
Load all supported files from a directory
Sourcepub fn objects(&self) -> impl Iterator<Item = &UnityClass>
pub fn objects(&self) -> impl Iterator<Item = &UnityClass>
Get all Unity objects from all loaded documents
Sourcepub fn filter_by_class(&self, class_name: &str) -> Vec<&UnityClass>
pub fn filter_by_class(&self, class_name: &str) -> Vec<&UnityClass>
Filter objects by class name
Sourcepub fn yaml_documents(&self) -> &HashMap<PathBuf, YamlDocument>
pub fn yaml_documents(&self) -> &HashMap<PathBuf, YamlDocument>
Get loaded YAML documents
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Environment
impl RefUnwindSafe for Environment
impl Send for Environment
impl Sync for Environment
impl Unpin for Environment
impl UnwindSafe for Environment
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> 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 moreSource§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian()
.