Struct rincon_session::ArangoSession [] [src]

pub struct ArangoSession<C> { /* fields omitted */ }

A session for administrating databases and users.

An ArangoSession defines the entry point to the session api. It basically determines which Connector implementation shall be used in an application and provides functions for administrating databases and users.

Methods

impl<C> ArangoSession<C> where
    C: 'static + Connector
[src]

[src]

Instantiates a new ArangoSession using the given Connector.

[src]

Executes an API method applied to the system database.

[src]

Gets the server name and version number.

[src]

Gets the server name and version number with additional details.

[src]

Gets the database version a server requires.

[src]

Returns a new DatabaseSession for the system database.

In ArangoDB the system database usually has the name _system.

[src]

Returns a new DatabaseSession for the given database name.

[src]

Creates a new database with the given attributes.

If the database could be created successfully a DatabaseSession using the just created database is returned.

The user provided with the Connector must have permission to access the system database in order to execute this method.

Arguments

  • name : the name of the database to be created
  • users : a list of users to be assigned to the new database

[src]

Drops an existing database with the given name.

Returns true if the database has been dropped successfully.

[src]

Retrieves a list of all existing databases.

The user set in the Connector must have permission to read from the system database in order to execute this method.

[src]

Retrieves a list of all databases the current user has access to.

[src]

Creates a new user with default options.

The created user will not have access to any database until database access privileges are explicitly granted to it.

The user set in the Connector must have permission to write to the system database in order to execute this method.

[src]

Creates a new user with extra information.

The created user will not have access to any database until database access privileges are explicitly granted to it.

The user set in the Connector must have permission to write to the system database in order to execute this method.

[src]

Deletes an existing user with the given name.

The user set in the Connector must have permission to write to the system database in order to execute this method.

[src]

Fetches data about a user with the given name.

This method can fetch data about the user set in the Connector. To retrieve data about any user the user set in the Connector must have permission to read from the system database.

[src]

Fetches data about all available users.

The user set in the Connector must have permission to read from the system database in order to execute this method.

[src]

Partially updates the data of an existing user.

The password can only be changed for the user set in the Connector. To change the active status the user set in the Connector must have permission to write to the system database.

Arguments

  • username : the name of the user for which the data shall be replaced
  • updates : the data to be updated for the given user

[src]

Replaces the data of an existing user.

The password can only be changed for the user set in the Connector. To change the active status the user set in the Connector must have permission to write to the system database.

Arguments

  • username : the name of the user for which the data shall be replaced
  • updates : the new data of the user

[src]

Lists all databases accessible by the given user.

The user set in the Connector must have permission to read from the system database in order to execute this method.

[src]

Sets the default access level for databases for the given user.

The user set in the Connector must have permission to write to the system database in order to execute this method.

Arguments

  • username : the name of the user for which to grant default access
  • permission : the access level to grant

[src]

Sets the default access level for collections for the given user.

The user set in the Connector must have permission to write to the system database in order to execute this method.

Arguments

  • username : the name of the user for which to grant default access
  • permission : the access level to grant

[src]

Gets the effective access level to the specified database for the given user.

The user set in the Connector must have permission to read from the system database in order to execute this method.

Arguments

  • username : the name of the user for which the permissions are queried
  • database : the name of the database for which the permissions are queried

[src]

Grants access to the specified database for the given user.

The user set in the Connector must have permission to write to the system database in order to execute this method.

Arguments

  • username : the name of the user for which access shall be granted
  • database : the name of the database to which access shall be granted
  • permission : the access level that shall be granted

[src]

Revokes the access to the specified database for the given user.

After this call the given user has no access to the specified database.

The user set in the Connector must have permission to write to the system database in order to execute this method.

Arguments

  • username : the name of the user for which access shall be revoked
  • database : the name of the database from which access shall be revoked

[src]

Resets the access to the specified database for the given user to the default access level.

After this call the default access level to the database is applied for the given user.

The user set in the Connector must have permission to write to the system database in order to execute this method.

Arguments

  • username : the name of the user for which access shall be reset to the default
  • database : the name of the database for which access shall be reset to the default

[src]

Gets the effective access level to the specified collection for the given user.

The user set in the Connector must have permission to read from the system database in order to execute this method.

Arguments

  • username : the name of the user for which the permissions are queried
  • database : the name of the database where the collection is located in
  • collection : the name of the collection for which the permissions are queried

[src]

Grants access to the specified collection for the given user.

The user set in the Connector must have permission to write to the system database in order to execute this method.

Arguments

  • username : the name of the user for which access shall be granted
  • database : the name of the database where the collection is located
  • collection : the name of the collection to which access shall be granted
  • permission : the access level that shall be granted

[src]

Revokes the access to the specified collection for the given user.

After this call the given user has no access to the specified collection.

The user set in the Connector must have permission to write to the system database in order to execute this method.

Arguments

  • username : the name of the user for which access shall be revoked
  • database : the name of the database where the collection is located
  • collection : the name of the collection from which access shall be revoked

[src]

Resets the access to the specified collection for the given user to the default access level.

After this call the default access level to the collection is applied for the given user.

The user set in the Connector must have permission to write to the system database in order to execute this method.

Arguments

  • username : the name of the user for which access shall be reset to the default
  • database : the name of the database where the collection is located
  • collection : the name of the collection for which access shall be reset to the default

Trait Implementations

impl<C: Debug> Debug for ArangoSession<C>
[src]

[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<C> !Send for ArangoSession<C>

impl<C> !Sync for ArangoSession<C>