Struct menoh::ModelBuilder[][src]

pub struct ModelBuilder<'a, 's> { /* fields omitted */ }

Builder of model.

Mainly used for buffer control.

Methods

impl<'a, 's> ModelBuilder<'a, 's>
[src]

Attach external buffer to the Model generated from this instance.

If user doesn't attach external buffer, then internal buffer is automatically generaged inside Model.

Model lifetime is bounded by buffer internal data.

If user can ensure buffer dtype and size is valid, and VariableProfileTable is out of scope, there is an unsafe version of this method, attach_external_buffer_unchecked, which doesn't require VariableProfileTable and skip validation against passed buffer.

Attach external buffer to the Model generated from this instance.

If user doesn't attach external buffer, then internal buffer is automatically generaged inside model.

Model lifetime is bounded by buffer internal data.

See the safe version, attach_external_buffer, for more infomation.

Safety

This function is unsafe because it does not check that passed buffer is valid dtype and have enough size.

User must ensure Dtype and size of internal buffer size on oneself.

Build model.

After calling build_model, User can drop the instance of ModelBuilder in arbitary timing.

Trait Implementations

impl<'a, 's> Drop for ModelBuilder<'a, 's>
[src]

Executes the destructor for this type. Read more

Auto Trait Implementations

impl<'a, 's> !Send for ModelBuilder<'a, 's>

impl<'a, 's> !Sync for ModelBuilder<'a, 's>