Skip to main content

SwitchListTile

Struct SwitchListTile 

Source
pub struct SwitchListTile {
Show 41 fields pub key: Option<KeyRef>, pub value: bool, pub on_changed: Option<ValueChanged<bool>>, pub active_color: Option<Color>, pub active_thumb_color: Option<Color>, pub active_track_color: Option<Color>, pub inactive_thumb_color: Option<Color>, pub inactive_track_color: Option<Color>, pub thumb_color: Option<WidgetStatePropertyRef<Option<Color>>>, pub track_color: Option<WidgetStatePropertyRef<Option<Color>>>, pub track_outline_color: Option<WidgetStatePropertyRef<Option<Color>>>, pub thumb_icon: Option<WidgetStatePropertyRef<Option<Rc<Icon>>>>, pub material_tap_target_size: Option<MaterialTapTargetSize>, pub drag_start_behavior: DragStartBehavior, pub mouse_cursor: Option<MouseCursorRef>, pub overlay_color: Option<WidgetStatePropertyRef<Option<Color>>>, pub splash_radius: Option<f64>, pub focus_node: Option<FocusNodeRef>, pub states_controller: Option<Ref<WidgetStatesController>>, pub on_focus_change: Option<ValueChanged<bool>>, pub autofocus: bool, pub tile_color: Option<Color>, pub title: Option<WidgetRef>, pub subtitle: Option<WidgetRef>, pub secondary: Option<WidgetRef>, pub is_three_line: Option<bool>, pub dense: Option<bool>, pub content_padding: Option<EdgeInsetsGeometry>, pub selected: bool, pub control_affinity: Option<ListTileControlAffinity>, pub shape: Option<ShapeBorderRef>, pub selected_tile_color: Option<Color>, pub visual_density: Option<VisualDensity>, pub enable_feedback: Option<bool>, pub horizontal_title_gap: Option<f64>, pub min_vertical_padding: Option<f64>, pub min_leading_width: Option<f64>, pub min_tile_height: Option<f64>, pub hover_color: Option<Color>, pub apply_cupertino_theme: Option<bool>, pub internal_add_semantic_for_on_tap: bool, /* private fields */
}
Expand description

A ListTile with a Switch. In other words, a switch with a label.

The entire list tile is interactive: tapping anywhere in the tile toggles the switch. Tapping and dragging the Switch also triggers the on_changed callback.

To ensure that on_changed correctly triggers, the state passed into value must be properly managed. This is typically done by invoking State::set_state in on_changed to toggle the state value.

The value, on_changed and active_thumb_color properties of this widget are identical to the similarly-named properties on the Switch widget.

The title, subtitle, is_three_line, and dense properties are like those of the same name on ListTile.

The selected property on this widget is similar to the ListTile::selected property. This tile’s active_thumb_color is used for the selected item’s text color, or the theme’s SwitchThemeData::overlay_color if active_thumb_color is null.

This widget does not coordinate the selected state and the value; to have the list tile appear selected when the switch button is on, use the same value for both.

The switch is shown on the right by default in left-to-right languages (i.e. in the ListTile::trailing slot) which can be changed using control_affinity. The secondary widget is placed in the ListTile::leading slot.

This widget requires a Material widget ancestor in the tree to paint itself on, which is typically provided by the app’s Scaffold. The tile_color, and selected_tile_color are not painted by the SwitchListTile itself but by the Material widget ancestor. In this case, one can wrap a Material widget around the SwitchListTile.

§Performance considerations when wrapping SwitchListTile with Material

Wrapping a large number of SwitchListTiles individually with Materials is expensive. Consider only wrapping the SwitchListTiles that require it or include a common Material ancestor where possible.

To show the SwitchListTile as disabled, pass null as the on_changed callback.

§SwitchListTile isn’t exactly what I want

If the way SwitchListTile pads and positions its elements isn’t quite what you’re looking for, you can create custom labeled switch widgets by combining Switch with other widgets, such as Text, Padding and InkWell.

See also:

  • ListTileTheme, which can be used to affect the style of list tiles, including switch list tiles.
  • CheckboxListTile, a similar widget for checkboxes.
  • RadioListTile, a similar widget for radio buttons.
  • ListTile and Switch, the widgets from which this widget is made.

Fields§

§key: Option<KeyRef>§value: bool

Whether this switch is checked.

§on_changed: Option<ValueChanged<bool>>

Called when the user toggles the switch on or off.

The switch passes the new value to the callback but does not actually change state until the parent widget rebuilds the switch tile with the new value.

If null, the switch will be displayed as disabled.

§active_color: Option<Color>
👎Deprecated:

Use activeThumbColor or activeTrackColor instead. This feature was deprecated after v3.31.0-2.0.pre.

The color to use when this switch is on.

Defaults to ColorScheme::secondary of the current Theme.

§active_thumb_color: Option<Color>

The color to use on the thumb when this switch is on.

Defaults to ColorScheme::secondary of the current Theme.

§active_track_color: Option<Color>

The color to use on the track when this switch is on.

Defaults to ColorScheme::secondary with the opacity set at 50%.

Ignored if created with SwitchListTile::adaptive.

§inactive_thumb_color: Option<Color>

The color to use on the thumb when this switch is off.

Defaults to the colors described in the Material design specification.

Ignored if created with SwitchListTile::adaptive.

§inactive_track_color: Option<Color>

The color to use on the track when this switch is off.

Defaults to the colors described in the Material design specification.

Ignored if created with SwitchListTile::adaptive.

§thumb_color: Option<WidgetStatePropertyRef<Option<Color>>>

The color of this switch’s thumb.

Resolved in the following states:

If null, then the value of active_thumb_color is used in the selected state and inactive_thumb_color in the default state. If that is also null, then the value of SwitchThemeData::thumb_color is used. If that is also null, The default value is used.

§track_color: Option<WidgetStatePropertyRef<Option<Color>>>

The color of this switch’s track.

Resolved in the following states:

If null, then the value of active_track_color is used in the selected state and inactive_track_color in the default state. If that is also null, then the value of SwitchThemeData::track_color is used. If that is also null, then the default value is used.

§track_outline_color: Option<WidgetStatePropertyRef<Option<Color>>>

The outline color of this switch’s track.

The ListTile will be focused when this SwitchListTile requests focus, so the focused outline color of the switch will be ignored.

In Material 3, the outline color defaults to transparent in the selected state and ColorScheme::outline in the unselected state. In Material 2, the Switch track has no outline.

§thumb_icon: Option<WidgetStatePropertyRef<Option<Rc<Icon>>>>

The icon to use on the thumb of this switch

Resolved in the following states:

If null, then the value of SwitchThemeData::thumb_icon is used. If this is also null, then the Switch does not have any icons on the thumb.

§material_tap_target_size: Option<MaterialTapTargetSize>

Configures the minimum size of the tap target.

defaults to MaterialTapTargetSize::ShrinkWrap.

§drag_start_behavior: DragStartBehavior

Determines the way that drag start behavior is handled.

§mouse_cursor: Option<MouseCursorRef>

The cursor for a mouse pointer when it enters or is hovering over the widget.

If mouse_cursor is a WidgetStateMouseCursor, WidgetStateProperty::resolve is used for the following WidgetStates:

If null, then the value of SwitchThemeData::mouse_cursor is used. If that is also null, then WidgetStateMouseCursor::clickable is used.

§overlay_color: Option<WidgetStatePropertyRef<Option<Color>>>

The color for the switch’s Material.

Resolves in the following states:

If null, then the value of active_thumb_color with alpha K_RADIAL_REACTION_ALPHA and hover_color is used in the pressed and hovered state. If that is also null, the value of SwitchThemeData::overlay_color is used. If that is also null, then the default value is used in the pressed and hovered state.

§splash_radius: Option<f64>

The splash radius of the circular Material ink response.

If null, then the value of SwitchThemeData::splash_radius is used. If that is also null, then K_RADIAL_REACTION_RADIUS is used.

§focus_node: Option<FocusNodeRef>

An optional focus node to use as the focus node for this widget.

§states_controller: Option<Ref<WidgetStatesController>>

Controls the interactive states of the backing ListTile.

§on_focus_change: Option<ValueChanged<bool>>

Handler called when the focus changes.

Called with true if this widget’s node gains focus, and false if it loses focus.

§autofocus: bool

True if this widget will be selected as the initial focus when no other node in its scope is currently focused.

§tile_color: Option<Color>

Defines the background color of ListTile when selected is false.

§title: Option<WidgetRef>

The primary content of the list tile.

Typically a Text widget.

§subtitle: Option<WidgetRef>

Additional content displayed below the title.

Typically a Text widget.

§secondary: Option<WidgetRef>

A widget to display on the opposite side of the tile from the switch.

Typically an Icon widget.

§is_three_line: Option<bool>

Whether this list tile is intended to display three lines of text.

If null, the value from ListTileThemeData::is_three_line is used. If that is also null, the value from ThemeData::list_tile_theme is used. If still null, the default value is false.

§dense: Option<bool>

Whether this list tile is part of a vertically dense list.

If this property is null then its value is based on ListTileThemeData::dense.

§content_padding: Option<EdgeInsetsGeometry>

The tile’s internal padding.

Insets a SwitchListTile’s contents: its title, subtitle, secondary, and Switch widgets.

If null, ListTile’s default of EdgeInsets.symmetric(horizontal: 16.0) is used.

§selected: bool

Whether to render icons and text in the active_thumb_color.

No effort is made to automatically coordinate the selected state and the value state. To have the list tile appear selected when the switch is on, pass the same value to both.

Normally, this property is left to its default value, false.

§control_affinity: Option<ListTileControlAffinity>

Defines the position of control and secondary, relative to text.

By default, the value of control_affinity is ListTileControlAffinity::Platform.

§shape: Option<ShapeBorderRef>

Defines the tile’s InkWell::custom_border and Ink::decoration shape.

§selected_tile_color: Option<Color>

If non-null, defines the background color when SwitchListTile::selected is true.

§visual_density: Option<VisualDensity>

Defines how compact the list tile’s layout will be.

§enable_feedback: Option<bool>

Whether detected gestures should provide acoustic and/or haptic feedback.

See also:

  • Feedback for providing platform-specific feedback to certain actions.
§horizontal_title_gap: Option<f64>

The horizontal gap between the titles and the leading/trailing widgets.

§min_vertical_padding: Option<f64>

The minimum padding on the top and bottom of the title and subtitle widgets.

§min_leading_width: Option<f64>

The minimum width allocated for the ListTile::leading widget.

§min_tile_height: Option<f64>

The minimum height allocated for the ListTile widget.

§hover_color: Option<Color>

The color for the tile’s Material when a pointer is hovering over it.

§apply_cupertino_theme: Option<bool>

Whether to apply the ambient CupertinoThemeData.

Read through effective_apply_cupertino_theme.

§internal_add_semantic_for_on_tap: bool

Whether to add button:true to the semantics if onTap is provided. This is a temporary flag to help changing the behavior of ListTile onTap semantics.

Implementations§

Source§

impl SwitchListTile

Source

pub fn new( value: bool, on_changed: Option<ValueChanged<bool>>, ) -> SwitchListTile

Creates a combination of a list tile and a switch.

The switch tile itself does not maintain any state. Instead, when the state of the switch changes, the widget calls the on_changed callback. Most widgets that use a switch will listen for the on_changed callback and rebuild the switch tile with a new value to update the visual appearance of the switch.

The following arguments are required:

  • value determines whether this switch is on or off.
  • on_changed is called when the user toggles the switch on or off.

Dart’s SwitchListTile has no applyCupertinoTheme parameter: its applyCupertinoTheme is false, so an apply_cupertino_theme set on it is ignored (effective_apply_cupertino_theme).

Source

pub fn adaptive( value: bool, on_changed: Option<ValueChanged<bool>>, ) -> SwitchListTile

Creates a Material ListTile with an adaptive Switch, following Material design’s Cross-platform guidelines.

This widget uses Switch::adaptive to change the graphics of the switch component based on the ambient ThemeData::platform. On iOS and macOS, a CupertinoSwitch will be used. On other platforms a Material design Switch will be used.

If a CupertinoSwitch is created, the following parameters are ignored: active_track_color, inactive_thumb_color, inactive_track_color.

Source

pub fn key(self, key: KeyRef) -> SwitchListTile

Dart SwitchListTile(key:).

Source

pub fn active_color(self, active_color: Color) -> SwitchListTile

👎Deprecated:

Use activeThumbColor or activeTrackColor instead. This feature was deprecated after v3.31.0-2.0.pre.

Dart SwitchListTile(activeColor:).

Source

pub fn active_thumb_color( self, active_thumb_color: impl Into<Color>, ) -> SwitchListTile

Dart SwitchListTile(activeThumbColor:).

Source

pub fn active_track_color( self, active_track_color: impl Into<Color>, ) -> SwitchListTile

Dart SwitchListTile(activeTrackColor:).

Source

pub fn inactive_thumb_color( self, inactive_thumb_color: impl Into<Color>, ) -> SwitchListTile

Dart SwitchListTile(inactiveThumbColor:).

Source

pub fn inactive_track_color( self, inactive_track_color: impl Into<Color>, ) -> SwitchListTile

Dart SwitchListTile(inactiveTrackColor:).

Source

pub fn thumb_color( self, thumb_color: impl Into<WidgetStatePropertyRef<Option<Color>>>, ) -> SwitchListTile

Dart SwitchListTile(thumbColor:).

Source

pub fn track_color( self, track_color: impl Into<WidgetStatePropertyRef<Option<Color>>>, ) -> SwitchListTile

Dart SwitchListTile(trackColor:).

Source

pub fn track_outline_color( self, track_outline_color: impl Into<WidgetStatePropertyRef<Option<Color>>>, ) -> SwitchListTile

Dart SwitchListTile(trackOutlineColor:).

Source

pub fn thumb_icon( self, thumb_icon: impl Into<WidgetStatePropertyRef<Option<Rc<Icon>>>>, ) -> SwitchListTile

Dart SwitchListTile(thumbIcon:).

Source

pub fn material_tap_target_size( self, material_tap_target_size: impl Into<MaterialTapTargetSize>, ) -> SwitchListTile

Dart SwitchListTile(materialTapTargetSize:).

Source

pub fn mouse_cursor( self, mouse_cursor: impl Into<MouseCursorRef>, ) -> SwitchListTile

Dart SwitchListTile(mouseCursor:).

Source

pub fn overlay_color( self, overlay_color: impl Into<WidgetStatePropertyRef<Option<Color>>>, ) -> SwitchListTile

Dart SwitchListTile(overlayColor:).

Source

pub fn splash_radius(self, splash_radius: impl Into<f64>) -> SwitchListTile

Dart SwitchListTile(splashRadius:).

Source

pub fn focus_node(self, focus_node: impl Into<FocusNodeRef>) -> SwitchListTile

Dart SwitchListTile(focusNode:).

Source

pub fn states_controller( self, states_controller: impl Into<Ref<WidgetStatesController>>, ) -> SwitchListTile

Dart SwitchListTile(statesController:).

Source

pub fn on_focus_change( self, on_focus_change: impl Into<ValueChanged<bool>>, ) -> SwitchListTile

Dart SwitchListTile(onFocusChange:).

Source

pub fn apply_cupertino_theme( self, apply_cupertino_theme: impl Into<bool>, ) -> SwitchListTile

Dart SwitchListTile(applyCupertinoTheme:).

Source

pub fn tile_color(self, tile_color: impl Into<Color>) -> SwitchListTile

Dart SwitchListTile(tileColor:).

Source

pub fn is_three_line(self, is_three_line: impl Into<bool>) -> SwitchListTile

Dart SwitchListTile(isThreeLine:).

Source

pub fn dense(self, dense: impl Into<bool>) -> SwitchListTile

Dart SwitchListTile(dense:).

Source

pub fn content_padding( self, content_padding: impl Into<EdgeInsetsGeometry>, ) -> SwitchListTile

Dart SwitchListTile(contentPadding:).

Source

pub fn control_affinity( self, control_affinity: impl Into<ListTileControlAffinity>, ) -> SwitchListTile

Dart SwitchListTile(controlAffinity:).

Source

pub fn shape(self, shape: impl Into<ShapeBorderRef>) -> SwitchListTile

Dart SwitchListTile(shape:).

Source

pub fn selected_tile_color( self, selected_tile_color: impl Into<Color>, ) -> SwitchListTile

Dart SwitchListTile(selectedTileColor:).

Source

pub fn visual_density( self, visual_density: impl Into<VisualDensity>, ) -> SwitchListTile

Dart SwitchListTile(visualDensity:).

Source

pub fn enable_feedback(self, enable_feedback: impl Into<bool>) -> SwitchListTile

Dart SwitchListTile(enableFeedback:).

Source

pub fn horizontal_title_gap( self, horizontal_title_gap: impl Into<f64>, ) -> SwitchListTile

Dart SwitchListTile(horizontalTitleGap:).

Source

pub fn min_vertical_padding( self, min_vertical_padding: impl Into<f64>, ) -> SwitchListTile

Dart SwitchListTile(minVerticalPadding:).

Source

pub fn min_leading_width( self, min_leading_width: impl Into<f64>, ) -> SwitchListTile

Dart SwitchListTile(minLeadingWidth:).

Source

pub fn min_tile_height(self, min_tile_height: impl Into<f64>) -> SwitchListTile

Dart SwitchListTile(minTileHeight:).

Source

pub fn hover_color(self, hover_color: impl Into<Color>) -> SwitchListTile

Dart SwitchListTile(hoverColor:).

Source

pub fn title<K>(self, title: impl IntoWidget<K>) -> SwitchListTile

Dart SwitchListTile(title:).

Source

pub fn subtitle<K>(self, subtitle: impl IntoWidget<K>) -> SwitchListTile

Dart SwitchListTile(subtitle:).

Source

pub fn secondary<K>(self, secondary: impl IntoWidget<K>) -> SwitchListTile

Dart SwitchListTile(secondary:).

Source

pub fn drag_start_behavior( self, drag_start_behavior: DragStartBehavior, ) -> SwitchListTile

Dart SwitchListTile(dragStartBehavior:).

Source

pub fn autofocus(self, autofocus: bool) -> SwitchListTile

Dart SwitchListTile(autofocus:).

Source

pub fn internal_add_semantic_for_on_tap( self, internal_add_semantic_for_on_tap: bool, ) -> SwitchListTile

Dart SwitchListTile(internalAddSemanticForOnTap:).

Source

pub fn selected(self, selected: bool) -> SwitchListTile

Dart SwitchListTile(selected:).

Source

pub fn effective_apply_cupertino_theme(&self) -> Option<bool>

Dart’s applyCupertinoTheme field: what apply_cupertino_theme was given, and false for a tile made with SwitchListTile::new, whose constructor sets it so.

Trait Implementations§

Source§

impl Debug for SwitchListTile

Source§

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

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

impl StatelessWidget for SwitchListTile

Source§

fn key(&self) -> Option<&KeyRef>

Source§

fn debug_check_constructor(&self)

Dart’s constructor asserts that relate two or more arguments. Read more
Source§

fn build(&self, app: &mut App, context: BuildContext) -> WidgetRef

Describes the part of the user interface represented by this widget. Read more
Source§

fn debug_fill_properties( &self, _app: &App, properties: &mut DiagnosticPropertiesBuilder, )

Dart’s debugFillProperties: the properties a dump shows for this widget, in Dart’s order. Dart’s Widget base only sets the dense tree style, which the framework does.
Source§

fn as_preferred_size_widget( &self, ) -> Option<&(dyn PreferredSizeWidget + 'static)>

Dart’s this is PreferredSizeWidget: a widget that implements PreferredSizeWidget answers with itself, which is what a parent asking an erased child for its preferred size reads.

Auto Trait Implementations§

§

impl !RefUnwindSafe for SwitchListTile

§

impl !Send for SwitchListTile

§

impl !Sync for SwitchListTile

§

impl !UnwindSafe for SwitchListTile

§

impl Forget for SwitchListTile

§

impl Freeze for SwitchListTile
where *const RcInner<dyn Key> is !null: Freeze, PhantomData<RcInner<dyn Key>>: Freeze, *const RcInner<dyn Fn(&mut App, bool)> is !null: Freeze, PhantomData<RcInner<dyn Fn(&mut App, bool)>>: Freeze, *const RcInner<dyn WidgetStateProperty<Option<Color>>> is !null: Freeze, PhantomData<RcInner<dyn WidgetStateProperty<Option<Color>>>>: Freeze, *const RcInner<dyn WidgetStateProperty<Option<Rc<Icon>>>> is !null: Freeze, PhantomData<RcInner<dyn WidgetStateProperty<Option<Rc<Icon>>>>>: Freeze, *const RcInner<dyn MouseCursor> is !null: Freeze, PhantomData<RcInner<dyn MouseCursor>>: Freeze, NonZero<u32>: Freeze, &'static FocusNodeVTable: Freeze, *const RcInner<Keep> is !null: Freeze, PhantomData<RcInner<Keep>>: Freeze, PhantomData<fn() -> WidgetStatesController>: Freeze, *const RcInner<dyn Widget> is !null: Freeze, PhantomData<RcInner<dyn Widget>>: Freeze, *const RcInner<dyn ShapeBorder> is !null: Freeze, PhantomData<RcInner<dyn ShapeBorder>>: Freeze,

§

impl Move for SwitchListTile

§

impl Unpin for SwitchListTile
where Rc<dyn Key>: Unpin, Rc<dyn Fn(&mut App, bool)>: Unpin, Rc<dyn WidgetStateProperty<Option<Color>>>: Unpin, Rc<dyn WidgetStateProperty<Option<Rc<Icon>>>>: Unpin, Rc<dyn MouseCursor>: Unpin, NonZero<u32>: Unpin, &'static FocusNodeVTable: Unpin, Rc<Keep>: Unpin, Rc<dyn Widget>: Unpin, Rc<dyn ShapeBorder>: Unpin,

§

impl UnsafeUnpin for SwitchListTile
where *const RcInner<dyn Key> is !null: UnsafeUnpin, PhantomData<RcInner<dyn Key>>: UnsafeUnpin, *const RcInner<dyn Fn(&mut App, bool)> is !null: UnsafeUnpin, PhantomData<RcInner<dyn Fn(&mut App, bool)>>: UnsafeUnpin, *const RcInner<dyn WidgetStateProperty<Option<Color>>> is !null: UnsafeUnpin, PhantomData<RcInner<dyn WidgetStateProperty<Option<Color>>>>: UnsafeUnpin, *const RcInner<dyn WidgetStateProperty<Option<Rc<Icon>>>> is !null: UnsafeUnpin, PhantomData<RcInner<dyn WidgetStateProperty<Option<Rc<Icon>>>>>: UnsafeUnpin, *const RcInner<dyn MouseCursor> is !null: UnsafeUnpin, PhantomData<RcInner<dyn MouseCursor>>: UnsafeUnpin, NonZeroU32Inner: UnsafeUnpin, &'static FocusNodeVTable: UnsafeUnpin, *const RcInner<Keep> is !null: UnsafeUnpin, PhantomData<RcInner<Keep>>: UnsafeUnpin, PhantomData<fn() -> WidgetStatesController>: UnsafeUnpin, *const RcInner<dyn Widget> is !null: UnsafeUnpin, PhantomData<RcInner<dyn Widget>>: UnsafeUnpin, *const RcInner<dyn ShapeBorder> is !null: UnsafeUnpin, PhantomData<RcInner<dyn ShapeBorder>>: UnsafeUnpin,

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> Downcast<T> for T

Source§

fn downcast(&self) -> &T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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<W> IntoWidget<StatelessKind> for W
where W: StatelessWidget,

Source§

fn into_widget(self) -> Rc<dyn Widget>

The widget as a tree node, made where this is called: its creation_location.
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>