pub struct TranscriptSource<'a> {
pub fs: &'a FileStore,
pub zone: String,
pub global: bool,
pub own: Option<(&'a FileStore, String)>,
}Expand description
The store and zone a block’s transcript is read from.
Fields§
§fs: &'a FileStore§zone: String§global: boolThe agent’s zone in the global store, rather than the block’s own.
own: Option<(&'a FileStore, String)>For a global source: the block’s own copy, which a read uses when the
zone turns out to be corrupt (damage).
Implementations§
Source§impl<'a> TranscriptSource<'a>
impl<'a> TranscriptSource<'a>
Sourcepub fn resolve(block_fs: &'a FileStore, mstore: &Store, block_id: &str) -> Self
pub fn resolve(block_fs: &'a FileStore, mstore: &Store, block_id: &str) -> Self
The agent’s zone when the block is a defined agent’s block (not a
quick-launch pane, whose zone is shared by every pane of its provider)
that is not archived and the zone has content; the block’s own store otherwise (no
agentId, no global store, an archived session, an empty zone, or a zone
found corrupt).
Sourcepub fn own(block_fs: &'a FileStore, block_id: &str) -> Self
pub fn own(block_fs: &'a FileStore, block_id: &str) -> Self
The block’s own copy, whatever the global store holds.
Sourcepub fn resolve_with(
block_fs: &'a FileStore,
global: Option<&'a FileStore>,
mstore: &Store,
block_id: &str,
) -> Self
pub fn resolve_with( block_fs: &'a FileStore, global: Option<&'a FileStore>, mstore: &Store, block_id: &str, ) -> Self
Self::resolve with the global store given (tests install none).
Sourcepub fn stat(&self) -> Option<(i64, i64)>
pub fn stat(&self) -> Option<(i64, i64)>
The file’s size and last-modified time, or None if it does not exist.
Sourcepub fn tail(&self, max_bytes: i64) -> Option<Tail>
pub fn tail(&self, max_bytes: i64) -> Option<Tail>
The last max_bytes of the file (all of it if smaller) from one snapshot.
None for no file, an empty one, or bytes that are not all stored yet.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for TranscriptSource<'a>
impl<'a> !UnwindSafe for TranscriptSource<'a>
impl<'a> Freeze for TranscriptSource<'a>
impl<'a> Send for TranscriptSource<'a>
impl<'a> Sync for TranscriptSource<'a>
impl<'a> Unpin for TranscriptSource<'a>
impl<'a> UnsafeUnpin for TranscriptSource<'a>
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<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§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.§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.§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.§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.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more