#[repr(transparent)]pub struct UIWritingToolsCoordinatorState(pub NSInteger);
UIWritingToolsCoordinator
only.Expand description
The states that indicate the current activity, if any, Writing Tools is performing in your view.
Making changes to your view requires several different levels of
interaction. Initially, Writing Tools displays its UI and collects
information about what the person wants to do. When the person selects
an operation, Writing Tools sends the relevant details to a large language
model (LLM) and processes the results. It then works with the custom view to
integrate any changes into the view’s text storage. During each
of these activities, the coordinator reflects what’s happening in
its UIWritingToolsCoordinator/state
property. You can use
the current state as a guide to making decisions in other parts of your view.
See also Apple’s documentation
Tuple Fields§
§0: NSInteger
Implementations§
Source§impl UIWritingToolsCoordinatorState
impl UIWritingToolsCoordinatorState
Sourcepub const Inactive: Self
pub const Inactive: Self
A state that indicates Writing Tools isn’t currently performing any work on your view’s content.
The coordinator starts in the inactive
state, and transitions
immediately to the noninteractive
or interactiveResting
state when someone chooses an option from the Writing Tools UI.
After the coordinator finishes incorporating any changes for the
current operation, it returns to the inactive
state and waits
for the person to choose a different option or dismiss the Writing Tools UI.
Sourcepub const Noninteractive: Self
pub const Noninteractive: Self
A state that indicates Writing Tools is handling interactions in the system UI, instead of in your view.
Writing Tools transitions to this state when the coordinator uses
the UIWritingToolsBehavior/limited
experience or when someone chooses an
option that displays its results in the Writing Tools UI. When
the person accepts the changes from the tool or dismisses the
Writing Tools UI, the coordinator returns to the inactive
state. If the person discards the change and selects a tool with
an interactive experience instead, the coordinator transitions
to the interactiveResting
state.
Sourcepub const InteractiveResting: Self
pub const InteractiveResting: Self
A state that indicates Writing Tools is in the resting state for an inline editing experience.
When someone initially selects a tool with an interactive experience,
the coordinator transitions briefly to this state and starts the
operation. The coordinator transitions swiftly to the interactiveStreaming
state when it submits the request and delivers the results to your
view. When it finishes delivering the results, it transitions back
to the interactiveResting
state and awaits further commands. If
the person accepts the changes or dismisses the Writing Tools UI,
the coordinator transitions from this state to the inactive
state.
Sourcepub const InteractiveStreaming: Self
pub const InteractiveStreaming: Self
A state that indicates Writing Tools is processing a request and incorporating changes interactively into your view.
The coordinator transitions swiftly from the interactiveResting
state to this state at the start of an operation. In this state,
the coordinator submits the request for processing and delivers
the results back to your view. When the coordinator finishes delivering
the results, it transitions back to the interactiveResting
state.
Trait Implementations§
Source§impl Clone for UIWritingToolsCoordinatorState
impl Clone for UIWritingToolsCoordinatorState
Source§fn clone(&self) -> UIWritingToolsCoordinatorState
fn clone(&self) -> UIWritingToolsCoordinatorState
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Ord for UIWritingToolsCoordinatorState
impl Ord for UIWritingToolsCoordinatorState
Source§fn cmp(&self, other: &UIWritingToolsCoordinatorState) -> Ordering
fn cmp(&self, other: &UIWritingToolsCoordinatorState) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for UIWritingToolsCoordinatorState
impl PartialEq for UIWritingToolsCoordinatorState
Source§fn eq(&self, other: &UIWritingToolsCoordinatorState) -> bool
fn eq(&self, other: &UIWritingToolsCoordinatorState) -> bool
self
and other
values to be equal, and is used by ==
.