pub enum Origin {
User,
Agent(String),
Script(String),
Device(String),
Remote(String),
}Expand description
Who asked for a command: shown in the history, and used to keep an agent from fighting a human’s gesture.
Variants§
User
A person, with the mouse or the keyboard.
Agent(String)
An automated agent, by session.
Script(String)
A script, by name.
Device(String)
A hardware controller, by name.
Remote(String)
Another process or machine.
Implementations§
Source§impl Origin
impl Origin
Sourcepub fn writer(&self) -> OwnerId
pub fn writer(&self) -> OwnerId
Who writes a value for this origin (ADR 0016): a person writes
through the framework, which may write any path; anyone else
writes as itself (agent:debug-bridge, script:<name>…), so a
value’s declared writers apply. A name an id cannot hold is
written with _ for each character it refuses.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Origin
impl<'de> Deserialize<'de> for Origin
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
Source§impl Display for Origin
impl Display for Origin
Source§fn fmt(&self, f: &mut Formatter<'_>) -> Result
fn fmt(&self, f: &mut Formatter<'_>) -> Result
The origin as the journal and the history name it: user,
agent:<session>, script:<name>, device:<name>,
remote:<name>.
use egui_pop_model::commands::Origin;
assert_eq!(Origin::User.to_string(), "user");
assert_eq!(Origin::Agent("debug-bridge".into()).to_string(), "agent:debug-bridge");impl Eq for Origin
impl StructuralPartialEq for Origin
Auto Trait Implementations§
impl Freeze for Origin
impl RefUnwindSafe for Origin
impl Send for Origin
impl Sync for Origin
impl Unpin for Origin
impl UnsafeUnpin for Origin
impl UnwindSafe for Origin
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