SimplifiedLayoutManager

Struct SimplifiedLayoutManager 

Source
pub struct SimplifiedLayoutManager { /* private fields */ }
Expand description

Simplified layout manager that provides a clean, simple interface

This is the main public API for layout animations. It provides a clean, simple interface while hiding the complexity of the underlying layout tracking and animation systems.

Implementations§

Source§

impl SimplifiedLayoutManager

Source

pub fn new() -> SimplifiedLayoutManager

Create a new simplified layout manager with default configuration

Source

pub fn with_config(config: SimplifiedLayoutConfig) -> SimplifiedLayoutManager

Create a new simplified layout manager with custom configuration

Source

pub fn start_tracking( &mut self, element_id: &str, element: &Element, ) -> Result<(), String>

Start tracking an element for layout changes

Source

pub fn stop_tracking(&mut self, element_id: &str) -> Result<(), String>

Stop tracking an element

Source

pub fn animate_layout_change( &mut self, element_id: &str, from_layout: &LayoutInfo, to_layout: &LayoutInfo, ) -> Result<(), String>

Animate layout change for an element

Source

pub fn flip_animate( &mut self, element_id: &str, from_layout: &LayoutInfo, to_layout: &LayoutInfo, ) -> Result<(), String>

Perform FLIP animation

Source

pub fn shared_element_transition( &mut self, from_element_id: &str, to_element_id: &str, _from_layout: &LayoutInfo, _to_layout: &LayoutInfo, ) -> Result<(), String>

Perform shared element transition

Source

pub fn batch_start_tracking( &mut self, elements: Vec<(&str, &Element)>, ) -> Result<(), String>

Batch start tracking multiple elements

Source

pub fn batch_animate( &mut self, animations: Vec<(&str, &LayoutInfo, &LayoutInfo)>, ) -> Result<(), String>

Batch animate multiple elements

Source

pub fn get_layout_info(&self, element_id: &str) -> Option<LayoutInfo>

Get layout information for an element

Source

pub fn get_animation_status( &self, element_id: &str, ) -> Option<&SimplifiedAnimationStatus>

Get animation status for an element

Source

pub fn pause_animation(&mut self, element_id: &str) -> Result<(), String>

Pause animation for an element

Source

pub fn resume_animation(&mut self, element_id: &str) -> Result<(), String>

Resume animation for an element

Source

pub fn cancel_animation(&mut self, element_id: &str) -> Result<(), String>

Cancel animation for an element

Source

pub fn clear_all(&mut self)

Clear all tracking and animations

Source

pub fn get_performance_metrics(&self) -> Option<SimplifiedPerformanceMetrics>

Get performance metrics

Source

pub fn update_config(&mut self, config: SimplifiedLayoutConfig)

Update configuration

Source

pub fn get_config(&self) -> SimplifiedLayoutConfig

Get current configuration

Source

pub fn is_tracking(&self) -> bool

Check if any elements are being tracked

Source

pub fn tracked_count(&self) -> usize

Get number of tracked elements

Source

pub fn animation_count(&self) -> usize

Get number of active animations

Trait Implementations§

Source§

impl Clone for SimplifiedLayoutManager

Source§

fn clone(&self) -> SimplifiedLayoutManager

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SimplifiedLayoutManager

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Default for SimplifiedLayoutManager

Source§

fn default() -> SimplifiedLayoutManager

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<E, T, Request, Encoding> FromReq<Patch<Encoding>, Request, E> for T
where Request: Req<E> + Send + 'static, Encoding: Decodes<T>, E: FromServerFnError,

Source§

async fn from_req(req: Request) -> Result<T, E>

Attempts to deserialize the arguments from a request.
Source§

impl<E, T, Request, Encoding> FromReq<Post<Encoding>, Request, E> for T
where Request: Req<E> + Send + 'static, Encoding: Decodes<T>, E: FromServerFnError,

Source§

async fn from_req(req: Request) -> Result<T, E>

Attempts to deserialize the arguments from a request.
Source§

impl<E, T, Request, Encoding> FromReq<Put<Encoding>, Request, E> for T
where Request: Req<E> + Send + 'static, Encoding: Decodes<T>, E: FromServerFnError,

Source§

async fn from_req(req: Request) -> Result<T, E>

Attempts to deserialize the arguments from a request.
Source§

impl<E, Encoding, Response, T> FromRes<Patch<Encoding>, Response, E> for T
where Response: ClientRes<E> + Send, Encoding: Decodes<T>, E: FromServerFnError,

Source§

async fn from_res(res: Response) -> Result<T, E>

Attempts to deserialize the outputs from a response.
Source§

impl<E, Encoding, Response, T> FromRes<Post<Encoding>, Response, E> for T
where Response: ClientRes<E> + Send, Encoding: Decodes<T>, E: FromServerFnError,

Source§

async fn from_res(res: Response) -> Result<T, E>

Attempts to deserialize the outputs from a response.
Source§

impl<E, Encoding, Response, T> FromRes<Put<Encoding>, Response, E> for T
where Response: ClientRes<E> + Send, Encoding: Decodes<T>, E: FromServerFnError,

Source§

async fn from_res(res: Response) -> Result<T, E>

Attempts to deserialize the outputs from a response.
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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 more
Source§

impl<E, T, Encoding, Request> IntoReq<Patch<Encoding>, Request, E> for T
where Request: ClientReq<E>, Encoding: Encodes<T>, E: FromServerFnError,

Source§

fn into_req(self, path: &str, accepts: &str) -> Result<Request, E>

Attempts to serialize the arguments into an HTTP request.
Source§

impl<E, T, Encoding, Request> IntoReq<Post<Encoding>, Request, E> for T
where Request: ClientReq<E>, Encoding: Encodes<T>, E: FromServerFnError,

Source§

fn into_req(self, path: &str, accepts: &str) -> Result<Request, E>

Attempts to serialize the arguments into an HTTP request.
Source§

impl<E, T, Encoding, Request> IntoReq<Put<Encoding>, Request, E> for T
where Request: ClientReq<E>, Encoding: Encodes<T>, E: FromServerFnError,

Source§

fn into_req(self, path: &str, accepts: &str) -> Result<Request, E>

Attempts to serialize the arguments into an HTTP request.
Source§

impl<T> SerializableKey for T

Source§

fn ser_key(&self) -> String

Serializes the key to a unique string. Read more
Source§

impl<T> StorageAccess<T> for T

Source§

fn as_borrowed(&self) -> &T

Borrows the value.
Source§

fn into_taken(self) -> T

Takes the value.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> ErasedDestructor for T
where T: 'static,