pub struct BlockExtractor { /* private fields */ }Implementations§
Source§impl BlockExtractor
impl BlockExtractor
pub fn new(cap: usize) -> Self
Sourcepub fn stamp_yurai(&mut self, y: Yurai) -> bool
pub fn stamp_yurai(&mut self, y: Yurai) -> bool
Stamp the owning pane’s provenance onto this extractor — write-once, and that is the whole point.
Yurai is documented as a pane’s provenance for its
whole life, so a settable field would contradict the type
it carries: an agent-spawned pane could re-stamp itself
Human mid-session and every block after that point would
lie, retroactively laundering the history a freio press
is supposed to be able to trust.
So the second call is refused rather than applied. Returns
true when this call took effect. A refusal is not an
error — re-stamping the SAME provenance is harmless and
idempotent — but a refusal that would have CHANGED the
value is a caller bug, and the return value is how a caller
can notice.
Tier-honest: only-mitigated. Yurai::Automation is a
public variant, so in-process code can construct a
provenance without holding an attested connection; what is
closed here is drift after the fact, not fabrication at
the source. Fabrication is bounded by
tear_types::Yurai::from_shutai being the only
production path, which is convention plus its own tests —
not a compile error.
Sourcepub fn set_cwd_from_osc7(&mut self, raw: &str)
pub fn set_cwd_from_osc7(&mut self, raw: &str)
Record the shell’s current working directory. Called by
the OSC 7 hook in GridState — the next prompt-start
stamps this onto the new block. OSC 7 payload is
typically file://<host>/path/to/dir; we strip the
scheme + host to keep just the absolute path.
Sourcepub fn current_cwd(&self) -> Option<&str>
pub fn current_cwd(&self) -> Option<&str>
Current OSC 7-set cwd, if any. Surfaced for tests and for renderers that want to display the active directory independent of any open block.
pub fn is_empty(&self) -> bool
Sourcepub fn get(&self, index: u64) -> Option<&Block>
pub fn get(&self, index: u64) -> Option<&Block>
Fetch a single block by its per-pane index. Returns
None when the block has been evicted (index < oldest)
or never existed (index > latest completed).
Sourcepub fn current(&self) -> Option<&Block>
pub fn current(&self) -> Option<&Block>
In-progress block (if any). Useful for live “what’s running right now” introspection.
Sourcepub fn on_print(&mut self, c: char)
pub fn on_print(&mut self, c: char)
Append a printable char to whatever phase we’re in. No-op when Idle. Called from the vte Perform::print hook.
Sourcepub fn on_raw_byte(&mut self, b: u8)
pub fn on_raw_byte(&mut self, b: u8)
Append raw bytes (for non-Print events like CR/LF/Esc). The output phase wants the full byte stream so a replayer can reproduce escape sequences. Phases Prompt/Command keep only printable chars (escapes there are usually terminal-renderer concerns).
Sourcepub fn on_osc_133(&mut self, marker: &str)
pub fn on_osc_133(&mut self, marker: &str)
Handle an OSC 133 marker. marker is the second OSC
param (the A / B / C / D[;<n>] part).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BlockExtractor
impl RefUnwindSafe for BlockExtractor
impl Send for BlockExtractor
impl Sync for BlockExtractor
impl Unpin for BlockExtractor
impl UnsafeUnpin for BlockExtractor
impl UnwindSafe for BlockExtractor
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.