pub struct SessionPersona {
pub toggle: Toggle,
pub keep_going: Option<KeepGoing>,
}Expand description
The session’s persona state.
Fields§
§toggle: Toggle§keep_going: Option<KeepGoing>Implementations§
Source§impl SessionPersona
impl SessionPersona
Sourcepub fn from_json(value: Option<&Value>) -> SessionPersona
pub fn from_json(value: Option<&Value>) -> SessionPersona
The session value; anything unreadable is the default (auto, no keep-going).
pub fn to_json(&self) -> Value
Sourcepub fn effective(&self, global: bool) -> bool
pub fn effective(&self, global: bool) -> bool
Whether the persona is on for this session, given the settings’ persona (global).
Sourcepub fn prompt_override(&self) -> Option<bool>
pub fn prompt_override(&self) -> Option<bool>
The session’s prompt-mode override: None follows the settings.
Sourcepub fn user_input(&mut self, text: &str, now: i64) -> Option<String>
pub fn user_input(&mut self, text: &str, now: i64) -> Option<String>
A user’s input (a prompt, a queued message) at now: its keep-going phrase turns the persona on and starts
keep-going mode; any other input ends a stretch in progress. The one-line notice for the user, if any.
Trait Implementations§
Source§impl Clone for SessionPersona
impl Clone for SessionPersona
Source§impl Debug for SessionPersona
impl Debug for SessionPersona
Source§impl Default for SessionPersona
impl Default for SessionPersona
impl Eq for SessionPersona
Source§impl PartialEq for SessionPersona
impl PartialEq for SessionPersona
impl StructuralPartialEq for SessionPersona
Auto Trait Implementations§
impl Forget for SessionPersona
impl Freeze for SessionPersona
impl Move for SessionPersona
impl RefUnwindSafe for SessionPersona
impl Send for SessionPersona
impl Sync for SessionPersona
impl Unpin for SessionPersona
impl UnsafeUnpin for SessionPersona
impl UnwindSafe for SessionPersona
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,
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.