pub struct DataTypeBuilder<T> { /* private fields */ }
Expand description

A builder for DataType.

Implementations§

Create a new DataTypeBuilder.

name should be unique per wrapped type. It does not need to be a valid Ruby identifier.

Enable using the the mark function from <T as DataTypeFunctions>.

Enable using the the size function from <T as DataTypeFunctions>.

Enable using the the compact function from <T as DataTypeFunctions>.

Enable the ‘free_immediately’ flag.

This is safe to do as long as the <T as DataTypeFunctions>::free function or T’s drop function don’t call Ruby in any way.

If safe this should be enabled as this performs better and is more memory efficient.

Enable the ‘write barrier protected’ flag.

You almost certainly don’t want to enable this.

Enable the ‘frozen_shareable’ flag.

Set this if your type is thread safe when the Ruby wrapper object is frozen.

Consume the builder and create a DataType.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.