pub struct RecursiveLinkExtractor {
pub chain: Vec<LinkPathSegment>,
pub is_list: bool,
}Expand description
Extractor pour chemins imbriqués de profondeur illimitée
Parse dynamiquement des chemins comme:
- /users/123/invoices/456/orders
- /users/123/invoices/456/orders/789/payments/101
Fields§
§chain: Vec<LinkPathSegment>§is_list: boolTrue si le chemin se termine par une route (liste) False si le chemin se termine par un ID (item spécifique)
Implementations§
Source§impl RecursiveLinkExtractor
impl RecursiveLinkExtractor
Sourcepub fn from_segments(
segments: Vec<String>,
registry: &LinkRouteRegistry,
config: &LinksConfig,
) -> Result<Self, ExtractorError>
pub fn from_segments( segments: Vec<String>, registry: &LinkRouteRegistry, config: &LinksConfig, ) -> Result<Self, ExtractorError>
Parse un chemin complet dynamiquement
Sourcepub fn final_target(&self) -> (Uuid, String)
pub fn final_target(&self) -> (Uuid, String)
Obtenir l’ID final et le type pour la requête finale
Sourcepub fn final_link_def(&self) -> Option<&LinkDefinition>
pub fn final_link_def(&self) -> Option<&LinkDefinition>
Obtenir la définition du dernier lien
Sourcepub fn penultimate_segment(&self) -> Option<&LinkPathSegment>
pub fn penultimate_segment(&self) -> Option<&LinkPathSegment>
Obtenir l’avant-dernier segment (celui qui a le lien)
Trait Implementations§
Source§impl Clone for RecursiveLinkExtractor
impl Clone for RecursiveLinkExtractor
Source§fn clone(&self) -> RecursiveLinkExtractor
fn clone(&self) -> RecursiveLinkExtractor
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 moreAuto Trait Implementations§
impl Freeze for RecursiveLinkExtractor
impl RefUnwindSafe for RecursiveLinkExtractor
impl Send for RecursiveLinkExtractor
impl Sync for RecursiveLinkExtractor
impl Unpin for RecursiveLinkExtractor
impl UnwindSafe for RecursiveLinkExtractor
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