pub struct Resolver<'a> { /* private fields */ }Expand description
Shared ordered resolver.
Implementations§
Source§impl<'a> Resolver<'a>
impl<'a> Resolver<'a>
Sourcepub fn sources(&self) -> &[ResolverSourceRef<'a>]
pub fn sources(&self) -> &[ResolverSourceRef<'a>]
Returns all configured source references in precedence order.
Sourcepub fn push_source(&mut self, source: ResolverSourceRef<'a>)
pub fn push_source(&mut self, source: ResolverSourceRef<'a>)
Appends one source reference.
Sourcepub fn with_source(self, source: ResolverSourceRef<'a>) -> Self
pub fn with_source(self, source: ResolverSourceRef<'a>) -> Self
Appends one source and returns self.
Sourcepub fn resolve(
&self,
resref: &ResRef,
resource_type: ResourceTypeCode,
) -> Option<ResolverResult<'_>>
pub fn resolve( &self, resref: &ResRef, resource_type: ResourceTypeCode, ) -> Option<ResolverResult<'_>>
Resolves one resource using configured source precedence.
Sourcepub fn resolve_texture_with_txi(
&self,
resref: &ResRef,
texture_type: ResourceTypeCode,
) -> Option<TextureWithTxiResult<'_>>
pub fn resolve_texture_with_txi( &self, resref: &ResRef, texture_type: ResourceTypeCode, ) -> Option<TextureWithTxiResult<'_>>
Resolves one texture resource and optional TXI sidecar.
Resolution behavior:
- Resolve the texture using normal source precedence.
- Resolve
TXIwith the sameresrefusing independent global source precedence (not bound to the texture’s winning source).
If texture resolution fails, returns None even if a TXI exists.
Sourcepub fn resolve_texture_with_txi_raw(
&self,
resref: &str,
texture_type_id: u16,
) -> Result<Option<TextureWithTxiResult<'_>>, ResolverError>
pub fn resolve_texture_with_txi_raw( &self, resref: &str, texture_type_id: u16, ) -> Result<Option<TextureWithTxiResult<'_>>, ResolverError>
Resolves one texture and optional TXI sidecar from raw query values.
Sourcepub fn resolve_tpc_with_txi_handoff(
&self,
resref: &ResRef,
) -> Result<Option<TpcWithTxiHandoffResult<'_>>, TpcHandoffError>
pub fn resolve_tpc_with_txi_handoff( &self, resref: &ResRef, ) -> Result<Option<TpcWithTxiHandoffResult<'_>>, TpcHandoffError>
Resolves one TPC resource, parses it, and returns handoff-ready
container parts plus an optional external TXI sidecar.
Sourcepub fn resolve_tpc_with_txi_handoff_raw(
&self,
resref: &str,
) -> Result<Option<TpcWithTxiHandoffResult<'_>>, TpcHandoffError>
pub fn resolve_tpc_with_txi_handoff_raw( &self, resref: &str, ) -> Result<Option<TpcWithTxiHandoffResult<'_>>, TpcHandoffError>
Resolves one TPC resource and optional TXI sidecar from a raw query
resref, returning parsed handoff-ready container parts.
Sourcepub fn resolve_mdl_with_mdx(
&self,
resref: &ResRef,
) -> Option<MdlWithMdxResult<'_>>
pub fn resolve_mdl_with_mdx( &self, resref: &ResRef, ) -> Option<MdlWithMdxResult<'_>>
Resolves one MDL model resource and optional MDX vertex data companion.
Resolution behavior:
- Resolve the MDL using normal source precedence.
- Resolve MDX with the same
resrefusing independent global source precedence (not bound to the MDL’s winning source).
If MDL resolution fails, returns None even if an MDX exists.
Sourcepub fn resolve_mdl_with_mdx_raw(
&self,
resref: &str,
) -> Result<Option<MdlWithMdxResult<'_>>, ResolverError>
pub fn resolve_mdl_with_mdx_raw( &self, resref: &str, ) -> Result<Option<MdlWithMdxResult<'_>>, ResolverError>
Resolves one MDL model and optional MDX companion from raw query values.
Sourcepub fn resolve_mdl_with_mdx_handoff(
&self,
resref: &ResRef,
) -> Result<Option<MdlWithMdxHandoffResult<'_>>, MdlHandoffError>
pub fn resolve_mdl_with_mdx_handoff( &self, resref: &ResRef, ) -> Result<Option<MdlWithMdxHandoffResult<'_>>, MdlHandoffError>
Resolves one MDL model resource, parses it (with MDX vertex data if available), and returns a handoff-ready parsed model.
Sourcepub fn resolve_mdl_with_mdx_handoff_raw(
&self,
resref: &str,
) -> Result<Option<MdlWithMdxHandoffResult<'_>>, MdlHandoffError>
pub fn resolve_mdl_with_mdx_handoff_raw( &self, resref: &str, ) -> Result<Option<MdlWithMdxHandoffResult<'_>>, MdlHandoffError>
Resolves one MDL model and optional MDX companion from a raw query
resref, returning a parsed handoff-ready model.