pub enum ServerRequest {
    CreateDatabase {
        database: Database,
        only_if_needed: bool,
    },
    DeleteDatabase {
        name: String,
    },
    ListDatabases,
    ListAvailableSchemas,
    CreateUser {
        username: String,
    },
    SetUserPassword {
        user: NamedReference<'static, u64>,
        password: SensitiveString,
    },
    Authenticate {
        user: NamedReference<'static, u64>,
        authentication: Authentication,
    },
    AlterUserPermissionGroupMembership {
        user: NamedReference<'static, u64>,
        group: NamedReference<'static, u64>,
        should_be_member: bool,
    },
    AlterUserRoleMembership {
        user: NamedReference<'static, u64>,
        role: NamedReference<'static, u64>,
        should_be_member: bool,
    },
}
Expand description

A server-related request.

Variants

CreateDatabase

Fields

database: Database

The database to create.

only_if_needed: bool

Only attempts to create the database if it doesn’t already exist.

Creates a database.

DeleteDatabase

Fields

name: String

The name of the database to delete.

Deletes the database named name

ListDatabases

Lists all databases.

ListAvailableSchemas

Lists available schemas.

CreateUser

Fields

username: String

The unique username of the user to create.

Creates a user.

SetUserPassword

Fields

user: NamedReference<'static, u64>

The username or id of the user.

password: SensitiveString

The user’s new password.

Set’s a user’s password.

Authenticate

Fields

user: NamedReference<'static, u64>

The username or id of the user.

authentication: Authentication

The method of authentication.

Authenticate as a user.

AlterUserPermissionGroupMembership

Fields

user: NamedReference<'static, u64>

The username or id of the user.

group: NamedReference<'static, u64>

The name or id of the group.

should_be_member: bool

Whether the user should be in the group.

Alter’s a user’s membership in a permission group.

AlterUserRoleMembership

Fields

user: NamedReference<'static, u64>

The username or id of the user.

role: NamedReference<'static, u64>

The name or id of the role.

should_be_member: bool

Whether the user should have the role.

Alter’s a user’s role

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

Serialize this value into the given Serde serializer. Read more

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.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

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.