pub struct JobId(/* private fields */);Expand description
A validated job id: exactly six lowercase hex digits.
Every verb takes an id from the command line and interpolates it into a
remote path, a tmux target, and a shell script. Unvalidated, that is command
injection: coop poll 'x$(touch /tmp/pwn)y' reached the remote shell as
syntax and would have executed. Parsing at the boundary makes the unsafe
value unrepresentable rather than relying on every call site to quote.
Hex also avoids : and ., which tmux’s target grammar reserves.
Implementations§
Trait Implementations§
impl Eq for JobId
impl StructuralPartialEq for JobId
Auto Trait Implementations§
impl Freeze for JobId
impl RefUnwindSafe for JobId
impl Send for JobId
impl Sync for JobId
impl Unpin for JobId
impl UnsafeUnpin for JobId
impl UnwindSafe for JobId
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.