mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 10:21:52 +00:00
* wip * wip * wip * wip * wip * wip * remove debian dir * lazy env and git hash * remove env and git hash on clean * don't leave project dir * use docker for native builds * start9 rust * correctly mount registry * remove systemd config * switch to /usr/bin * disable sound for now * wip * change disk list * multi-arch images * multi-arch system images * default aarch64 * edition 2021 * dynamic wifi interface name * use wifi interface from config * bugfixes * add beep based sound * wip * wip * wip * separate out raspberry pi specific files * fixes * use new initramfs always * switch journald conf to sed script * fixes * fix permissions * talking about kernel modules not scripts * fix * fix * switch to MBR * install to /usr/lib * fixes * fixes * fixes * fixes * add media config to cfg path * fixes * fixes * fixes * raspi image fixes * fix test * fix workflow * sync boot partition * gahhhhh
36 lines
696 B
Rust
36 lines
696 B
Rust
use std::path::Path;
|
|
|
|
use async_trait::async_trait;
|
|
use digest::generic_array::GenericArray;
|
|
use digest::OutputSizeUser;
|
|
use sha2::Sha256;
|
|
|
|
use crate::Error;
|
|
|
|
pub mod bind;
|
|
pub mod block_dev;
|
|
pub mod cifs;
|
|
pub mod ecryptfs;
|
|
pub mod httpdirfs;
|
|
pub mod label;
|
|
|
|
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
|
pub enum MountType {
|
|
ReadOnly,
|
|
ReadWrite,
|
|
}
|
|
|
|
pub use MountType::*;
|
|
|
|
#[async_trait]
|
|
pub trait FileSystem {
|
|
async fn mount<P: AsRef<Path> + Send + Sync>(
|
|
&self,
|
|
mountpoint: P,
|
|
mount_type: MountType,
|
|
) -> Result<(), Error>;
|
|
async fn source_hash(
|
|
&self,
|
|
) -> Result<GenericArray<u8, <Sha256 as OutputSizeUser>::OutputSize>, Error>;
|
|
}
|