Creates a new `PointerBuf` from a slice of non-encoded strings.
(tokens: impl IntoIterator<Item: Into<Token<'t>>>)
| 933 | |
| 934 | /// Creates a new `PointerBuf` from a slice of non-encoded strings. |
| 935 | pub fn from_tokens<'t>(tokens: impl IntoIterator<Item: Into<Token<'t>>>) -> Self { |
| 936 | let mut inner = String::new(); |
| 937 | for t in tokens.into_iter().map(Into::into) { |
| 938 | inner.push('/'); |
| 939 | inner.push_str(t.encoded()); |
| 940 | } |
| 941 | PointerBuf(inner) |
| 942 | } |
| 943 | |
| 944 | /// Coerces to a Pointer slice. |
| 945 | pub fn as_ptr(&self) -> &Pointer { |
nothing calls this directly
no test coverage detected