Skip to content

Commit f6a1f0a

Browse files
add means to check if value is handle
1 parent 289778e commit f6a1f0a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/lib.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,10 @@ impl PyValue {
254254
PyId(MaybeOwned::Borrowed(s)))
255255
}
256256

257+
pub fn is_handle(&self) -> bool {
258+
self._blob_schema.is_some()
259+
}
260+
257261
pub fn bytes(&self) -> Cow<[u8]> {
258262
(&self.value).into()
259263
}
@@ -391,7 +395,6 @@ impl PyQuery {
391395
#[pymodule]
392396
#[pyo3(name = "tribles")]
393397
pub fn tribles_python(m: &Bound<'_, PyModule>) -> PyResult<()> {
394-
//m.add_class::<PyValue>()?;
395398
m.add_class::<PyTribleSet>()?;
396399
m.add_class::<PyId>()?;
397400
m.add_class::<PyValue>()?;

0 commit comments

Comments
 (0)