pub struct TrustStore {
pub integration: Vec<IntegrationRecord>,
pub ai: Vec<AiRecord>,
}Fields§
§integration: Vec<IntegrationRecord>§ai: Vec<AiRecord>Implementations§
Source§impl TrustStore
impl TrustStore
Sourcepub fn file_in(paths: &ConfigPaths) -> PathBuf
pub fn file_in(paths: &ConfigPaths) -> PathBuf
<private>/trust.toml.
Sourcepub fn load(path: &Path) -> Result<Self, String>
pub fn load(path: &Path) -> Result<Self, String>
The store at path. A missing file is an empty store; a file that is
there but cannot be read or parsed is an error, never an empty
store: an empty one would let the migration re-trust whatever the
config says now.
pub fn save(&self, path: &Path) -> Result<()>
pub fn integration(&self, id: &str) -> Option<&IntegrationRecord>
pub fn integration_mut(&mut self, id: &str) -> Option<&mut IntegrationRecord>
pub fn put_integration(&mut self, record: IntegrationRecord)
pub fn ai_record(&self, profile: &str) -> Option<&AiRecord>
pub fn put_ai(&mut self, record: AiRecord)
Trait Implementations§
Source§impl Clone for TrustStore
impl Clone for TrustStore
Source§impl Debug for TrustStore
impl Debug for TrustStore
Source§impl Default for TrustStore
impl Default for TrustStore
Source§impl<'de> Deserialize<'de> for TrustStore
impl<'de> Deserialize<'de> for TrustStore
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for TrustStore
Source§impl PartialEq for TrustStore
impl PartialEq for TrustStore
Source§impl Serialize for TrustStore
impl Serialize for TrustStore
impl StructuralPartialEq for TrustStore
Auto Trait Implementations§
impl Forget for TrustStore
impl Freeze for TrustStorewhere
*const u8 is !null: Freeze,
PhantomData<IntegrationRecord>: Freeze,
PhantomData<AiRecord>: Freeze,
impl Move for TrustStore
impl RefUnwindSafe for TrustStore
impl Send for TrustStorewhere
RawVecInner: Send,
impl Sync for TrustStorewhere
RawVecInner: Sync,
impl Unpin for TrustStore
impl UnsafeUnpin for TrustStorewhere
*const u8 is !null: UnsafeUnpin,
PhantomData<IntegrationRecord>: UnsafeUnpin,
PhantomData<AiRecord>: UnsafeUnpin,
impl UnwindSafe for TrustStorewhere
RawVecInner: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.