pub struct CodexClient { /* private fields */ }Expand description
The in-world Codex reader.
Implementations§
Source§impl CodexClient
impl CodexClient
pub fn new(base: impl Into<String>) -> Self
Sourcepub fn with_token(self, token: Option<String>) -> Self
pub fn with_token(self, token: Option<String>) -> Self
Present a Passport on Codex reads (Authorization: Bearer <token>),
unlocking the identity’s access tier. None/empty → anonymous (public).
Sourcepub fn from_env() -> Self
pub fn from_env() -> Self
Read the base URL from INFINITE_CODEX_BASE (falls back to the public API).
pub fn close(&mut self)
Sourcepub fn open(&mut self, slug: &str)
pub fn open(&mut self, slug: &str)
Open a Codex entry by slug (cached, or fetched on a background thread).
Sourcepub fn panel(&self) -> Option<CodexPanel>
pub fn panel(&self) -> Option<CodexPanel>
The panel to render, or None when the reader is closed.
Auto Trait Implementations§
impl !Sync for CodexClient
impl Freeze for CodexClient
impl RefUnwindSafe for CodexClient
impl Send for CodexClient
impl Unpin for CodexClient
impl UnsafeUnpin for CodexClient
impl UnwindSafe for CodexClient
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