mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
55 lines
1.3 KiB
Rust
55 lines
1.3 KiB
Rust
pub enum TypeCategory {
|
|
Array,
|
|
Map,
|
|
Str,
|
|
Protobuf,
|
|
Bytes,
|
|
Enum,
|
|
Opt,
|
|
Primitive,
|
|
}
|
|
// auto generate, do not edit
|
|
pub fn category_from_str(type_str: &str) -> TypeCategory {
|
|
match type_str {
|
|
"Vec" => TypeCategory::Array,
|
|
"HashMap" => TypeCategory::Map,
|
|
"u8" => TypeCategory::Bytes,
|
|
"String" => TypeCategory::Str,
|
|
"KeyValue"
|
|
| "CreateAppRequest"
|
|
| "ColorStyle"
|
|
| "App"
|
|
| "UpdateAppRequest"
|
|
| "UpdateWorkspaceRequest"
|
|
| "CreateWorkspaceRequest"
|
|
| "Workspace"
|
|
| "UserWorkspace"
|
|
| "UserWorkspaceDetail"
|
|
| "CreateViewRequest"
|
|
| "View"
|
|
| "WorkspaceError"
|
|
| "FFIRequest"
|
|
| "FFIResponse"
|
|
| "UserDetail"
|
|
| "UpdateUserRequest"
|
|
| "SignUpRequest"
|
|
| "SignUpParams"
|
|
| "SignUpResponse"
|
|
| "SignInRequest"
|
|
| "SignInParams"
|
|
| "UserError"
|
|
=> TypeCategory::Protobuf,
|
|
"ViewTypeIdentifier"
|
|
| "WorkspaceEvent"
|
|
| "WorkspaceErrorCode"
|
|
| "FFIStatusCode"
|
|
| "UserStatus"
|
|
| "UserEvent"
|
|
| "UserErrorCode"
|
|
=> TypeCategory::Enum,
|
|
|
|
"Option" => TypeCategory::Opt,
|
|
_ => TypeCategory::Primitive,
|
|
}
|
|
}
|