Enum pliantdb_core::Error[][src]

pub enum Error {
Show variants SchemaMismatch { database_name: String, schema: SchemaName, stored_schema: SchemaName, }, SchemaAlreadyRegistered(SchemaName), SchemaNotRegistered(SchemaName), InvalidDatabaseName(String), DatabaseNotFound(String), DatabaseNameAlreadyTaken(String), Database(String), Server(String), Transport(String), Websocket(String), Networking(Error), Io(String), Configuration(String), Client(String), CollectionNotFound, DocumentNotFound(CollectionNameu64), DocumentConflict(CollectionNameu64), UniqueKeyViolation { view: ViewName, conflicting_document_id: u64, existing_document_id: u64, }, InvalidName(InvalidNameError), PermissionDenied(PermissionDenied),
}
Expand description

an enumeration of errors that this crate can produce

Variants

SchemaMismatch

The database named database_name was created with a different schema (stored_schema) than provided (schema).

Show fields

Fields of SchemaMismatch

database_name: String

The name of the database being accessed.

schema: SchemaName

The schema provided for the database.

stored_schema: SchemaName

The schema stored for the database.

SchemaAlreadyRegistered(SchemaName)

The SchemaName returned has already been registered with this server.

SchemaNotRegistered(SchemaName)

The SchemaName requested was not registered with this server.

InvalidDatabaseName(String)

An invalid database name was specified. See ServerConnection::create_database() for database name requirements.

DatabaseNotFound(String)

The database name given was not found.

DatabaseNameAlreadyTaken(String)

The database name already exists.

Database(String)

An error from interacting with local storage.

Server(String)

An error from interacting with a server.

Transport(String)

An error occurred from the QUIC transport layer.

Websocket(String)

An error occurred from the websocket transport layer.

Networking(Error)

An error occurred from networking.

Io(String)

An error occurred from IO.

Configuration(String)

An error occurred with the provided configuration options.

Client(String)

An error occurred inside of the client.

CollectionNotFound

An attempt to use a Collection with a Database that it wasn’t defined within.

DocumentNotFound(CollectionNameu64)

An attempt to update a document that doesn’t exist.

DocumentConflict(CollectionNameu64)

When updating a document, if a situation is detected where the contents have changed on the server since the Revision provided, a Conflict error will be returned.

UniqueKeyViolation

When saving a document in a collection with unique views, a document emits a key that is already emitted by an existing ocument, this error is returned.

Show fields

Fields of UniqueKeyViolation

view: ViewName

The name of the view that the unique key violation occurred.

conflicting_document_id: u64

The document that caused the violation.

existing_document_id: u64

The document that already uses the same key.

InvalidName(InvalidNameError)

An invalid name was specified during schema creation.

PermissionDenied(PermissionDenied)

Permission was denied.

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

Formats the value using the given formatter. Read more

The lower-level source of this error, if any. Read more

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

Returns a stack backtrace, if available, of where this error occurred. Read more

👎 Deprecated since 1.42.0:

use the Display impl or to_string()

👎 Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Performs the conversion.

Performs the conversion.

Performs the conversion.

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

Performs the conversion.

Performs the conversion.

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)

recently added

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

Converts the given value to a String. 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.