pub trait ObjectFrameService:
Send
+ Sync
+ 'static {
// Required methods
fn source_snapshots(&self) -> &[SourceSnapshot];
fn object_frame(
&self,
object: &ObjectId,
) -> Result<ObjectFrame, ObjectFrameError>;
// Provided method
fn leaves(&self, door: &ObjectId) -> Result<DoorLeaves, DoorLeavesError> { ... }
}Expand description
Trusted adapter seam supplying objects’ placement frames.
Required Methods§
Sourcefn source_snapshots(&self) -> &[SourceSnapshot]
fn source_snapshots(&self) -> &[SourceSnapshot]
Exact source snapshots this service answers for.
Sourcefn object_frame(
&self,
object: &ObjectId,
) -> Result<ObjectFrame, ObjectFrameError>
fn object_frame( &self, object: &ObjectId, ) -> Result<ObjectFrame, ObjectFrameError>
The placement frame of object, or why it has none.
Provided Methods§
Sourcefn leaves(&self, door: &ObjectId) -> Result<DoorLeaves, DoorLeavesError>
fn leaves(&self, door: &ObjectId) -> Result<DoorLeaves, DoorLeavesError>
The leaves of door, a door or a window: each leaf’s (or window
panel’s) closed position, width, motion, hinge side and swing
sector, and a window panel’s height and tilt sector.
The default refuses with DoorLeavesError::Unsupported, so a
service that reads no door operation fails closed.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".