pub struct World { /* private fields */ }Expand description
Implementations§
Source§impl World
impl World
pub const fn profile(&self) -> &Profile
Sourcepub const fn definitions(&self) -> &BTreeMap<(String, String), Definition>
pub const fn definitions(&self) -> &BTreeMap<(String, String), Definition>
Definitions keyed by (type, id).
Sourcepub const fn source_digest(&self) -> [u8; 32]
pub const fn source_digest(&self) -> [u8; 32]
SHA-256 over every file read, as defined in docs/spec/PACK.md.
Sourcepub const fn files(&self) -> &BTreeMap<String, SourceFile>
pub const fn files(&self) -> &BTreeMap<String, SourceFile>
Every file the load read, which World::source_digest covers, by
root-relative /-separated path, each with its length and SHA-256
as read. An overlay’s files are listed as the overlay gave them. A
file the layout lets the loader ignore, such as one under
profile/ that the profile does not name, is not read, so it is
not listed, and changing it does not change the digest.
Sourcepub const fn object_uids(&self) -> &BTreeMap<String, ObjectLocation>
pub const fn object_uids(&self) -> &BTreeMap<String, ObjectLocation>
Every object uid of the world, with where its object is. Uids are unique in the whole world, so a uid alone names one object.
Sourcepub fn object_location(&self, uid: &str) -> Option<&ObjectLocation>
pub fn object_location(&self, uid: &str) -> Option<&ObjectLocation>
Where the object with uid is.
Trait Implementations§
impl StructuralPartialEq for World
Auto Trait Implementations§
impl Forget for World
impl Freeze for World
impl Move for World
impl RefUnwindSafe for World
impl Send for World
impl Sync for World
impl Unpin for World
impl UnsafeUnpin for World
impl UnwindSafe for World
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