pub enum SyncResult {
Layout {
x: f32,
y: f32,
width: f32,
height: f32,
},
TextMetrics {
width: f32,
height: f32,
baseline: f32,
line_count: u32,
},
Bool {
value: bool,
},
NodeIdResult {
node_id: Option<u64>,
},
ScrollOffset {
x: f32,
y: f32,
},
ScreenInfo {
width: f32,
height: f32,
scale: f32,
},
Role {
role: String,
},
FrameStats {
frame_count: u64,
frames_dropped: u32,
last_frame_ms: f64,
last_layout_ms: f64,
last_mount_ms: f64,
},
Int {
value: u64,
},
ActiveRoute {
route_name: Option<String>,
params: HashMap<String, String>,
},
NotFound,
Error {
message: String,
},
}Expand description
Result of a synchronous call.
Variants§
Layout
Layout measurement result.
TextMetrics
Text measurement result.
Bool
Boolean result (isFocused, nodeExists, supportsCapability, isProcessing).
NodeIdResult
Node ID result (getFocusedNode).
ScrollOffset
Scroll offset result.
ScreenInfo
Screen info result.
Role
Accessibility role result.
FrameStats
Frame stats result.
Fields
Int
Integer result (child count, etc.).
ActiveRoute
Active route result.
NotFound
Node not found.
Error
Error result.
Implementations§
Source§impl SyncResult
impl SyncResult
Sourcepub fn from_layout(layout: &ComputedLayout) -> Self
pub fn from_layout(layout: &ComputedLayout) -> Self
Convenience: create a layout result from a ComputedLayout.
Trait Implementations§
Source§impl Clone for SyncResult
impl Clone for SyncResult
Source§fn clone(&self) -> SyncResult
fn clone(&self) -> SyncResult
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 SyncResult
impl Debug for SyncResult
Source§impl<'de> Deserialize<'de> for SyncResult
impl<'de> Deserialize<'de> for SyncResult
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
Auto Trait Implementations§
impl Freeze for SyncResult
impl RefUnwindSafe for SyncResult
impl Send for SyncResult
impl Sync for SyncResult
impl Unpin for SyncResult
impl UnsafeUnpin for SyncResult
impl UnwindSafe for SyncResult
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