pub struct MetadataBuilder { /* private fields */ }
Expand description
Builder for a serialized metadata struct
Inputs/Outputs must be added in the same order they’re defined in the bind group
Implementations§
Source§impl MetadataBuilder
impl MetadataBuilder
Sourcepub fn with_array(&mut self, buffer_len: u32, len: u32)
pub fn with_array(&mut self, buffer_len: u32, len: u32)
Add an array to a builder
Sourcepub fn with_tensor(
&mut self,
rank: u32,
buffer_len: u32,
len: u32,
shape: Vec<u32>,
strides: Vec<u32>,
)
pub fn with_tensor( &mut self, rank: u32, buffer_len: u32, len: u32, shape: Vec<u32>, strides: Vec<u32>, )
Add a tensor to a builder
Sourcepub fn finish(self) -> MetadataBinding
pub fn finish(self) -> MetadataBinding
Build the final serialized metadata struct
Trait Implementations§
Source§impl Default for MetadataBuilder
impl Default for MetadataBuilder
Source§fn default() -> MetadataBuilder
fn default() -> MetadataBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for MetadataBuilder
impl RefUnwindSafe for MetadataBuilder
impl Send for MetadataBuilder
impl Sync for MetadataBuilder
impl Unpin for MetadataBuilder
impl UnwindSafe for MetadataBuilder
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