[−][src]Struct manager::ArtificeDB
this is the primary database containing information on the artifice installation it provides access to a list of applications, and there granted permissions as well as configuraiton for networking, and a table of peers to connect to
creating database from custom location
Example
// basic example
let database = ArtificeDB::create("/home/user/.artifice/"); let permissions_entry = database.load_entry("permissions", b"password"); // this will create the permissionsgranted object which is a vector of permission let permissions = permissions_entry.unwrap(); or let archive = database.archive();
Implementations
impl ArtificeDB
[src]
pub fn default_from_root<P: AsRef<Path>>(root: P) -> Self
[src]
pub fn archive(&self) -> Result<Vec<u8>>
[src]
pub fn install_archive(&self, archive: &[u8]) -> Result<()>
[src]
Trait Implementations
impl Clone for ArtificeDB
[src]
fn clone(&self) -> ArtificeDB
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Database<Error> for ArtificeDB
[src]
fn create<P: AsRef<Path>>(root: P) -> Result<Self, Error>
[src]
fn root(&self) -> PathBuf
[src]
fn create_table<'a, B, A, T>(&self, key: B, password: &[u8]) -> Result<T, Error> where
B: ToString,
A: Debug + Clone + Serialize + Deserialize<'a> + GetPrimaryKey<B>,
T: Table<'a, B, A, Error>,
[src]
B: ToString,
A: Debug + Clone + Serialize + Deserialize<'a> + GetPrimaryKey<B>,
T: Table<'a, B, A, Error>,
fn load_entry<K, T>(&self, key: K, password: &[u8]) -> Result<T, Error> where
K: ToString,
T: Debug + Clone + Serialize + DeserializeOwned,
[src]
K: ToString,
T: Debug + Clone + Serialize + DeserializeOwned,
impl Debug for ArtificeDB
[src]
impl Default for ArtificeDB
[src]
impl<'de> Deserialize<'de> for ArtificeDB
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Eq for ArtificeDB
[src]
impl PartialEq<ArtificeDB> for ArtificeDB
[src]
fn eq(&self, other: &ArtificeDB) -> bool
[src]
fn ne(&self, other: &ArtificeDB) -> bool
[src]
impl Serialize for ArtificeDB
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralEq for ArtificeDB
[src]
impl StructuralPartialEq for ArtificeDB
[src]
Auto Trait Implementations
impl RefUnwindSafe for ArtificeDB
impl Send for ArtificeDB
impl Sync for ArtificeDB
impl Unpin for ArtificeDB
impl UnwindSafe for ArtificeDB
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,