pub struct SharedElementManager { /* private fields */ }Expand description
Manager for shared element transitions
Implementations§
Sourcepub fn new(z_index_strategy: ZIndexStrategy) -> SharedElementManager
pub fn new(z_index_strategy: ZIndexStrategy) -> SharedElementManager
Create a new shared element manager
Sourcepub fn register_element(
&mut self,
_element: &Element,
config: &SharedElementConfig,
) -> Result<(), String>
pub fn register_element( &mut self, _element: &Element, config: &SharedElementConfig, ) -> Result<(), String>
Register a shared element
Sourcepub fn unregister_element(&mut self, _element: &Element) -> Result<(), String>
pub fn unregister_element(&mut self, _element: &Element) -> Result<(), String>
Unregister a shared element
Sourcepub fn create_transition(
&mut self,
source_element: &Element,
target_element: &Element,
config: &SharedElementConfig,
) -> Result<String, String>
pub fn create_transition( &mut self, source_element: &Element, target_element: &Element, config: &SharedElementConfig, ) -> Result<String, String>
Create a shared element transition
Sourcepub fn start_transition(&mut self, transition_id: &str) -> Result<(), String>
pub fn start_transition(&mut self, transition_id: &str) -> Result<(), String>
Start a shared element transition
Sourcepub fn update_transition(
&mut self,
transition_id: &str,
progress: f64,
) -> Result<(), String>
pub fn update_transition( &mut self, transition_id: &str, progress: f64, ) -> Result<(), String>
Update transition progress
Sourcepub fn cancel_transition(&mut self, transition_id: &str) -> Result<(), String>
pub fn cancel_transition(&mut self, transition_id: &str) -> Result<(), String>
Cancel a transition
Sourcepub fn cancel_all_transitions(&mut self)
pub fn cancel_all_transitions(&mut self)
Cancel all active transitions
Sourcepub fn get_performance_metrics(&self) -> &SharedElementMetrics
pub fn get_performance_metrics(&self) -> &SharedElementMetrics
Get performance metrics
Sourcepub fn get_active_transition_count(&self) -> usize
pub fn get_active_transition_count(&self) -> usize
Get active transition count
Sourcepub fn get_queued_transition_count(&self) -> usize
pub fn get_queued_transition_count(&self) -> usize
Get queued transition count
Trait Implementations§
Source§fn default() -> SharedElementManager
fn default() -> SharedElementManager
Returns the “default value” for a type. Read more
Auto Trait Implementations§
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
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> ⓘ
Converts
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> ⓘ
Converts
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 moreSource§impl<T> SerializableKey for T
impl<T> SerializableKey for T
Source§impl<T> StorageAccess<T> for T
impl<T> StorageAccess<T> for T
Source§fn as_borrowed(&self) -> &T
fn as_borrowed(&self) -> &T
Borrows the value.
Source§fn into_taken(self) -> T
fn into_taken(self) -> T
Takes the value.