MCPcopy Create free account
hub / github.com/denoland/rust-urlpattern / get_safe_token

Method get_safe_token

src/constructor_parser.rs:118–127  ·  view source on GitHub ↗

Ref: https://wicg.github.io/urlpattern/#get-a-safe-token

(&self, index: usize)

Source from the content-addressed store, hash-verified

116
117 // Ref: https://wicg.github.io/urlpattern/#get-a-safe-token
118 fn get_safe_token(&self, index: usize) -> &Token {
119 if index < self.token_list.len() {
120 &self.token_list[index]
121 } else {
122 assert!(!self.token_list.is_empty());
123 let token = self.token_list.last().unwrap();
124 assert!(token.kind == TokenType::End);
125 token
126 }
127 }
128
129 // Ref: https://wicg.github.io/urlpattern/#change-state
130 fn change_state(

Callers 3

is_search_prefixMethod · 0.80
make_component_stringMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected