pub struct Fixture<R: Resource> { /* private fields */ }Expand description
The scene of one screenshot scenario that its actions cannot stage:
handed to ResourceApp::fixture before
the view is built.
Implementations§
Source§impl<R: Resource> Fixture<R>
impl<R: Resource> Fixture<R>
Sourcepub fn provide<T: 'static>(&mut self, value: T)
pub fn provide<T: 'static>(&mut self, value: T)
Stand value in for a live source: the views and surfaces of this
capture read it with cx.fixture::<T>(). One value per type; a
second replaces the first.
Sourcepub fn directory(&mut self) -> Result<&Path>
pub fn directory(&mut self) -> Result<&Path>
A private scratch directory for files the scene shows (a folder to browse, a repository to diff), removed after the capture.
§Errors
Returns why the directory could not be created.
Sourcepub fn content(&mut self) -> &ContentStore
pub fn content(&mut self) -> &ContentStore
The content store the capture’s views read from
(RecordEnv::content), for the blobs a scene
shows: photos, attachments, thumbnails. A private one when the host
lent none.
Sourcepub fn version(&mut self, author: &str, at_ms: i64, invoke: Invoke<R>)
pub fn version(&mut self, author: &str, at_ms: i64, invoke: Invoke<R>)
A version of the resource author wrote at at_ms (milliseconds
since the Unix epoch), before the capture: it arrives as their
change does over sync, attributed to them in history and on no one’s
undo stack here. Versions are written in the order given, before the
scenario’s own actions.
Sourcepub fn collaborator(&mut self, name: &str, at: ResourceSelection)
pub fn collaborator(&mut self, name: &str, at: ResourceSelection)
A collaborator named name, shown where they are in the resource
(a selected item, a caret) the way their presence arrives in a
shared window.
Auto Trait Implementations§
impl<R> Freeze for Fixture<R>
impl<R> !RefUnwindSafe for Fixture<R>
impl<R> !Send for Fixture<R>
impl<R> !Sync for Fixture<R>
impl<R> Unpin for Fixture<R>
impl<R> UnsafeUnpin for Fixture<R>
impl<R> !UnwindSafe for Fixture<R>
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> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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