Enum dossier::schema::DossierFiles
source · pub enum DossierFiles {}
Trait Implementations§
source§impl Debug for DossierFiles
impl Debug for DossierFiles
source§impl FileConfig for DossierFiles
impl FileConfig for DossierFiles
§type Metadata = Option<Metadata>
type Metadata = Option<Metadata>
The type of the
metadata
stored in File
. If you do
not need to store metadata, you can set this type to ()
.source§const BLOCK_SIZE: usize = 65_536usize
const BLOCK_SIZE: usize = 65_536usize
The maximum size for each write to an underlying file. The file will be
stored by breaking the data written into chunks no larger than
BLOCK_SIZE
.source§fn files_name() -> CollectionName
fn files_name() -> CollectionName
Returns the unique collection name to use to store [
File
s][direct::File].source§fn blocks_name() -> CollectionName
fn blocks_name() -> CollectionName
Returns the unique collection name to use to store file blocks.
§fn register_collections(schema: &mut Schematic) -> Result<(), Error>
fn register_collections(schema: &mut Schematic) -> Result<(), Error>
Registers the collections for this configuration into
schema
.§fn build_with_metadata<NameOrPath>(
name_or_path: NameOrPath,
metadata: Self::Metadata
) -> FileBuilder<'static, Self>where
NameOrPath: AsRef<str>,
fn build_with_metadata<NameOrPath>(
name_or_path: NameOrPath,
metadata: Self::Metadata
) -> FileBuilder<'static, Self>where
NameOrPath: AsRef<str>,
Builds a new file. If
name_or_path
starts with a /
, the argument is
treated as a full path to the file being built. Otherwise, the argument
is treated as the file’s name. The file’s metadata will be metadata
upon creation. The file’s metadata will be metadata
upon creation.§fn get<Database>(
id: u32,
database: &Database
) -> Result<Option<File<Blocking<Database>, Self>>, Error>where
Database: Connection + Clone,
fn get<Database>(
id: u32,
database: &Database
) -> Result<Option<File<Blocking<Database>, Self>>, Error>where
Database: Connection + Clone,
Returns the file with the unique
id
given, if found. This function
only loads metadata about the file, it does not load the contents of the
file.§fn load<Database>(
path: &str,
database: &Database
) -> Result<Option<File<Blocking<Database>, Self>>, Error>where
Database: Connection + Clone,
fn load<Database>(
path: &str,
database: &Database
) -> Result<Option<File<Blocking<Database>, Self>>, Error>where
Database: Connection + Clone,
Returns the file located at
path
, if found. This function
only loads metadata about the file, it does not load the contents of the
file.§fn load_or_create_with_metadata<Database>(
path: &str,
metadata: Self::Metadata,
expect_present: bool,
database: &Database
) -> Result<File<Blocking<Database>, Self>, Error>where
Database: Connection + Clone,
fn load_or_create_with_metadata<Database>(
path: &str,
metadata: Self::Metadata,
expect_present: bool,
database: &Database
) -> Result<File<Blocking<Database>, Self>, Error>where
Database: Connection + Clone,
Returns the file locate at
path
, or creates an empty file if not
currently present. Read more§fn delete<Database>(path: &str, database: &Database) -> Result<bool, Error>where
Database: Connection + Clone,
fn delete<Database>(path: &str, database: &Database) -> Result<bool, Error>where
Database: Connection + Clone,
Deletes the file at
path
. Returns true if a file was deleted. Does not
error if the file is not found.§fn list<Database>(
path: &str,
database: &Database
) -> Result<Vec<File<Blocking<Database>, Self>, Global>, Error>where
Database: Connection + Clone,
fn list<Database>(
path: &str,
database: &Database
) -> Result<Vec<File<Blocking<Database>, Self>, Global>, Error>where
Database: Connection + Clone,
Returns all files that have a containing path of exactly
path
. It will
only return files that have been created, and will not return “virtual”
directories that are part of a file’s path but have never been created. Read more§fn list_recursive<Database>(
path: &str,
database: &Database
) -> Result<Vec<File<Blocking<Database>, Self>, Global>, Error>where
Database: Connection + Clone,
fn list_recursive<Database>(
path: &str,
database: &Database
) -> Result<Vec<File<Blocking<Database>, Self>, Global>, Error>where
Database: Connection + Clone,
Returns all files that have a path starting with
path
. Read more§fn stats<Database>(database: &Database) -> Result<Statistics, Error>where
Database: Connection + Clone,
fn stats<Database>(database: &Database) -> Result<Statistics, Error>where
Database: Connection + Clone,
Returns statistics for all files contained within this collection. This
is equivalent to calling [
Self::stats_for_path
] with "/"
for the
path.§fn stats_for_path<Database>(
path: &str,
database: &Database
) -> Result<Statistics, Error>where
Database: Connection + Clone,
fn stats_for_path<Database>(
path: &str,
database: &Database
) -> Result<Statistics, Error>where
Database: Connection + Clone,
Returns statistics for all files whose path starts with
path
.§fn get_async<'life0, 'async_trait, Database>(
id: u32,
database: &'life0 Database
) -> Pin<Box<dyn Future<Output = Result<Option<File<Async<Database>, Self>>, Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
Database: 'async_trait + AsyncConnection + Clone,
Self: 'async_trait,
fn get_async<'life0, 'async_trait, Database>(
id: u32,
database: &'life0 Database
) -> Pin<Box<dyn Future<Output = Result<Option<File<Async<Database>, Self>>, Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
Database: 'async_trait + AsyncConnection + Clone,
Self: 'async_trait,
Returns the file with the unique
id
given, if found. This function
only loads metadata about the file, it does not load the contents of the
file.§fn load_async<'life0, 'life1, 'async_trait, Database>(
path: &'life0 str,
database: &'life1 Database
) -> Pin<Box<dyn Future<Output = Result<Option<File<Async<Database>, Self>>, Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
'life1: 'async_trait,
Database: 'async_trait + AsyncConnection + Clone,
Self: 'async_trait,
fn load_async<'life0, 'life1, 'async_trait, Database>(
path: &'life0 str,
database: &'life1 Database
) -> Pin<Box<dyn Future<Output = Result<Option<File<Async<Database>, Self>>, Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
'life1: 'async_trait,
Database: 'async_trait + AsyncConnection + Clone,
Self: 'async_trait,
Returns the file located at
path
, if found. This function
only loads metadata about the file, it does not load the contents of the
file.§fn load_or_create_with_metadata_async<'life0, 'life1, 'async_trait, Database>(
path: &'life0 str,
metadata: Self::Metadata,
expect_present: bool,
database: &'life1 Database
) -> Pin<Box<dyn Future<Output = Result<File<Async<Database>, Self>, Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
'life1: 'async_trait,
Database: 'async_trait + AsyncConnection + Clone,
Self: 'async_trait,
fn load_or_create_with_metadata_async<'life0, 'life1, 'async_trait, Database>(
path: &'life0 str,
metadata: Self::Metadata,
expect_present: bool,
database: &'life1 Database
) -> Pin<Box<dyn Future<Output = Result<File<Async<Database>, Self>, Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
'life1: 'async_trait,
Database: 'async_trait + AsyncConnection + Clone,
Self: 'async_trait,
Returns the file locate at
path
, or creates an empty file if not
currently present. Read more§fn delete_async<'life0, 'life1, 'async_trait, Database>(
path: &'life0 str,
database: &'life1 Database
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
'life1: 'async_trait,
Database: 'async_trait + AsyncConnection + Clone,
Self: 'async_trait,
fn delete_async<'life0, 'life1, 'async_trait, Database>(
path: &'life0 str,
database: &'life1 Database
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
'life1: 'async_trait,
Database: 'async_trait + AsyncConnection + Clone,
Self: 'async_trait,
Deletes the file at
path
. Returns true if a file was deleted. Does not
error if the file is not found.§fn list_async<'life0, 'life1, 'async_trait, Database>(
path: &'life0 str,
database: &'life1 Database
) -> Pin<Box<dyn Future<Output = Result<Vec<File<Async<Database>, Self>, Global>, Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
'life1: 'async_trait,
Database: 'async_trait + AsyncConnection + Clone,
Self: 'async_trait,
fn list_async<'life0, 'life1, 'async_trait, Database>(
path: &'life0 str,
database: &'life1 Database
) -> Pin<Box<dyn Future<Output = Result<Vec<File<Async<Database>, Self>, Global>, Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
'life1: 'async_trait,
Database: 'async_trait + AsyncConnection + Clone,
Self: 'async_trait,
Returns all files that have a containing path of exactly
path
. It will
only return files that have been created, and will not return “virtual”
directories that are part of a file’s path but have never been created. Read more§fn list_recursive_async<'life0, 'life1, 'async_trait, Database>(
path: &'life0 str,
database: &'life1 Database
) -> Pin<Box<dyn Future<Output = Result<Vec<File<Async<Database>, Self>, Global>, Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
'life1: 'async_trait,
Database: 'async_trait + AsyncConnection + Clone,
Self: 'async_trait,
fn list_recursive_async<'life0, 'life1, 'async_trait, Database>(
path: &'life0 str,
database: &'life1 Database
) -> Pin<Box<dyn Future<Output = Result<Vec<File<Async<Database>, Self>, Global>, Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
'life1: 'async_trait,
Database: 'async_trait + AsyncConnection + Clone,
Self: 'async_trait,
Returns all files that have a path starting with
path
. Read more§fn stats_async<'life0, 'async_trait, Database>(
database: &'life0 Database
) -> Pin<Box<dyn Future<Output = Result<Statistics, Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
Database: 'async_trait + AsyncConnection + Clone,
Self: 'async_trait,
fn stats_async<'life0, 'async_trait, Database>(
database: &'life0 Database
) -> Pin<Box<dyn Future<Output = Result<Statistics, Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
Database: 'async_trait + AsyncConnection + Clone,
Self: 'async_trait,
Returns statistics for all files contained within this collection. This
is equivalent to calling [
Self::stats_for_path_async
] with "/"
for the
path.§fn stats_for_path_async<'life0, 'life1, 'async_trait, Database>(
path: &'life0 str,
database: &'life1 Database
) -> Pin<Box<dyn Future<Output = Result<Statistics, Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
'life1: 'async_trait,
Database: 'async_trait + AsyncConnection + Clone,
Self: 'async_trait,
fn stats_for_path_async<'life0, 'life1, 'async_trait, Database>(
path: &'life0 str,
database: &'life1 Database
) -> Pin<Box<dyn Future<Output = Result<Statistics, Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
'life1: 'async_trait,
Database: 'async_trait + AsyncConnection + Clone,
Self: 'async_trait,
Returns statistics for all files whose path starts with
path
.