MCPcopy Create free account
hub / github.com/docknetwork/crypto / new_with_left_offset

Method new_with_left_offset

utils/src/pairs.rs:51–59  ·  view source on GitHub ↗

Applies offset to the left slice, and then combines two slices together if they have equal length.

(
        left: &'left [Left],
        left_offset: usize,
        right: &'right [Right],
    )

Source from the content-addressed store, hash-verified

49
50 /// Applies offset to the left slice, and then combines two slices together if they have equal length.
51 pub fn new_with_left_offset(
52 left: &'left [Left],
53 left_offset: usize,
54 right: &'right [Right],
55 ) -> Option<Self> {
56 let left_with_offset = left.get(left_offset..)?;
57
58 Self::build_if_equal(left_with_offset, right)
59 }
60
61 /// Applies offset to the right slice, and then combines two slices together if they have equal length.
62 pub fn new_with_right_offset(

Callers

nothing calls this directly

Calls 1

getMethod · 0.80

Tested by

no test coverage detected