pub struct Editor { /* private fields */ }
Expand description

The Layout Editor allows modifying a Layout while ensuring all the different invariants of the Layout objects are upheld no matter what kind of operations are being applied. It provides the current state of the editor as state objects that can be visualized by any kind of User Interface.

Implementations§

Calculates the Layout Editor’s state in order to visualize it.

Creates a new Layout Editor that modifies the Layout provided. Creation of the Layout Editor fails when a Layout with no components is provided.

Closes the Layout Editor and gives back access to the modified Layout. In case you want to implement a Cancel Button, just drop the Layout object you get here.

Calculates the layout’s state based on the timer provided. You can use this to visualize all of the components of a layout, while it is still being edited by the Layout Editor.

Updates the layout’s state based on the timer provided. You can use this to visualize all of the components of a layout, while it is still being edited by the Layout Editor.

Selects the component with the given index in order to modify its settings. Only a single component is selected at any given time. You may not provide an invalid index.

Adds the component provided to the end of the layout. The newly added component becomes the selected component.

Checks if the currently selected component can be removed. If there’s only one component in the layout, it can’t be removed.

Removes the currently selected component, unless there’s only one component in the layout. The next component becomes the selected component. If there’s none, the previous component becomes the selected component instead.

Checks if the currently selected component can be moved up. If the first component is selected, it can’t be moved up.

Moves the selected component up, unless the first component is selected.

Checks if the currently selected component can be moved down. If the last component is selected, it can’t be moved down.

Moves the selected component down, unless the last component is selected.

Moves the selected component to the index provided. You may not provide an invalid index.

Duplicates the currently selected component. The copy gets placed right after the selected component and becomes the newly selected component.

Sets a setting’s value of the selected component by its setting index to the given value.

Panics

This panics if the type of the value to be set is not compatible with the type of the setting’s value. A panic can also occur if the index of the setting provided is out of bounds.

Sets a setting’s value of the general settings by its setting index to the given value.

Panics

This panics if the type of the value to be set is not compatible with the type of the setting’s value. A panic can also occur if the index of the setting provided is out of bounds.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Converts self into T using Into<T>. Read more
Causes self to use its Binary implementation when Debug-formatted.
Causes self to use its Display implementation when Debug-formatted.
Causes self to use its LowerExp implementation when Debug-formatted.
Causes self to use its LowerHex implementation when Debug-formatted.
Causes self to use its Octal implementation when Debug-formatted.
Causes self to use its Pointer implementation when Debug-formatted.
Causes self to use its UpperExp implementation when Debug-formatted.
Causes self to use its UpperHex implementation when Debug-formatted.
Formats each item in a sequence. Read more

Returns the argument unchanged.

Query the “status” flags for the self file descriptor.
Create a new SetFdFlags value for use with set_fd_flags. Read more
Set the “status” flags for the self file descriptor. Read more
Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

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

Pipes by value. This is generally the method you want to use. Read more
Borrows self and passes that borrow into the pipe function. Read more
Mutably borrows self and passes that borrow into the pipe function. Read more
Borrows self, then passes self.borrow() into the pipe function. Read more
Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
Borrows self, then passes self.as_ref() into the pipe function.
Mutably borrows self, then passes self.as_mut() into the pipe function.
Borrows self, then passes self.deref() into the pipe function.
Mutably borrows self, then passes self.deref_mut() into the pipe function.
The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
Immutable access to a value. Read more
Mutable access to a value. Read more
Immutable access to the Borrow<B> of a value. Read more
Mutable access to the BorrowMut<B> of a value. Read more
Immutable access to the AsRef<R> view of a value. Read more
Mutable access to the AsMut<R> view of a value. Read more
Immutable access to the Deref::Target of a value. Read more
Mutable access to the Deref::Target of a value. Read more
Calls .tap() only in debug builds, and is erased in release builds.
Calls .tap_mut() only in debug builds, and is erased in release builds.
Calls .tap_borrow() only in debug builds, and is erased in release builds.
Calls .tap_borrow_mut() only in debug builds, and is erased in release builds.
Calls .tap_ref() only in debug builds, and is erased in release builds.
Calls .tap_ref_mut() only in debug builds, and is erased in release builds.
Calls .tap_deref() only in debug builds, and is erased in release builds.
Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
Attempts to convert self into T using TryInto<T>. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more