# CassUserType

### struct CassUserType

A user defined type. 

### Public Functions

### [CassUserType](#_CPPv412CassUserType) \*cass_user_type_new_from_data_type(const [CassDataType](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/struct.CassDataType.md#_CPPv412CassDataType) \*data_type)

Creates a new user defined type from existing data type;

#### SEE ALSO
[cass_user_type_free()](#struct_cass_user_type_1a1c8811aefab13acb4bafd6a10122e644)

* **Parameters:**
  **data_type** – **[in]** 
* **Returns:**
  Returns a user defined type that must be freed. NULL is returned if the data type is not a user defined type.

### void cass_user_type_free([CassUserType](#_CPPv412CassUserType) \*user_type)

Frees a user defined type instance.

* **Parameters:**
  **user_type** – **[in]** 

### const [CassDataType](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/struct.CassDataType.md#_CPPv412CassDataType) \*cass_user_type_data_type(const [CassUserType](#_CPPv412CassUserType) \*user_type)

Gets the data type of a user defined type.

* **Parameters:**
  **user_type** – **[in]** 
* **Returns:**
  Returns a reference to the data type of the user defined type. Do not free this reference as it is bound to the lifetime of the user defined type. 

### [CassError](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.CassError.md#_CPPv49CassError) cass_user_type_set_null([CassUserType](#_CPPv412CassUserType) \*user_type, size_t index)

Sets a null in a user defined type at the specified index.

* **Parameters:**
  * **user_type** – **[in]** 
  * **index** – **[in]** 
* **Returns:**
  CASS_OK if successful, otherwise an error occurred. 

### [CassError](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.CassError.md#_CPPv49CassError) cass_user_type_set_null_by_name([CassUserType](#_CPPv412CassUserType) \*user_type, const char \*name)

Sets a null in a user defined type at the specified name.

* **Parameters:**
  * **user_type** – **[in]** 
  * **name** – **[in]** 
* **Returns:**
  CASS_OK if successful, otherwise an error occurred. 

### [CassError](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.CassError.md#_CPPv49CassError) cass_user_type_set_null_by_name_n([CassUserType](#_CPPv412CassUserType) \*user_type, const char \*name, size_t name_length)

Same as [cass_user_type_set_null_by_name()](#struct_cass_user_type_1a6f81960ac7f594b787214cf0591cd17e), but with lengths for string parameters.

#### SEE ALSO
[cass_user_type_set_null_by_name()](#struct_cass_user_type_1a6f81960ac7f594b787214cf0591cd17e)

* **Parameters:**
  * **user_type** – **[in]** 
  * **name** – **[in]** 
  * **name_length** – **[in]** 
* **Returns:**
  same as [cass_user_type_set_null_by_name()](#struct_cass_user_type_1a6f81960ac7f594b787214cf0591cd17e)

### [CassError](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.CassError.md#_CPPv49CassError) cass_user_type_set_int8([CassUserType](#_CPPv412CassUserType) \*user_type, size_t index, [cass_int8_t](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.BasicTypes.md#_CPPv411cass_int8_t) value)

Sets a “tinyint” in a user defined type at the specified index.

* **Parameters:**
  * **user_type** – **[in]** 
  * **index** – **[in]** 
  * **value** – **[in]** 
* **Returns:**
  CASS_OK if successful, otherwise an error occurred. 

### [CassError](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.CassError.md#_CPPv49CassError) cass_user_type_set_int8_by_name([CassUserType](#_CPPv412CassUserType) \*user_type, const char \*name, [cass_int8_t](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.BasicTypes.md#_CPPv411cass_int8_t) value)

Sets a “tinyint” in a user defined type at the specified name.

* **Parameters:**
  * **user_type** – **[in]** 
  * **name** – **[in]** 
  * **value** – **[in]** 
* **Returns:**
  CASS_OK if successful, otherwise an error occurred. 

### [CassError](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.CassError.md#_CPPv49CassError) cass_user_type_set_int8_by_name_n([CassUserType](#_CPPv412CassUserType) \*user_type, const char \*name, size_t name_length, [cass_int8_t](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.BasicTypes.md#_CPPv411cass_int8_t) value)

Same as [cass_user_type_set_int8_by_name()](#struct_cass_user_type_1ab199e8ba4fcc1369490a59b34ef12d7e), but with lengths for string parameters.

#### SEE ALSO
[cass_user_type_set_int8_by_name()](#struct_cass_user_type_1ab199e8ba4fcc1369490a59b34ef12d7e)

* **Parameters:**
  * **user_type** – **[in]** 
  * **name** – **[in]** 
  * **name_length** – **[in]** 
  * **value** – **[in]** 
* **Returns:**
  same as [cass_user_type_set_int8_by_name()](#struct_cass_user_type_1ab199e8ba4fcc1369490a59b34ef12d7e)

### [CassError](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.CassError.md#_CPPv49CassError) cass_user_type_set_int16([CassUserType](#_CPPv412CassUserType) \*user_type, size_t index, [cass_int16_t](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.BasicTypes.md#_CPPv412cass_int16_t) value)

Sets an “smallint” in a user defined type at the specified index.

* **Parameters:**
  * **user_type** – **[in]** 
  * **index** – **[in]** 
  * **value** – **[in]** 
* **Returns:**
  CASS_OK if successful, otherwise an error occurred. 

### [CassError](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.CassError.md#_CPPv49CassError) cass_user_type_set_int16_by_name([CassUserType](#_CPPv412CassUserType) \*user_type, const char \*name, [cass_int16_t](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.BasicTypes.md#_CPPv412cass_int16_t) value)

Sets an “smallint” in a user defined type at the specified name.

* **Parameters:**
  * **user_type** – **[in]** 
  * **name** – **[in]** 
  * **value** – **[in]** 
* **Returns:**
  CASS_OK if successful, otherwise an error occurred. 

### [CassError](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.CassError.md#_CPPv49CassError) cass_user_type_set_int16_by_name_n([CassUserType](#_CPPv412CassUserType) \*user_type, const char \*name, size_t name_length, [cass_int16_t](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.BasicTypes.md#_CPPv412cass_int16_t) value)

Same as [cass_user_type_set_int16_by_name()](#struct_cass_user_type_1a5478996d7513d5560578a25e9dae521e), but with lengths for string parameters.

#### SEE ALSO
[cass_user_type_set_int16_by_name()](#struct_cass_user_type_1a5478996d7513d5560578a25e9dae521e)

* **Parameters:**
  * **user_type** – **[in]** 
  * **name** – **[in]** 
  * **name_length** – **[in]** 
  * **value** – **[in]** 
* **Returns:**
  same as [cass_user_type_set_int16_by_name()](#struct_cass_user_type_1a5478996d7513d5560578a25e9dae521e)

### [CassError](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.CassError.md#_CPPv49CassError) cass_user_type_set_int32([CassUserType](#_CPPv412CassUserType) \*user_type, size_t index, [cass_int32_t](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.BasicTypes.md#_CPPv412cass_int32_t) value)

Sets an “int” in a user defined type at the specified index.

* **Parameters:**
  * **user_type** – **[in]** 
  * **index** – **[in]** 
  * **value** – **[in]** 
* **Returns:**
  CASS_OK if successful, otherwise an error occurred. 

### [CassError](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.CassError.md#_CPPv49CassError) cass_user_type_set_int32_by_name([CassUserType](#_CPPv412CassUserType) \*user_type, const char \*name, [cass_int32_t](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.BasicTypes.md#_CPPv412cass_int32_t) value)

Sets an “int” in a user defined type at the specified name.

* **Parameters:**
  * **user_type** – **[in]** 
  * **name** – **[in]** 
  * **value** – **[in]** 
* **Returns:**
  CASS_OK if successful, otherwise an error occurred. 

### [CassError](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.CassError.md#_CPPv49CassError) cass_user_type_set_int32_by_name_n([CassUserType](#_CPPv412CassUserType) \*user_type, const char \*name, size_t name_length, [cass_int32_t](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.BasicTypes.md#_CPPv412cass_int32_t) value)

Same as [cass_user_type_set_int32_by_name()](#struct_cass_user_type_1aa825246ff5b17f88929eab8a3b2b8f42), but with lengths for string parameters.

#### SEE ALSO
[cass_user_type_set_int32_by_name()](#struct_cass_user_type_1aa825246ff5b17f88929eab8a3b2b8f42)

* **Parameters:**
  * **user_type** – **[in]** 
  * **name** – **[in]** 
  * **name_length** – **[in]** 
  * **value** – **[in]** 
* **Returns:**
  same as [cass_user_type_set_int32_by_name()](#struct_cass_user_type_1aa825246ff5b17f88929eab8a3b2b8f42)

### [CassError](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.CassError.md#_CPPv49CassError) cass_user_type_set_uint32([CassUserType](#_CPPv412CassUserType) \*user_type, size_t index, [cass_uint32_t](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.BasicTypes.md#_CPPv413cass_uint32_t) value)

Sets a “date” in a user defined type at the specified index.

* **Parameters:**
  * **user_type** – **[in]** 
  * **index** – **[in]** 
  * **value** – **[in]** 
* **Returns:**
  CASS_OK if successful, otherwise an error occurred. 

### [CassError](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.CassError.md#_CPPv49CassError) cass_user_type_set_uint32_by_name([CassUserType](#_CPPv412CassUserType) \*user_type, const char \*name, [cass_uint32_t](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.BasicTypes.md#_CPPv413cass_uint32_t) value)

Sets a “date” in a user defined type at the specified name.

* **Parameters:**
  * **user_type** – **[in]** 
  * **name** – **[in]** 
  * **value** – **[in]** 
* **Returns:**
  CASS_OK if successful, otherwise an error occurred. 

### [CassError](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.CassError.md#_CPPv49CassError) cass_user_type_set_uint32_by_name_n([CassUserType](#_CPPv412CassUserType) \*user_type, const char \*name, size_t name_length, [cass_uint32_t](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.BasicTypes.md#_CPPv413cass_uint32_t) value)

Same as [cass_user_type_set_uint32_by_name()](#struct_cass_user_type_1a33e38c9b01a7ec89545714713318a49c), but with lengths for string parameters.

#### SEE ALSO
[cass_user_type_set_uint32_by_name()](#struct_cass_user_type_1a33e38c9b01a7ec89545714713318a49c)

* **Parameters:**
  * **user_type** – **[in]** 
  * **name** – **[in]** 
  * **name_length** – **[in]** 
  * **value** – **[in]** 
* **Returns:**
  same as [cass_user_type_set_uint32_by_name()](#struct_cass_user_type_1a33e38c9b01a7ec89545714713318a49c)

### [CassError](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.CassError.md#_CPPv49CassError) cass_user_type_set_int64([CassUserType](#_CPPv412CassUserType) \*user_type, size_t index, [cass_int64_t](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.BasicTypes.md#_CPPv412cass_int64_t) value)

Sets an “bigint”, “counter”, “timestamp” or “time” in a user defined type at the specified index.

* **Parameters:**
  * **user_type** – **[in]** 
  * **index** – **[in]** 
  * **value** – **[in]** 
* **Returns:**
  CASS_OK if successful, otherwise an error occurred. 

### [CassError](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.CassError.md#_CPPv49CassError) cass_user_type_set_int64_by_name([CassUserType](#_CPPv412CassUserType) \*user_type, const char \*name, [cass_int64_t](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.BasicTypes.md#_CPPv412cass_int64_t) value)

Sets an “bigint”, “counter”, “timestamp” or “time” in a user defined type at the specified name.

* **Parameters:**
  * **user_type** – **[in]** 
  * **name** – **[in]** 
  * **value** – **[in]** 
* **Returns:**
  CASS_OK if successful, otherwise an error occurred. 

### [CassError](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.CassError.md#_CPPv49CassError) cass_user_type_set_int64_by_name_n([CassUserType](#_CPPv412CassUserType) \*user_type, const char \*name, size_t name_length, [cass_int64_t](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.BasicTypes.md#_CPPv412cass_int64_t) value)

Same as [cass_user_type_set_int64_by_name()](#struct_cass_user_type_1a8750472fa2fca4f999ab4e7fbffb24cb), but with lengths for string parameters.

#### SEE ALSO
[cass_user_type_set_int64_by_name()](#struct_cass_user_type_1a8750472fa2fca4f999ab4e7fbffb24cb)

* **Parameters:**
  * **user_type** – **[in]** 
  * **name** – **[in]** 
  * **name_length** – **[in]** 
  * **value** – **[in]** 
* **Returns:**
  same as [cass_user_type_set_int64_by_name()](#struct_cass_user_type_1a8750472fa2fca4f999ab4e7fbffb24cb)

### [CassError](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.CassError.md#_CPPv49CassError) cass_user_type_set_float([CassUserType](#_CPPv412CassUserType) \*user_type, size_t index, [cass_float_t](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.BasicTypes.md#_CPPv412cass_float_t) value)

Sets a “float” in a user defined type at the specified index.

* **Parameters:**
  * **user_type** – **[in]** 
  * **index** – **[in]** 
  * **value** – **[in]** 
* **Returns:**
  CASS_OK if successful, otherwise an error occurred. 

### [CassError](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.CassError.md#_CPPv49CassError) cass_user_type_set_float_by_name([CassUserType](#_CPPv412CassUserType) \*user_type, const char \*name, [cass_float_t](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.BasicTypes.md#_CPPv412cass_float_t) value)

Sets a “float” in a user defined type at the specified name.

* **Parameters:**
  * **user_type** – **[in]** 
  * **name** – **[in]** 
  * **value** – **[in]** 
* **Returns:**
  CASS_OK if successful, otherwise an error occurred. 

### [CassError](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.CassError.md#_CPPv49CassError) cass_user_type_set_float_by_name_n([CassUserType](#_CPPv412CassUserType) \*user_type, const char \*name, size_t name_length, [cass_float_t](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.BasicTypes.md#_CPPv412cass_float_t) value)

Same as [cass_user_type_set_float_by_name()](#struct_cass_user_type_1ab15befaee4e20d47e7852820841c7f66), but with lengths for string parameters.

#### SEE ALSO
[cass_user_type_set_float_by_name()](#struct_cass_user_type_1ab15befaee4e20d47e7852820841c7f66)

* **Parameters:**
  * **user_type** – **[in]** 
  * **name** – **[in]** 
  * **name_length** – **[in]** 
  * **value** – **[in]** 
* **Returns:**
  same as [cass_user_type_set_float_by_name()](#struct_cass_user_type_1ab15befaee4e20d47e7852820841c7f66)

### [CassError](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.CassError.md#_CPPv49CassError) cass_user_type_set_double([CassUserType](#_CPPv412CassUserType) \*user_type, size_t index, [cass_double_t](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.BasicTypes.md#_CPPv413cass_double_t) value)

Sets an “double” in a user defined type at the specified index.

* **Parameters:**
  * **user_type** – **[in]** 
  * **index** – **[in]** 
  * **value** – **[in]** 
* **Returns:**
  CASS_OK if successful, otherwise an error occurred. 

### [CassError](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.CassError.md#_CPPv49CassError) cass_user_type_set_double_by_name([CassUserType](#_CPPv412CassUserType) \*user_type, const char \*name, [cass_double_t](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.BasicTypes.md#_CPPv413cass_double_t) value)

Sets an “double” in a user defined type at the specified name.

* **Parameters:**
  * **user_type** – **[in]** 
  * **name** – **[in]** 
  * **value** – **[in]** 
* **Returns:**
  CASS_OK if successful, otherwise an error occurred. 

### [CassError](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.CassError.md#_CPPv49CassError) cass_user_type_set_double_by_name_n([CassUserType](#_CPPv412CassUserType) \*user_type, const char \*name, size_t name_length, [cass_double_t](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.BasicTypes.md#_CPPv413cass_double_t) value)

Same as [cass_user_type_set_double_by_name()](#struct_cass_user_type_1a263cb311b4f191ea40a2dab58b2110e2), but with lengths for string parameters.

#### SEE ALSO
[cass_user_type_set_double_by_name()](#struct_cass_user_type_1a263cb311b4f191ea40a2dab58b2110e2)

* **Parameters:**
  * **user_type** – **[in]** 
  * **name** – **[in]** 
  * **name_length** – **[in]** 
  * **value** – **[in]** 
* **Returns:**
  same as [cass_user_type_set_double_by_name()](#struct_cass_user_type_1a263cb311b4f191ea40a2dab58b2110e2)

### [CassError](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.CassError.md#_CPPv49CassError) cass_user_type_set_bool([CassUserType](#_CPPv412CassUserType) \*user_type, size_t index, [cass_bool_t](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.BasicTypes.md#_CPPv411cass_bool_t) value)

Sets a “boolean” in a user defined type at the specified index.

* **Parameters:**
  * **user_type** – **[in]** 
  * **index** – **[in]** 
  * **value** – **[in]** 
* **Returns:**
  CASS_OK if successful, otherwise an error occurred. 

### [CassError](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.CassError.md#_CPPv49CassError) cass_user_type_set_bool_by_name([CassUserType](#_CPPv412CassUserType) \*user_type, const char \*name, [cass_bool_t](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.BasicTypes.md#_CPPv411cass_bool_t) value)

Sets a “boolean” in a user defined type at the specified name.

* **Parameters:**
  * **user_type** – **[in]** 
  * **name** – **[in]** 
  * **value** – **[in]** 
* **Returns:**
  CASS_OK if successful, otherwise an error occurred. 

### [CassError](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.CassError.md#_CPPv49CassError) cass_user_type_set_bool_by_name_n([CassUserType](#_CPPv412CassUserType) \*user_type, const char \*name, size_t name_length, [cass_bool_t](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.BasicTypes.md#_CPPv411cass_bool_t) value)

Same as [cass_user_type_set_double_by_name()](#struct_cass_user_type_1a263cb311b4f191ea40a2dab58b2110e2), but with lengths for string parameters.

#### SEE ALSO
[cass_user_type_set_double_by_name()](#struct_cass_user_type_1a263cb311b4f191ea40a2dab58b2110e2)

* **Parameters:**
  * **user_type** – **[in]** 
  * **name** – **[in]** 
  * **name_length** – **[in]** 
  * **value** – **[in]** 
* **Returns:**
  same as [cass_user_type_set_double_by_name()](#struct_cass_user_type_1a263cb311b4f191ea40a2dab58b2110e2)

### [CassError](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.CassError.md#_CPPv49CassError) cass_user_type_set_string([CassUserType](#_CPPv412CassUserType) \*user_type, size_t index, const char \*value)

Sets an “ascii”, “text” or “varchar” in a user defined type at the specified index.

* **Parameters:**
  * **user_type** – **[in]** 
  * **index** – **[in]** 
  * **value** – **[in]** 
* **Returns:**
  CASS_OK if successful, otherwise an error occurred. 

### [CassError](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.CassError.md#_CPPv49CassError) cass_user_type_set_string_n([CassUserType](#_CPPv412CassUserType) \*user_type, size_t index, const char \*value, size_t value_length)

Same as [cass_user_type_set_string()](#struct_cass_user_type_1a107fa2626760d207083a3feed4f72f6c), but with lengths for string parameters.

#### SEE ALSO
[cass_user_type_set_string()](#struct_cass_user_type_1a107fa2626760d207083a3feed4f72f6c)

* **Parameters:**
  * **user_type** – **[in]** 
  * **index** – **[in]** 
  * **value** – **[in]** 
  * **value_length** – **[in]** 
* **Returns:**
  same as [cass_user_type_set_string()](#struct_cass_user_type_1a107fa2626760d207083a3feed4f72f6c)

### [CassError](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.CassError.md#_CPPv49CassError) cass_user_type_set_string_by_name([CassUserType](#_CPPv412CassUserType) \*user_type, const char \*name, const char \*value)

Sets an “ascii”, “text” or “varchar” in a user defined type at the specified name.

* **Parameters:**
  * **user_type** – **[in]** 
  * **name** – **[in]** 
  * **value** – **[in]** 
* **Returns:**
  CASS_OK if successful, otherwise an error occurred. 

### [CassError](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.CassError.md#_CPPv49CassError) cass_user_type_set_string_by_name_n([CassUserType](#_CPPv412CassUserType) \*user_type, const char \*name, size_t name_length, const char \*value, size_t value_length)

Same as [cass_user_type_set_string_by_name()](#struct_cass_user_type_1a9397b054b6d3c093feaace389c947d10), but with lengths for string parameters.

#### SEE ALSO
[cass_user_type_set_string_by_name()](#struct_cass_user_type_1a9397b054b6d3c093feaace389c947d10)

* **Parameters:**
  * **user_type** – **[in]** 
  * **name** – **[in]** 
  * **name_length** – **[in]** 
  * **value** – **[in]** 
  * **value_length** – **[in]** 
* **Returns:**
  same as [cass_user_type_set_string_by_name()](#struct_cass_user_type_1a9397b054b6d3c093feaace389c947d10)

### [CassError](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.CassError.md#_CPPv49CassError) cass_user_type_set_bytes([CassUserType](#_CPPv412CassUserType) \*user_type, size_t index, const [cass_byte_t](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.BasicTypes.md#_CPPv411cass_byte_t) \*value, size_t value_size)

Sets a “blob” “varint” or “custom” in a user defined type at the specified index.

* **Parameters:**
  * **user_type** – **[in]** 
  * **index** – **[in]** 
  * **value** – **[in]** 
  * **value_size** – **[in]** 
* **Returns:**
  CASS_OK if successful, otherwise an error occurred. 

### [CassError](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.CassError.md#_CPPv49CassError) cass_user_type_set_bytes_by_name([CassUserType](#_CPPv412CassUserType) \*user_type, const char \*name, const [cass_byte_t](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.BasicTypes.md#_CPPv411cass_byte_t) \*value, size_t value_size)

Sets a “blob”, “varint” or “custom” in a user defined type at the specified name.

* **Parameters:**
  * **user_type** – **[in]** 
  * **name** – **[in]** 
  * **value** – **[in]** 
  * **value_size** – **[in]** 
* **Returns:**
  CASS_OK if successful, otherwise an error occurred. 

### [CassError](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.CassError.md#_CPPv49CassError) cass_user_type_set_bytes_by_name_n([CassUserType](#_CPPv412CassUserType) \*user_type, const char \*name, size_t name_length, const [cass_byte_t](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.BasicTypes.md#_CPPv411cass_byte_t) \*value, size_t value_size)

Same as [cass_user_type_set_bytes_by_name()](#struct_cass_user_type_1ad2c2fd99c1dfa1694ea8d55539ba2904), but with lengths for string parameters.

#### SEE ALSO
[cass_user_type_set_bytes_by_name()](#struct_cass_user_type_1ad2c2fd99c1dfa1694ea8d55539ba2904)

* **Parameters:**
  * **user_type** – **[in]** 
  * **name** – **[in]** 
  * **name_length** – **[in]** 
  * **value** – **[in]** 
  * **value_size** – **[in]** 
* **Returns:**
  same as [cass_user_type_set_bytes_by_name()](#struct_cass_user_type_1ad2c2fd99c1dfa1694ea8d55539ba2904)

### [CassError](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.CassError.md#_CPPv49CassError) cass_user_type_set_uuid([CassUserType](#_CPPv412CassUserType) \*user_type, size_t index, [CassUuid](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/struct.CassUuid.md#_CPPv48CassUuid) value)

Sets a “uuid” or “timeuuid” in a user defined type at the specified index.

* **Parameters:**
  * **user_type** – **[in]** 
  * **index** – **[in]** 
  * **value** – **[in]** 
* **Returns:**
  CASS_OK if successful, otherwise an error occurred. 

### [CassError](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.CassError.md#_CPPv49CassError) cass_user_type_set_uuid_by_name([CassUserType](#_CPPv412CassUserType) \*user_type, const char \*name, [CassUuid](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/struct.CassUuid.md#_CPPv48CassUuid) value)

Sets a “uuid” or “timeuuid” in a user defined type at the specified name.

* **Parameters:**
  * **user_type** – **[in]** 
  * **name** – **[in]** 
  * **value** – **[in]** 
* **Returns:**
  CASS_OK if successful, otherwise an error occurred. 

### [CassError](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.CassError.md#_CPPv49CassError) cass_user_type_set_uuid_by_name_n([CassUserType](#_CPPv412CassUserType) \*user_type, const char \*name, size_t name_length, [CassUuid](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/struct.CassUuid.md#_CPPv48CassUuid) value)

Same as [cass_user_type_set_uuid_by_name()](#struct_cass_user_type_1a18dd19386d66d6e866459715933dd3bf), but with lengths for string parameters.

#### SEE ALSO
[cass_user_type_set_uuid_by_name()](#struct_cass_user_type_1a18dd19386d66d6e866459715933dd3bf)

* **Parameters:**
  * **user_type** – **[in]** 
  * **name** – **[in]** 
  * **name_length** – **[in]** 
  * **value** – **[in]** 
* **Returns:**
  same as [cass_user_type_set_uuid_by_name()](#struct_cass_user_type_1a18dd19386d66d6e866459715933dd3bf)

### [CassError](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.CassError.md#_CPPv49CassError) cass_user_type_set_inet([CassUserType](#_CPPv412CassUserType) \*user_type, size_t index, [CassInet](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/struct.CassInet.md#_CPPv48CassInet) value)

Sets a “inet” in a user defined type at the specified index.

* **Parameters:**
  * **user_type** – **[in]** 
  * **index** – **[in]** 
  * **value** – **[in]** 
* **Returns:**
  CASS_OK if successful, otherwise an error occurred. 

### [CassError](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.CassError.md#_CPPv49CassError) cass_user_type_set_inet_by_name([CassUserType](#_CPPv412CassUserType) \*user_type, const char \*name, [CassInet](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/struct.CassInet.md#_CPPv48CassInet) value)

Sets a “inet” in a user defined type at the specified name.

* **Parameters:**
  * **user_type** – **[in]** 
  * **name** – **[in]** 
  * **value** – **[in]** 
* **Returns:**
  CASS_OK if successful, otherwise an error occurred. 

### [CassError](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.CassError.md#_CPPv49CassError) cass_user_type_set_inet_by_name_n([CassUserType](#_CPPv412CassUserType) \*user_type, const char \*name, size_t name_length, [CassInet](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/struct.CassInet.md#_CPPv48CassInet) value)

Same as [cass_user_type_set_inet_by_name()](#struct_cass_user_type_1a2e26d19dcdbd4cddfb9762719894db4b), but with lengths for string parameters.

#### SEE ALSO
[cass_user_type_set_inet_by_name()](#struct_cass_user_type_1a2e26d19dcdbd4cddfb9762719894db4b)

* **Parameters:**
  * **user_type** – **[in]** 
  * **name** – **[in]** 
  * **name_length** – **[in]** 
  * **value** – **[in]** 
* **Returns:**
  same as [cass_user_type_set_inet_by_name()](#struct_cass_user_type_1a2e26d19dcdbd4cddfb9762719894db4b)

### [CassError](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.CassError.md#_CPPv49CassError) cass_user_type_set_decimal([CassUserType](#_CPPv412CassUserType) \*user_type, size_t index, const [cass_byte_t](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.BasicTypes.md#_CPPv411cass_byte_t) \*varint, size_t varint_size, int scale)

Sets an “decimal” in a user defined type at the specified index.

* **Parameters:**
  * **user_type** – **[in]** 
  * **index** – **[in]** 
  * **varint** – **[in]** 
  * **varint_size** – **[in]** 
  * **scale** – **[in]** 
* **Returns:**
  CASS_OK if successful, otherwise an error occurred. 

### [CassError](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.CassError.md#_CPPv49CassError) cass_user_type_set_decimal_by_name([CassUserType](#_CPPv412CassUserType) \*user_type, const char \*name, const [cass_byte_t](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.BasicTypes.md#_CPPv411cass_byte_t) \*varint, size_t varint_size, int scale)

Sets “decimal” in a user defined type at the specified name.

* **Parameters:**
  * **user_type** – **[in]** 
  * **name** – **[in]** 
  * **varint** – **[in]** 
  * **varint_size** – **[in]** 
  * **scale** – **[in]** 
* **Returns:**
  CASS_OK if successful, otherwise an error occurred. 

### [CassError](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.CassError.md#_CPPv49CassError) cass_user_type_set_decimal_by_name_n([CassUserType](#_CPPv412CassUserType) \*user_type, const char \*name, size_t name_length, const [cass_byte_t](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.BasicTypes.md#_CPPv411cass_byte_t) \*varint, size_t varint_size, int scale)

Same as [cass_user_type_set_decimal_by_name()](#struct_cass_user_type_1ac84c0a77bcbf04bb60f349faa08d6893), but with lengths for string parameters.

#### SEE ALSO
[cass_user_type_set_decimal_by_name()](#struct_cass_user_type_1ac84c0a77bcbf04bb60f349faa08d6893)

* **Parameters:**
  * **user_type** – **[in]** 
  * **name** – **[in]** 
  * **name_length** – **[in]** 
  * **varint** – **[in]** 
  * **varint_size** – **[in]** 
  * **scale** – **[in]** 
* **Returns:**
  same as [cass_user_type_set_decimal_by_name()](#struct_cass_user_type_1ac84c0a77bcbf04bb60f349faa08d6893)

### [CassError](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.CassError.md#_CPPv49CassError) cass_user_type_set_duration([CassUserType](#_CPPv412CassUserType) \*user_type, size_t index, [cass_int32_t](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.BasicTypes.md#_CPPv412cass_int32_t) months, [cass_int32_t](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.BasicTypes.md#_CPPv412cass_int32_t) days, [cass_int64_t](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.BasicTypes.md#_CPPv412cass_int64_t) nanos)

Sets a “duration” in a user defined type at the specified index.

**Requires Apache Cassandra:** 3.10+

* **Parameters:**
  * **user_type** – **[in]** 
  * **index** – **[in]** 
  * **months** – **[in]** 
  * **days** – **[in]** 
  * **nanos** – **[in]** 
* **Returns:**
  CASS_OK if successful, otherwise an error occurred. 

### [CassError](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.CassError.md#_CPPv49CassError) cass_user_type_set_duration_by_name([CassUserType](#_CPPv412CassUserType) \*user_type, const char \*name, [cass_int32_t](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.BasicTypes.md#_CPPv412cass_int32_t) months, [cass_int32_t](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.BasicTypes.md#_CPPv412cass_int32_t) days, [cass_int64_t](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.BasicTypes.md#_CPPv412cass_int64_t) nanos)

Sets “duration” in a user defined type at the specified name.

**Requires Apache Cassandra:** 3.10+

* **Parameters:**
  * **user_type** – **[in]** 
  * **name** – **[in]** 
  * **months** – **[in]** 
  * **days** – **[in]** 
  * **nanos** – **[in]** 
* **Returns:**
  CASS_OK if successful, otherwise an error occurred. 

### [CassError](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.CassError.md#_CPPv49CassError) cass_user_type_set_duration_by_name_n([CassUserType](#_CPPv412CassUserType) \*user_type, const char \*name, size_t name_length, [cass_int32_t](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.BasicTypes.md#_CPPv412cass_int32_t) months, [cass_int32_t](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.BasicTypes.md#_CPPv412cass_int32_t) days, [cass_int64_t](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.BasicTypes.md#_CPPv412cass_int64_t) nanos)

Same as [cass_user_type_set_duration_by_name()](#struct_cass_user_type_1afd4307e7a0c2287f8d30753feb377156), but with lengths for string parameters.

**Requires Apache Cassandra:** 3.10+

#### SEE ALSO
[cass_user_type_set_duration_by_name()](#struct_cass_user_type_1afd4307e7a0c2287f8d30753feb377156)

* **Parameters:**
  * **user_type** – **[in]** 
  * **name** – **[in]** 
  * **name_length** – **[in]** 
  * **months** – **[in]** 
  * **days** – **[in]** 
  * **nanos** – **[in]** 
* **Returns:**
  same as [cass_user_type_set_duration_by_name()](#struct_cass_user_type_1afd4307e7a0c2287f8d30753feb377156)

### [CassError](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.CassError.md#_CPPv49CassError) cass_user_type_set_collection([CassUserType](#_CPPv412CassUserType) \*user_type, size_t index, const [CassCollection](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/struct.CassCollection.md#_CPPv414CassCollection) \*value)

Sets a “list”, “map” or “set” in a user defined type at the specified index.

* **Parameters:**
  * **user_type** – **[in]** 
  * **index** – **[in]** 
  * **value** – **[in]** 
* **Returns:**
  CASS_OK if successful, otherwise an error occurred. 

### [CassError](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.CassError.md#_CPPv49CassError) cass_user_type_set_collection_by_name([CassUserType](#_CPPv412CassUserType) \*user_type, const char \*name, const [CassCollection](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/struct.CassCollection.md#_CPPv414CassCollection) \*value)

Sets a “list”, “map” or “set” in a user defined type at the specified name.

* **Parameters:**
  * **user_type** – **[in]** 
  * **name** – **[in]** 
  * **value** – **[in]** 
* **Returns:**
  CASS_OK if successful, otherwise an error occurred. 

### [CassError](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.CassError.md#_CPPv49CassError) cass_user_type_set_collection_by_name_n([CassUserType](#_CPPv412CassUserType) \*user_type, const char \*name, size_t name_length, const [CassCollection](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/struct.CassCollection.md#_CPPv414CassCollection) \*value)

Same as [cass_user_type_set_collection_by_name()](#struct_cass_user_type_1a00ec1ae67f4cf4f8a5242b19043cb639), but with lengths for string parameters.

#### SEE ALSO
[cass_user_type_set_collection_by_name()](#struct_cass_user_type_1a00ec1ae67f4cf4f8a5242b19043cb639)

* **Parameters:**
  * **user_type** – **[in]** 
  * **name** – **[in]** 
  * **name_length** – **[in]** 
  * **value** – **[in]** 
* **Returns:**
  same as [cass_user_type_set_collection_by_name()](#struct_cass_user_type_1a00ec1ae67f4cf4f8a5242b19043cb639)

### [CassError](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.CassError.md#_CPPv49CassError) cass_user_type_set_tuple([CassUserType](#_CPPv412CassUserType) \*user_type, size_t index, const [CassTuple](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/struct.CassTuple.md#_CPPv49CassTuple) \*value)

Sets a “tuple” in a user defined type at the specified index.

* **Parameters:**
  * **user_type** – **[in]** 
  * **index** – **[in]** 
  * **value** – **[in]** 
* **Returns:**
  CASS_OK if successful, otherwise an error occurred. 

### [CassError](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.CassError.md#_CPPv49CassError) cass_user_type_set_tuple_by_name([CassUserType](#_CPPv412CassUserType) \*user_type, const char \*name, const [CassTuple](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/struct.CassTuple.md#_CPPv49CassTuple) \*value)

Sets a “tuple” in a user defined type at the specified name.

* **Parameters:**
  * **user_type** – **[in]** 
  * **name** – **[in]** 
  * **value** – **[in]** 
* **Returns:**
  CASS_OK if successful, otherwise an error occurred. 

### [CassError](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.CassError.md#_CPPv49CassError) cass_user_type_set_tuple_by_name_n([CassUserType](#_CPPv412CassUserType) \*user_type, const char \*name, size_t name_length, const [CassTuple](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/struct.CassTuple.md#_CPPv49CassTuple) \*value)

Same as [cass_user_type_set_tuple_by_name()](#struct_cass_user_type_1a102e06e74e482d3249957928adf8e77a), but with lengths for string parameters.

#### SEE ALSO
[cass_user_type_set_tuple_by_name()](#struct_cass_user_type_1a102e06e74e482d3249957928adf8e77a)

* **Parameters:**
  * **user_type** – **[in]** 
  * **name** – **[in]** 
  * **name_length** – **[in]** 
  * **value** – **[in]** 
* **Returns:**
  same as [cass_user_type_set_tuple_by_name()](#struct_cass_user_type_1a102e06e74e482d3249957928adf8e77a)

### [CassError](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.CassError.md#_CPPv49CassError) cass_user_type_set_user_type([CassUserType](#_CPPv412CassUserType) \*user_type, size_t index, const [CassUserType](#_CPPv412CassUserType) \*value)

Sets a user defined type in a user defined type at the specified index.

* **Parameters:**
  * **user_type** – **[in]** 
  * **index** – **[in]** 
  * **value** – **[in]** 
* **Returns:**
  CASS_OK if successful, otherwise an error occurred. 

### [CassError](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.CassError.md#_CPPv49CassError) cass_user_type_set_user_type_by_name([CassUserType](#_CPPv412CassUserType) \*user_type, const char \*name, const [CassUserType](#_CPPv412CassUserType) \*value)

Sets a user defined type in a user defined type at the specified name.

* **Parameters:**
  * **user_type** – **[in]** 
  * **name** – **[in]** 
  * **value** – **[in]** 
* **Returns:**
  CASS_OK if successful, otherwise an error occurred. 

### [CassError](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.CassError.md#_CPPv49CassError) cass_user_type_set_user_type_by_name_n([CassUserType](#_CPPv412CassUserType) \*user_type, const char \*name, size_t name_length, const [CassUserType](#_CPPv412CassUserType) \*value)

Same as [cass_user_type_set_user_type_by_name()](#struct_cass_user_type_1a9b40daf04dcd3841f597e184b8988f64), but with lengths for string parameters.

#### SEE ALSO
[cass_user_type_set_user_type_by_name()](#struct_cass_user_type_1a9b40daf04dcd3841f597e184b8988f64)

* **Parameters:**
  * **user_type** – **[in]** 
  * **name** – **[in]** 
  * **name_length** – **[in]** 
  * **value** – **[in]** 
* **Returns:**
  same as [cass_user_type_set_user_type_by_name()](#struct_cass_user_type_1a9b40daf04dcd3841f597e184b8988f64)

### [CassError](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.CassError.md#_CPPv49CassError) cass_user_type_set_custom([CassUserType](#_CPPv412CassUserType) \*user_type, size_t index, const char \*class_name, const [cass_byte_t](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.BasicTypes.md#_CPPv411cass_byte_t) \*value, size_t value_size)

Sets a “custom” in a user defined type at the specified index.

* **Parameters:**
  * **user_type** – **[in]** 
  * **index** – **[in]** 
  * **class_name** – **[in]** 
  * **value** – **[in]** 
  * **value_size** – **[in]** 
* **Returns:**
  CASS_OK if successful, otherwise an error occurred. 

### [CassError](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.CassError.md#_CPPv49CassError) cass_user_type_set_custom_n([CassUserType](#_CPPv412CassUserType) \*user_type, size_t index, const char \*class_name, size_t class_name_length, const [cass_byte_t](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.BasicTypes.md#_CPPv411cass_byte_t) \*value, size_t value_size)

Same as [cass_user_type_set_custom()](#struct_cass_user_type_1af573f9b768f51e06c6f2e18cc24e5752), but with lengths for string parameters.

#### SEE ALSO
[cass_user_type_set_custom()](#struct_cass_user_type_1af573f9b768f51e06c6f2e18cc24e5752)

* **Parameters:**
  * **user_type** – **[in]** 
  * **index** – **[in]** 
  * **class_name** – **[in]** 
  * **class_name_length** – **[in]** 
  * **value** – **[in]** 
  * **value_size** – **[in]** 
* **Returns:**
  same as [cass_user_type_set_custom()](#struct_cass_user_type_1af573f9b768f51e06c6f2e18cc24e5752)

### [CassError](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.CassError.md#_CPPv49CassError) cass_user_type_set_custom_by_name([CassUserType](#_CPPv412CassUserType) \*user_type, const char \*name, const char \*class_name, const [cass_byte_t](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.BasicTypes.md#_CPPv411cass_byte_t) \*value, size_t value_size)

Sets a “custom” in a user defined type at the specified name.

* **Parameters:**
  * **user_type** – **[in]** 
  * **name** – **[in]** 
  * **class_name** – **[in]** 
  * **value** – **[in]** 
  * **value_size** – **[in]** 
* **Returns:**
  CASS_OK if successful, otherwise an error occurred. 

### [CassError](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.CassError.md#_CPPv49CassError) cass_user_type_set_custom_by_name_n([CassUserType](#_CPPv412CassUserType) \*user_type, const char \*name, size_t name_length, const char \*class_name, size_t class_name_length, const [cass_byte_t](https://cpp-rs-driver.docs.scylladb.com/v1.1.0/api/group.BasicTypes.md#_CPPv411cass_byte_t) \*value, size_t value_size)

Same as [cass_user_type_set_custom_by_name()](#struct_cass_user_type_1af2913696100f0c97245eefdc22b38339), but with lengths for string parameters.

#### SEE ALSO
[cass_user_type_set_custom_by_name()](#struct_cass_user_type_1af2913696100f0c97245eefdc22b38339)

* **Parameters:**
  * **user_type** – **[in]** 
  * **name** – **[in]** 
  * **name_length** – **[in]** 
  * **class_name** – **[in]** 
  * **class_name_length** – **[in]** 
  * **value** – **[in]** 
  * **value_size** – **[in]** 
* **Returns:**
  same as [cass_user_type_set_custom_by_name()](#struct_cass_user_type_1af2913696100f0c97245eefdc22b38339)
