BaseModel

Trait BaseModel 

Source
pub trait BaseModel: Serialize + DeserializeOwned {
    const NAME: &'static str;

    // Required methods
    fn columns(prefix: Option<&str>) -> BTreeMap<&'static str, CompactString>;
    fn map(prefix: Option<&str>, row: &PgRow) -> Result<Self, DatabaseError>;

    // Provided method
    fn columns_sql(prefix: Option<&str>) -> CompactString { ... }
}

Required Associated Constants§

Source

const NAME: &'static str

Required Methods§

Source

fn columns(prefix: Option<&str>) -> BTreeMap<&'static str, CompactString>

Source

fn map(prefix: Option<&str>, row: &PgRow) -> Result<Self, DatabaseError>

Provided Methods§

Source

fn columns_sql(prefix: Option<&str>) -> CompactString

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl BaseModel for AdminActivity

Source§

const NAME: &'static str = "admin_activity"

Source§

impl BaseModel for BackupConfiguration

Source§

const NAME: &'static str = "backup_configuration"

Source§

impl BaseModel for DatabaseHost

Source§

const NAME: &'static str = "database_host"

Source§

impl BaseModel for EggRepository

Source§

const NAME: &'static str = "egg_repository"

Source§

impl BaseModel for EggRepositoryEgg

Source§

const NAME: &'static str = "egg_repository_egg"

Source§

impl BaseModel for Location

Source§

const NAME: &'static str = "location"

Source§

impl BaseModel for LocationDatabaseHost

Source§

const NAME: &'static str = "location_database_host"

Source§

impl BaseModel for Mount

Source§

const NAME: &'static str = "mount"

Source§

impl BaseModel for Nest

Source§

const NAME: &'static str = "nest"

Source§

impl BaseModel for NestEgg

Source§

const NAME: &'static str = "nest_egg"

Source§

impl BaseModel for NestEggMount

Source§

const NAME: &'static str = "nest_egg_mount"

Source§

impl BaseModel for NestEggVariable

Source§

const NAME: &'static str = "nest_egg_variable"

Source§

impl BaseModel for Node

Source§

const NAME: &'static str = "node"

Source§

impl BaseModel for NodeAllocation

Source§

const NAME: &'static str = "node_allocation"

Source§

impl BaseModel for NodeMount

Source§

const NAME: &'static str = "node_mount"

Source§

impl BaseModel for OAuthProvider

Source§

const NAME: &'static str = "oauth_provider"

Source§

impl BaseModel for Role

Source§

const NAME: &'static str = "role"

Source§

impl BaseModel for Server

Source§

const NAME: &'static str = "server"

Source§

impl BaseModel for ServerActivity

Source§

const NAME: &'static str = "server_activity"

Source§

impl BaseModel for ServerAllocation

Source§

const NAME: &'static str = "server_allocation"

Source§

impl BaseModel for ServerBackup

Source§

const NAME: &'static str = "server_backup"

Source§

impl BaseModel for ServerDatabase

Source§

const NAME: &'static str = "server_database"

Source§

impl BaseModel for ServerMount

Source§

const NAME: &'static str = "server_mount"

Source§

impl BaseModel for ServerSchedule

Source§

const NAME: &'static str = "server_schedule"

Source§

impl BaseModel for ServerScheduleStep

Source§

const NAME: &'static str = "server_schedule_step"

Source§

impl BaseModel for ServerSubuser

Source§

const NAME: &'static str = "server_subuser"

Source§

impl BaseModel for ServerVariable

Source§

const NAME: &'static str = "server_variable"

Source§

impl BaseModel for User

Source§

const NAME: &'static str = "user"

Source§

impl BaseModel for UserActivity

Source§

const NAME: &'static str = "user_activity"

Source§

impl BaseModel for UserApiKey

Source§

const NAME: &'static str = "user_api_key"

Source§

impl BaseModel for UserCommandSnippet

Source§

const NAME: &'static str = "user_command_snippet"

Source§

const NAME: &'static str = "user_oauth_link"

Source§

impl BaseModel for UserPasswordReset

Source§

const NAME: &'static str = "user_password_reset"

Source§

impl BaseModel for UserRecoveryCode

Source§

const NAME: &'static str = "user_recovery_code"

Source§

impl BaseModel for UserSecurityKey

Source§

const NAME: &'static str = "user_security_key"

Source§

impl BaseModel for UserServerGroup

Source§

const NAME: &'static str = "user_server_group"

Source§

impl BaseModel for UserSession

Source§

const NAME: &'static str = "user_session"

Source§

impl BaseModel for UserSshKey

Source§

const NAME: &'static str = "user_ssh_key"