pub struct XaiOAuthCredentialStore { /* private fields */ }Expand description
Stable handle to Codewhale’s private xAI OAuth directory.
The lexical $CODEWHALE_HOME/credentials boundary is retained verbatim.
Unix opens every component relative to the preceding directory with
O_NOFOLLOW; Windows keeps non-delete-shared handles to every component and
rejects reparse points. Holding this value therefore pins the directory
identity for the duration of one lifecycle operation.
Implementations§
Source§impl XaiOAuthCredentialStore
impl XaiOAuthCredentialStore
pub fn directory(&self) -> &Path
pub fn path_for(&self, name: &str) -> Result<PathBuf>
pub fn read_to_string(&self, name: &str) -> Result<Option<String>>
pub fn write(&self, name: &str, bytes: &[u8], allow_replace: bool) -> Result<()>
pub fn remove(&self, name: &str) -> Result<bool>
pub fn clear_all(&self) -> Result<usize>
Sourcepub fn stage_revocation(&self) -> Result<XaiOAuthRevocation>
pub fn stage_revocation(&self) -> Result<XaiOAuthRevocation>
Stage every active owned credential before a config mode switch. The generation basename is the OAuth epoch; the lifecycle lock prevents a stale Codewhale reader from using it while authority changes.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for XaiOAuthCredentialStore
impl RefUnwindSafe for XaiOAuthCredentialStore
impl Send for XaiOAuthCredentialStore
impl Sync for XaiOAuthCredentialStore
impl Unpin for XaiOAuthCredentialStore
impl UnsafeUnpin for XaiOAuthCredentialStore
impl UnwindSafe for XaiOAuthCredentialStore
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