pub struct FixtureSpec {
pub name: String,
pub description: String,
pub anchors: Vec<Anchor>,
}Expand description
Fixture metadata advertised by an app.
Fields§
§name: StringFixture name.
description: StringFixture description.
anchors: Vec<Anchor>Declarative readiness anchors for the fixture baseline.
Implementations§
Source§impl FixtureSpec
impl FixtureSpec
Sourcepub fn new(name: impl Into<String>, description: impl Into<String>) -> Self
pub fn new(name: impl Into<String>, description: impl Into<String>) -> Self
Create a new fixture specification.
Sourcepub fn anchor(self, widget_id: impl Into<String>) -> Self
pub fn anchor(self, widget_id: impl Into<String>) -> Self
Add a visible-widget readiness anchor.
Sourcepub fn anchor_in(
self,
widget_id: impl Into<String>,
viewport: ViewportId,
) -> Self
pub fn anchor_in( self, widget_id: impl Into<String>, viewport: ViewportId, ) -> Self
Add a visible-widget readiness anchor scoped to a viewport.
Sourcepub fn anchor_label(
self,
widget_id: impl Into<String>,
text: impl Into<String>,
) -> Self
pub fn anchor_label( self, widget_id: impl Into<String>, text: impl Into<String>, ) -> Self
Add an exact-label readiness anchor.
Sourcepub fn anchor_label_in(
self,
widget_id: impl Into<String>,
text: impl Into<String>,
viewport: ViewportId,
) -> Self
pub fn anchor_label_in( self, widget_id: impl Into<String>, text: impl Into<String>, viewport: ViewportId, ) -> Self
Add an exact-label readiness anchor scoped to a viewport.
Sourcepub fn anchor_value(
self,
widget_id: impl Into<String>,
value: WidgetValue,
) -> Self
pub fn anchor_value( self, widget_id: impl Into<String>, value: WidgetValue, ) -> Self
Add an exact-value readiness anchor.
Sourcepub fn anchor_value_in(
self,
widget_id: impl Into<String>,
value: WidgetValue,
viewport: ViewportId,
) -> Self
pub fn anchor_value_in( self, widget_id: impl Into<String>, value: WidgetValue, viewport: ViewportId, ) -> Self
Add an exact-value readiness anchor scoped to a viewport.
Sourcepub fn anchor_scroll(self, widget_id: impl Into<String>) -> Self
pub fn anchor_scroll(self, widget_id: impl Into<String>) -> Self
Add a scroll-readiness anchor.
Sourcepub fn anchor_scroll_in(
self,
widget_id: impl Into<String>,
viewport: ViewportId,
) -> Self
pub fn anchor_scroll_in( self, widget_id: impl Into<String>, viewport: ViewportId, ) -> Self
Add a scroll-readiness anchor scoped to a viewport.
Sourcepub fn anchor_scroll_at(
self,
widget_id: impl Into<String>,
offset: impl Into<Vec2>,
tolerance: f32,
) -> Self
pub fn anchor_scroll_at( self, widget_id: impl Into<String>, offset: impl Into<Vec2>, tolerance: f32, ) -> Self
Add a scroll-position readiness anchor.
Sourcepub fn anchor_scroll_at_in(
self,
widget_id: impl Into<String>,
offset: impl Into<Vec2>,
tolerance: f32,
viewport: ViewportId,
) -> Self
pub fn anchor_scroll_at_in( self, widget_id: impl Into<String>, offset: impl Into<Vec2>, tolerance: f32, viewport: ViewportId, ) -> Self
Add a scroll-position readiness anchor scoped to a viewport.
Sourcepub fn validate(&self, require_anchors: bool) -> Result<(), String>
pub fn validate(&self, require_anchors: bool) -> Result<(), String>
Validate fixture metadata and readiness anchors.
Sourcepub fn describe_readiness(&self) -> String
pub fn describe_readiness(&self) -> String
Return a human-readable summary of the readiness contract.
Trait Implementations§
Source§impl Clone for FixtureSpec
impl Clone for FixtureSpec
Source§fn clone(&self) -> FixtureSpec
fn clone(&self) -> FixtureSpec
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FixtureSpec
impl Debug for FixtureSpec
Source§impl<'de> Deserialize<'de> for FixtureSpec
impl<'de> Deserialize<'de> for FixtureSpec
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 JsonSchema for FixtureSpec
impl JsonSchema for FixtureSpec
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for FixtureSpec
impl RefUnwindSafe for FixtureSpec
impl Send for FixtureSpec
impl Sync for FixtureSpec
impl Unpin for FixtureSpec
impl UnsafeUnpin for FixtureSpec
impl UnwindSafe for FixtureSpec
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