Struct DatapackCandidate
pub struct DatapackCandidate { /* private fields */ }Expand description
Every entry of every declared registry, decoded and checked, not yet published.
Implementations§
§impl DatapackCandidate
impl DatapackCandidate
pub fn build(
declarations: &[DatapackRegistryDeclaration],
files: &[(String, Vec<Vec<u8>>)],
) -> Result<DatapackCandidate, Box<DatapackLoadError>>
pub fn build( declarations: &[DatapackRegistryDeclaration], files: &[(String, Vec<Vec<u8>>)], ) -> Result<DatapackCandidate, Box<DatapackLoadError>>
Decodes the winning file of every entry of every declared registry in files
(data/<entry namespace>/<registry namespace>/<registry path>/<entry>.json, each with
its versions in pack order, the last winning as ResourceManager hands them out), then
resolves every reference to a declared registry against the whole candidate, so a
forward reference works and an absent target refuses everything. A reference to a
registry no declaration here covers (a vanilla one) is not checked. The caller has
already dropped files whose pack conditions do not hold. The error is boxed: it is
large, and a refused candidate is rare.
Trait Implementations§
§impl Clone for DatapackCandidate
impl Clone for DatapackCandidate
§fn clone(&self) -> DatapackCandidate
fn clone(&self) -> DatapackCandidate
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for DatapackCandidate
impl Debug for DatapackCandidate
§impl PartialEq for DatapackCandidate
impl PartialEq for DatapackCandidate
impl StructuralPartialEq for DatapackCandidate
Auto Trait Implementations§
impl Freeze for DatapackCandidate
impl RefUnwindSafe for DatapackCandidate
impl Send for DatapackCandidate
impl Sync for DatapackCandidate
impl Unpin for DatapackCandidate
impl UnsafeUnpin for DatapackCandidate
impl UnwindSafe for DatapackCandidate
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