MCPcopy Create free account
hub / github.com/chanced/jsonptr / push_front

Method push_front

src/pointer.rs:950–953  ·  view source on GitHub ↗

Pushes a `Token` onto the front of this `Pointer`.

(&mut self, token: impl Into<Token<'t>>)

Source from the content-addressed store, hash-verified

948
949 /// Pushes a `Token` onto the front of this `Pointer`.
950 pub fn push_front<'t>(&mut self, token: impl Into<Token<'t>>) {
951 self.0.insert(0, '/');
952 self.0.insert_str(1, token.into().encoded());
953 }
954
955 /// Pushes a `Token` onto the back of this `Pointer`.
956 pub fn push_back<'t>(&mut self, token: impl Into<Token<'t>>) {

Callers 4

with_leading_tokenMethod · 0.80
push_pop_frontFunction · 0.80
qc_pop_and_pushFunction · 0.80
qc_splitFunction · 0.80

Calls 1

encodedMethod · 0.80

Tested by 1

push_pop_frontFunction · 0.64