You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixed length arrays up to 32-byte can be used both as parameters and return types in the current version, meaning that the inputs can be bounded at compile time without runtime checkings.
However, arrays over 32-byte long are not supported by PyO3 at the moment (should be after Rust 1.5).
For now, any array over 32-byte long implies a run time checking + an exception throwing on the Python side. e.g:
#[pymethods]
impl PyBlockHeader {
#[new]
fn new(data: &[u8]) -> PyResult<Self> {
if data.len() != 80 {
Err(exceptions::PyValueError::new_err(format!(
"Data must be 80-byte long"
)))
}
[...]
Fixed length arrays up to 32-byte can be used both as parameters and return types in the current version, meaning that the inputs can be bounded at compile time without runtime checkings.
However, arrays over 32-byte long are not supported by PyO3 at the moment (should be after Rust 1.5).
For now, any array over 32-byte long implies a run time checking + an exception throwing on the Python side. e.g:
PyO3/pyo3#1128
The text was updated successfully, but these errors were encountered: