pub struct OnnxValue { /* private fields */ }Expand description
A parsed, canonicalized ONNX ModelProto. The stored bytes are the
flat canonical skeleton (see module docs). alloc-gated
— the pipeline binds the borrowed OnnxCarrier.
Implementations§
Source§impl OnnxValue
impl OnnxValue
Sourcepub fn canonical_bytes(&self) -> &[u8] ⓘ
pub fn canonical_bytes(&self) -> &[u8] ⓘ
Borrow the canonical-skeleton bytes.
Sourcepub fn parse(raw: &[u8]) -> Result<Self, ShapeViolation>
pub fn parse(raw: &[u8]) -> Result<Self, ShapeViolation>
Parse an ONNX ModelProto wire buffer into a canonicalized
skeleton.
§Errors
A [ShapeViolation] whose constraint_iri names the violated
invariant (protobuf decode failure, unsupported IR version,
opset below the minimum, missing graph, a subgraph cycle, an
over-deep subgraph nesting, or an unknown tensor data type).
Trait Implementations§
impl Eq for OnnxValue
impl StructuralPartialEq for OnnxValue
Auto Trait Implementations§
impl Freeze for OnnxValue
impl RefUnwindSafe for OnnxValue
impl Send for OnnxValue
impl Sync for OnnxValue
impl Unpin for OnnxValue
impl UnsafeUnpin for OnnxValue
impl UnwindSafe for OnnxValue
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more