msgspec_dto

class litestar.dto.msgspec_dto.MsgspecDTO[原始碼]

基底類別:AbstractDTO, Generic[T]

Support for domain modelling with Msgspec.

classmethod generate_field_definitions(model_type: type[Struct]) Generator[DTOFieldDefinition, None, None][原始碼]

Generate FieldDefinition instances from model_type.

產出:

FieldDefinition instances.

classmethod detect_nested_field(field_definition: FieldDefinition) bool[原始碼]

Return True if field_definition represents a nested model field.

參數:

field_definition -- inspect type to determine if field represents a nested model.

回傳:

True if field_definition represents a nested model field.