pub struct ReferenceLinker { /* private fields */ }
Expand description
Main reference linker that coordinates all linking operations
Implementations§
Source§impl ReferenceLinker
impl ReferenceLinker
Sourcepub fn with_config(config: LinkerConfig) -> Self
pub fn with_config(config: LinkerConfig) -> Self
Create a new reference linker with custom configuration
Sourcepub fn generate_reference(&mut self, entity_type: EntityType) -> String
pub fn generate_reference(&mut self, entity_type: EntityType) -> String
Generate a new reference for an entity type
Sourcepub fn register_entity(
&mut self,
entity_type: EntityType,
id: String,
reference: String,
)
pub fn register_entity( &mut self, entity_type: EntityType, id: String, reference: String, )
Register an entity with its reference
Sourcepub fn link_release_to_resources(
&mut self,
release_id: &str,
resource_ids: &[String],
) -> Result<Vec<ReleaseResourceReference>, LinkingError>
pub fn link_release_to_resources( &mut self, release_id: &str, resource_ids: &[String], ) -> Result<Vec<ReleaseResourceReference>, LinkingError>
Link a release to multiple resources
Sourcepub fn auto_link_request(
&mut self,
request: &mut BuildRequest,
) -> Result<LinkingReport, LinkingError>
pub fn auto_link_request( &mut self, request: &mut BuildRequest, ) -> Result<LinkingReport, LinkingError>
Auto-link all entities in a build request
Sourcepub fn get_all_references(
&self,
) -> IndexMap<EntityType, IndexMap<String, String>>
pub fn get_all_references( &self, ) -> IndexMap<EntityType, IndexMap<String, String>>
Get all registered references for debugging
Sourcepub fn validate_references(&self) -> Result<(), Vec<LinkingError>>
pub fn validate_references(&self) -> Result<(), Vec<LinkingError>>
Validate all references in the system
Trait Implementations§
Source§impl Clone for ReferenceLinker
impl Clone for ReferenceLinker
Source§fn clone(&self) -> ReferenceLinker
fn clone(&self) -> ReferenceLinker
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ReferenceLinker
impl Debug for ReferenceLinker
Auto Trait Implementations§
impl Freeze for ReferenceLinker
impl RefUnwindSafe for ReferenceLinker
impl Send for ReferenceLinker
impl Sync for ReferenceLinker
impl Unpin for ReferenceLinker
impl UnwindSafe for ReferenceLinker
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 more