author | Rapha?l Gom?s <rgomes@octobus.net> |
Sun, 05 Jan 2025 23:21:56 +0100 | |
changeset 52835 | bc095c0db77c |
parent 52792 | acae91fad6be |
permissions | -rw-r--r-- |
52789
34f44aa5e844
rust-pyo3-index: first mutating methods
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
diff
changeset
|
1 |
// revlog/index.rs |
34f44aa5e844
rust-pyo3-index: first mutating methods
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
diff
changeset
|
2 |
// |
34f44aa5e844
rust-pyo3-index: first mutating methods
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
diff
changeset
|
3 |
// Copyright 2019-2020 Georges Racinet <georges.racinet@octobus.net> |
34f44aa5e844
rust-pyo3-index: first mutating methods
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
diff
changeset
|
4 |
// 2020-2024 Raphaël Gomès <raphael.gomes@octobus.net> |
34f44aa5e844
rust-pyo3-index: first mutating methods
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
diff
changeset
|
5 |
// 2024 Georges Racinet <georges.racinet@cloudcrane.io> |
34f44aa5e844
rust-pyo3-index: first mutating methods
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
diff
changeset
|
6 |
// |
34f44aa5e844
rust-pyo3-index: first mutating methods
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
diff
changeset
|
7 |
// This software may be used and distributed according to the terms of the |
34f44aa5e844
rust-pyo3-index: first mutating methods
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
diff
changeset
|
8 |
// GNU General Public License version 2 or any later version. |
34f44aa5e844
rust-pyo3-index: first mutating methods
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
diff
changeset
|
9 |
//! Utilities for dealing with the index at the Python boundary |
52835
bc095c0db77c
rust-pyo3: implement missing traits for `PySharedIndex`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
52792
diff
changeset
|
10 |
use hg::{BaseRevision, Graph}; |
52789
34f44aa5e844
rust-pyo3-index: first mutating methods
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
diff
changeset
|
11 |
use pyo3::prelude::*; |
34f44aa5e844
rust-pyo3-index: first mutating methods
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
diff
changeset
|
12 |
use pyo3::types::{PyBytes, PyTuple}; |
52835
bc095c0db77c
rust-pyo3: implement missing traits for `PySharedIndex`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
52792
diff
changeset
|
13 |
use vcsgraph::graph::Graph as VCSGraph; |
52789
34f44aa5e844
rust-pyo3-index: first mutating methods
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
diff
changeset
|
14 |
|
52792
acae91fad6be
rust-pyo3-revlog: standalone NodeTree class
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
52791
diff
changeset
|
15 |
use hg::revlog::{ |
acae91fad6be
rust-pyo3-revlog: standalone NodeTree class
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
52791
diff
changeset
|
16 |
index::{Index, RevisionDataParams}, |
acae91fad6be
rust-pyo3-revlog: standalone NodeTree class
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
52791
diff
changeset
|
17 |
Node, Revision, RevlogIndex, |
acae91fad6be
rust-pyo3-revlog: standalone NodeTree class
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
52791
diff
changeset
|
18 |
}; |
acae91fad6be
rust-pyo3-revlog: standalone NodeTree class
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
52791
diff
changeset
|
19 |
|
52835
bc095c0db77c
rust-pyo3: implement missing traits for `PySharedIndex`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
52792
diff
changeset
|
20 |
#[derive(derive_more::From, Clone)] |
52792
acae91fad6be
rust-pyo3-revlog: standalone NodeTree class
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
52791
diff
changeset
|
21 |
pub struct PySharedIndex { |
acae91fad6be
rust-pyo3-revlog: standalone NodeTree class
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
52791
diff
changeset
|
22 |
/// The underlying hg-core index |
acae91fad6be
rust-pyo3-revlog: standalone NodeTree class
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
52791
diff
changeset
|
23 |
inner: &'static Index, |
acae91fad6be
rust-pyo3-revlog: standalone NodeTree class
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
52791
diff
changeset
|
24 |
} |
acae91fad6be
rust-pyo3-revlog: standalone NodeTree class
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
52791
diff
changeset
|
25 |
|
acae91fad6be
rust-pyo3-revlog: standalone NodeTree class
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
52791
diff
changeset
|
26 |
impl PySharedIndex { |
acae91fad6be
rust-pyo3-revlog: standalone NodeTree class
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
52791
diff
changeset
|
27 |
/// Return a reference to the inner index, bound by `self` |
acae91fad6be
rust-pyo3-revlog: standalone NodeTree class
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
52791
diff
changeset
|
28 |
pub fn inner(&self) -> &Index { |
acae91fad6be
rust-pyo3-revlog: standalone NodeTree class
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
52791
diff
changeset
|
29 |
self.inner |
acae91fad6be
rust-pyo3-revlog: standalone NodeTree class
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
52791
diff
changeset
|
30 |
} |
acae91fad6be
rust-pyo3-revlog: standalone NodeTree class
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
52791
diff
changeset
|
31 |
|
acae91fad6be
rust-pyo3-revlog: standalone NodeTree class
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
52791
diff
changeset
|
32 |
/// Return an unsafe "faked" `'static` reference to the inner index, for |
acae91fad6be
rust-pyo3-revlog: standalone NodeTree class
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
52791
diff
changeset
|
33 |
/// the purposes of Python <-> Rust memory sharing. |
acae91fad6be
rust-pyo3-revlog: standalone NodeTree class
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
52791
diff
changeset
|
34 |
pub unsafe fn static_inner(&self) -> &'static Index { |
acae91fad6be
rust-pyo3-revlog: standalone NodeTree class
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
52791
diff
changeset
|
35 |
self.inner |
acae91fad6be
rust-pyo3-revlog: standalone NodeTree class
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
52791
diff
changeset
|
36 |
} |
acae91fad6be
rust-pyo3-revlog: standalone NodeTree class
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
52791
diff
changeset
|
37 |
} |
acae91fad6be
rust-pyo3-revlog: standalone NodeTree class
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
52791
diff
changeset
|
38 |
|
acae91fad6be
rust-pyo3-revlog: standalone NodeTree class
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
52791
diff
changeset
|
39 |
impl RevlogIndex for PySharedIndex { |
acae91fad6be
rust-pyo3-revlog: standalone NodeTree class
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
52791
diff
changeset
|
40 |
fn len(&self) -> usize { |
acae91fad6be
rust-pyo3-revlog: standalone NodeTree class
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
52791
diff
changeset
|
41 |
self.inner.len() |
acae91fad6be
rust-pyo3-revlog: standalone NodeTree class
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
52791
diff
changeset
|
42 |
} |
acae91fad6be
rust-pyo3-revlog: standalone NodeTree class
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
52791
diff
changeset
|
43 |
fn node(&self, rev: Revision) -> Option<&Node> { |
acae91fad6be
rust-pyo3-revlog: standalone NodeTree class
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
52791
diff
changeset
|
44 |
self.inner.node(rev) |
acae91fad6be
rust-pyo3-revlog: standalone NodeTree class
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
52791
diff
changeset
|
45 |
} |
acae91fad6be
rust-pyo3-revlog: standalone NodeTree class
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
52791
diff
changeset
|
46 |
} |
52789
34f44aa5e844
rust-pyo3-index: first mutating methods
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
diff
changeset
|
47 |
|
52835
bc095c0db77c
rust-pyo3: implement missing traits for `PySharedIndex`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
52792
diff
changeset
|
48 |
impl Graph for PySharedIndex { |
bc095c0db77c
rust-pyo3: implement missing traits for `PySharedIndex`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
52792
diff
changeset
|
49 |
#[inline(always)] |
bc095c0db77c
rust-pyo3: implement missing traits for `PySharedIndex`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
52792
diff
changeset
|
50 |
fn parents(&self, rev: Revision) -> Result<[Revision; 2], hg::GraphError> { |
bc095c0db77c
rust-pyo3: implement missing traits for `PySharedIndex`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
52792
diff
changeset
|
51 |
self.inner.parents(rev) |
bc095c0db77c
rust-pyo3: implement missing traits for `PySharedIndex`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
52792
diff
changeset
|
52 |
} |
bc095c0db77c
rust-pyo3: implement missing traits for `PySharedIndex`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
52792
diff
changeset
|
53 |
} |
bc095c0db77c
rust-pyo3: implement missing traits for `PySharedIndex`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
52792
diff
changeset
|
54 |
|
bc095c0db77c
rust-pyo3: implement missing traits for `PySharedIndex`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
52792
diff
changeset
|
55 |
impl VCSGraph for PySharedIndex { |
bc095c0db77c
rust-pyo3: implement missing traits for `PySharedIndex`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
52792
diff
changeset
|
56 |
#[inline(always)] |
bc095c0db77c
rust-pyo3: implement missing traits for `PySharedIndex`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
52792
diff
changeset
|
57 |
fn parents( |
bc095c0db77c
rust-pyo3: implement missing traits for `PySharedIndex`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
52792
diff
changeset
|
58 |
&self, |
bc095c0db77c
rust-pyo3: implement missing traits for `PySharedIndex`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
52792
diff
changeset
|
59 |
rev: BaseRevision, |
bc095c0db77c
rust-pyo3: implement missing traits for `PySharedIndex`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
52792
diff
changeset
|
60 |
) -> Result<vcsgraph::graph::Parents, vcsgraph::graph::GraphReadError> |
bc095c0db77c
rust-pyo3: implement missing traits for `PySharedIndex`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
52792
diff
changeset
|
61 |
{ |
bc095c0db77c
rust-pyo3: implement missing traits for `PySharedIndex`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
52792
diff
changeset
|
62 |
// FIXME This trait should be reworked to decide between Revision |
bc095c0db77c
rust-pyo3: implement missing traits for `PySharedIndex`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
52792
diff
changeset
|
63 |
// and UncheckedRevision, get better errors names, etc. |
bc095c0db77c
rust-pyo3: implement missing traits for `PySharedIndex`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
52792
diff
changeset
|
64 |
match Graph::parents(self, Revision(rev)) { |
bc095c0db77c
rust-pyo3: implement missing traits for `PySharedIndex`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
52792
diff
changeset
|
65 |
Ok(parents) => { |
bc095c0db77c
rust-pyo3: implement missing traits for `PySharedIndex`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
52792
diff
changeset
|
66 |
Ok(vcsgraph::graph::Parents([parents[0].0, parents[1].0])) |
bc095c0db77c
rust-pyo3: implement missing traits for `PySharedIndex`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
52792
diff
changeset
|
67 |
} |
bc095c0db77c
rust-pyo3: implement missing traits for `PySharedIndex`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
52792
diff
changeset
|
68 |
Err(hg::GraphError::ParentOutOfRange(rev)) => { |
bc095c0db77c
rust-pyo3: implement missing traits for `PySharedIndex`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
52792
diff
changeset
|
69 |
Err(vcsgraph::graph::GraphReadError::KeyedInvalidKey(rev.0)) |
bc095c0db77c
rust-pyo3: implement missing traits for `PySharedIndex`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
52792
diff
changeset
|
70 |
} |
bc095c0db77c
rust-pyo3: implement missing traits for `PySharedIndex`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
52792
diff
changeset
|
71 |
Err(hg::GraphError::ParentOutOfOrder(rev)) => { |
bc095c0db77c
rust-pyo3: implement missing traits for `PySharedIndex`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
52792
diff
changeset
|
72 |
Err(vcsgraph::graph::GraphReadError::KeyedInvalidKey(rev.0)) |
bc095c0db77c
rust-pyo3: implement missing traits for `PySharedIndex`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
52792
diff
changeset
|
73 |
} |
bc095c0db77c
rust-pyo3: implement missing traits for `PySharedIndex`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
52792
diff
changeset
|
74 |
} |
bc095c0db77c
rust-pyo3: implement missing traits for `PySharedIndex`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
52792
diff
changeset
|
75 |
} |
bc095c0db77c
rust-pyo3: implement missing traits for `PySharedIndex`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
52792
diff
changeset
|
76 |
} |
bc095c0db77c
rust-pyo3: implement missing traits for `PySharedIndex`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
52792
diff
changeset
|
77 |
|
52789
34f44aa5e844
rust-pyo3-index: first mutating methods
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
diff
changeset
|
78 |
pub fn py_tuple_to_revision_data_params( |
34f44aa5e844
rust-pyo3-index: first mutating methods
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
diff
changeset
|
79 |
tuple: &Bound<'_, PyTuple>, |
34f44aa5e844
rust-pyo3-index: first mutating methods
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
diff
changeset
|
80 |
) -> PyResult<RevisionDataParams> { |
34f44aa5e844
rust-pyo3-index: first mutating methods
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
diff
changeset
|
81 |
// no need to check length: in PyO3 tup.get_item() does return |
34f44aa5e844
rust-pyo3-index: first mutating methods
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
diff
changeset
|
82 |
// proper errors |
34f44aa5e844
rust-pyo3-index: first mutating methods
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
diff
changeset
|
83 |
let offset_or_flags: u64 = tuple.get_item(0)?.extract()?; |
34f44aa5e844
rust-pyo3-index: first mutating methods
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
diff
changeset
|
84 |
let node_id = tuple |
34f44aa5e844
rust-pyo3-index: first mutating methods
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
diff
changeset
|
85 |
.get_item(7)? |
34f44aa5e844
rust-pyo3-index: first mutating methods
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
diff
changeset
|
86 |
.downcast::<PyBytes>()? |
34f44aa5e844
rust-pyo3-index: first mutating methods
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
diff
changeset
|
87 |
.as_bytes() |
34f44aa5e844
rust-pyo3-index: first mutating methods
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
diff
changeset
|
88 |
.try_into() |
34f44aa5e844
rust-pyo3-index: first mutating methods
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
diff
changeset
|
89 |
.expect("nodeid should be set"); |
34f44aa5e844
rust-pyo3-index: first mutating methods
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
diff
changeset
|
90 |
let flags = (offset_or_flags & 0xFFFF) as u16; |
34f44aa5e844
rust-pyo3-index: first mutating methods
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
diff
changeset
|
91 |
let data_offset = offset_or_flags >> 16; |
34f44aa5e844
rust-pyo3-index: first mutating methods
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
diff
changeset
|
92 |
Ok(RevisionDataParams { |
34f44aa5e844
rust-pyo3-index: first mutating methods
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
diff
changeset
|
93 |
flags, |
34f44aa5e844
rust-pyo3-index: first mutating methods
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
diff
changeset
|
94 |
data_offset, |
34f44aa5e844
rust-pyo3-index: first mutating methods
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
diff
changeset
|
95 |
data_compressed_length: tuple.get_item(1)?.extract()?, |
34f44aa5e844
rust-pyo3-index: first mutating methods
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
diff
changeset
|
96 |
data_uncompressed_length: tuple.get_item(2)?.extract()?, |
34f44aa5e844
rust-pyo3-index: first mutating methods
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
diff
changeset
|
97 |
data_delta_base: tuple.get_item(3)?.extract()?, |
34f44aa5e844
rust-pyo3-index: first mutating methods
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
diff
changeset
|
98 |
link_rev: tuple.get_item(4)?.extract()?, |
34f44aa5e844
rust-pyo3-index: first mutating methods
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
diff
changeset
|
99 |
parent_rev_1: tuple.get_item(5)?.extract()?, |
34f44aa5e844
rust-pyo3-index: first mutating methods
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
diff
changeset
|
100 |
parent_rev_2: tuple.get_item(6)?.extract()?, |
34f44aa5e844
rust-pyo3-index: first mutating methods
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
diff
changeset
|
101 |
node_id, |
34f44aa5e844
rust-pyo3-index: first mutating methods
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
diff
changeset
|
102 |
..Default::default() |
34f44aa5e844
rust-pyo3-index: first mutating methods
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
diff
changeset
|
103 |
}) |
34f44aa5e844
rust-pyo3-index: first mutating methods
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
diff
changeset
|
104 |
} |
52791
0ac956db7ea7
rust-pyo3-index: __getitem__
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
52789
diff
changeset
|
105 |
|
0ac956db7ea7
rust-pyo3-index: __getitem__
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
52789
diff
changeset
|
106 |
pub fn revision_data_params_to_py_tuple( |
0ac956db7ea7
rust-pyo3-index: __getitem__
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
52789
diff
changeset
|
107 |
py: Python<'_>, |
0ac956db7ea7
rust-pyo3-index: __getitem__
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
52789
diff
changeset
|
108 |
params: RevisionDataParams, |
0ac956db7ea7
rust-pyo3-index: __getitem__
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
52789
diff
changeset
|
109 |
) -> PyResult<Bound<'_, PyTuple>> { |
0ac956db7ea7
rust-pyo3-index: __getitem__
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
52789
diff
changeset
|
110 |
PyTuple::new( |
0ac956db7ea7
rust-pyo3-index: __getitem__
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
52789
diff
changeset
|
111 |
py, |
0ac956db7ea7
rust-pyo3-index: __getitem__
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
52789
diff
changeset
|
112 |
&[ |
0ac956db7ea7
rust-pyo3-index: __getitem__
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
52789
diff
changeset
|
113 |
params.data_offset.into_pyobject(py)?.into_any(), |
0ac956db7ea7
rust-pyo3-index: __getitem__
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
52789
diff
changeset
|
114 |
params.data_compressed_length.into_pyobject(py)?.into_any(), |
0ac956db7ea7
rust-pyo3-index: __getitem__
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
52789
diff
changeset
|
115 |
params |
0ac956db7ea7
rust-pyo3-index: __getitem__
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
52789
diff
changeset
|
116 |
.data_uncompressed_length |
0ac956db7ea7
rust-pyo3-index: __getitem__
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
52789
diff
changeset
|
117 |
.into_pyobject(py)? |
0ac956db7ea7
rust-pyo3-index: __getitem__
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
52789
diff
changeset
|
118 |
.into_any(), |
0ac956db7ea7
rust-pyo3-index: __getitem__
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
52789
diff
changeset
|
119 |
params.data_delta_base.into_pyobject(py)?.into_any(), |
0ac956db7ea7
rust-pyo3-index: __getitem__
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
52789
diff
changeset
|
120 |
params.link_rev.into_pyobject(py)?.into_any(), |
0ac956db7ea7
rust-pyo3-index: __getitem__
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
52789
diff
changeset
|
121 |
params.parent_rev_1.into_pyobject(py)?.into_any(), |
0ac956db7ea7
rust-pyo3-index: __getitem__
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
52789
diff
changeset
|
122 |
params.parent_rev_2.into_pyobject(py)?.into_any(), |
0ac956db7ea7
rust-pyo3-index: __getitem__
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
52789
diff
changeset
|
123 |
PyBytes::new(py, ¶ms.node_id).into_any().into_any(), |
0ac956db7ea7
rust-pyo3-index: __getitem__
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
52789
diff
changeset
|
124 |
params._sidedata_offset.into_pyobject(py)?.into_any(), |
0ac956db7ea7
rust-pyo3-index: __getitem__
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
52789
diff
changeset
|
125 |
params |
0ac956db7ea7
rust-pyo3-index: __getitem__
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
52789
diff
changeset
|
126 |
._sidedata_compressed_length |
0ac956db7ea7
rust-pyo3-index: __getitem__
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
52789
diff
changeset
|
127 |
.into_pyobject(py)? |
0ac956db7ea7
rust-pyo3-index: __getitem__
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
52789
diff
changeset
|
128 |
.into_any(), |
0ac956db7ea7
rust-pyo3-index: __getitem__
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
52789
diff
changeset
|
129 |
params.data_compression_mode.into_pyobject(py)?.into_any(), |
0ac956db7ea7
rust-pyo3-index: __getitem__
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
52789
diff
changeset
|
130 |
params |
0ac956db7ea7
rust-pyo3-index: __getitem__
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
52789
diff
changeset
|
131 |
._sidedata_compression_mode |
0ac956db7ea7
rust-pyo3-index: __getitem__
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
52789
diff
changeset
|
132 |
.into_pyobject(py)? |
0ac956db7ea7
rust-pyo3-index: __getitem__
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
52789
diff
changeset
|
133 |
.into_any(), |
0ac956db7ea7
rust-pyo3-index: __getitem__
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
52789
diff
changeset
|
134 |
params._rank.into_pyobject(py)?.into_any(), |
0ac956db7ea7
rust-pyo3-index: __getitem__
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
52789
diff
changeset
|
135 |
], |
0ac956db7ea7
rust-pyo3-index: __getitem__
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
52789
diff
changeset
|
136 |
) |
0ac956db7ea7
rust-pyo3-index: __getitem__
Georges Racinet <georges.racinet@cloudcrane.io>
parents:
52789
diff
changeset
|
137 |
} |