pub enum Oco<'a, T>{
Borrowed(&'a T),
Counted(Arc<T>),
Owned(<T as ToOwned>::Owned),
}Expand description
“Owned Clones Once”: a smart pointer that can be either a reference, an owned value, or a reference-counted pointer. This is useful for storing immutable values, such as strings, in a way that is cheap to clone and pass around.
The cost of the Clone implementation depends on the branch. Cloning the Oco::Borrowed
variant simply copies the references (O(1)). Cloning the Oco::Counted
variant increments a reference count (O(1)). Cloning the Oco::Owned
variant requires an O(n) clone of the data.
For an amortized O(1) clone, you can use Oco::clone_inplace(). Using this method,
Oco::Borrowed and Oco::Counted are still O(1). Oco::Owned does a single O(n)
clone, but converts the object to the Oco::Counted branch, which means future clones will
be O(1).
In general, you’ll either want to call clone_inplace() once, before sharing the Oco with
other parts of your application (so that all future clones are O(1)), or simply use this as
if it is a Cow with an additional branch for reference-counted values.
Variants§
Borrowed(&'a T)
A static reference to a value.
Counted(Arc<T>)
A reference counted pointer to a value.
Owned(<T as ToOwned>::Owned)
An owned value.
Implementations§
Source§impl<T> Oco<'_, T>
impl<T> Oco<'_, T>
Sourcepub fn into_owned(self) -> <T as ToOwned>::Owned
pub fn into_owned(self) -> <T as ToOwned>::Owned
Converts the value into an owned value.
Sourcepub const fn is_borrowed(&self) -> bool
pub const fn is_borrowed(&self) -> bool
Checks if the value is Oco::Borrowed.
§Examples
assert!(Oco::<str>::Borrowed("Hello").is_borrowed());
assert!(!Oco::<str>::Counted(Arc::from("Hello")).is_borrowed());
assert!(!Oco::<str>::Owned("Hello".to_string()).is_borrowed());Sourcepub const fn is_counted(&self) -> bool
pub const fn is_counted(&self) -> bool
Checks if the value is Oco::Counted.
§Examples
assert!(Oco::<str>::Counted(Arc::from("Hello")).is_counted());
assert!(!Oco::<str>::Borrowed("Hello").is_counted());
assert!(!Oco::<str>::Owned("Hello".to_string()).is_counted());Sourcepub const fn is_owned(&self) -> bool
pub const fn is_owned(&self) -> bool
Checks if the value is Oco::Owned.
§Examples
assert!(Oco::<str>::Owned("Hello".to_string()).is_owned());
assert!(!Oco::<str>::Borrowed("Hello").is_owned());
assert!(!Oco::<str>::Counted(Arc::from("Hello")).is_owned());Source§impl<'a, T> Oco<'a, T>
impl<'a, T> Oco<'a, T>
Sourcepub fn upgrade_inplace(&mut self)
pub fn upgrade_inplace(&mut self)
Upgrades the value in place, by converting into Oco::Counted if it
was previously Oco::Owned.
§Examples
let mut oco1 = Oco::<str>::Owned("Hello".to_string());
assert!(oco1.is_owned());
oco1.upgrade_inplace();
assert!(oco1.is_counted());Sourcepub fn clone_inplace(&mut self) -> Oco<'a, T>
pub fn clone_inplace(&mut self) -> Oco<'a, T>
Clones the value with inplace conversion into Oco::Counted if it
was previously Oco::Owned.
§Examples
let mut oco1 = Oco::<str>::Owned("Hello".to_string());
let oco2 = oco1.clone_inplace();
assert_eq!(oco1, oco2);
assert!(oco1.is_counted());
assert!(oco2.is_counted());Trait Implementations§
Source§impl<'a> AddAnyAttr for Oco<'static, str>
impl<'a> AddAnyAttr for Oco<'static, str>
Source§impl AttributeValue for Oco<'static, str>
impl AttributeValue for Oco<'static, str>
Source§type AsyncOutput = Oco<'static, str>
type AsyncOutput = Oco<'static, str>
Source§type State = (Element, Oco<'static, str>)
type State = (Element, Oco<'static, str>)
Source§type Cloneable = Oco<'static, str>
type Cloneable = Oco<'static, str>
FnMut() continues mutating the same
closure), but making a String cloneable does not necessarily need to make it an
Arc<str>, as two different clones of a String will still have the same value.Source§type CloneableOwned = Oco<'static, str>
type CloneableOwned = Oco<'static, str>
'static. This is used for spreading across types when the
spreadable attribute needs to be owned. In some cases (&'a str to Arc<str>, etc.) the owned
cloneable type has worse performance than the cloneable type, so they are separate.Source§fn to_template(_key: &str, _buf: &mut String)
fn to_template(_key: &str, _buf: &mut String)
<template>.Source§fn hydrate<const FROM_SERVER: bool>(
self,
key: &str,
el: &Element,
) -> <Oco<'static, str> as AttributeValue>::State
fn hydrate<const FROM_SERVER: bool>( self, key: &str, el: &Element, ) -> <Oco<'static, str> as AttributeValue>::State
<template>.Source§fn build(
self,
el: &Element,
key: &str,
) -> <Oco<'static, str> as AttributeValue>::State
fn build( self, el: &Element, key: &str, ) -> <Oco<'static, str> as AttributeValue>::State
Source§fn rebuild(
self,
key: &str,
state: &mut <Oco<'static, str> as AttributeValue>::State,
)
fn rebuild( self, key: &str, state: &mut <Oco<'static, str> as AttributeValue>::State, )
Source§fn into_cloneable(self) -> <Oco<'static, str> as AttributeValue>::Cloneable
fn into_cloneable(self) -> <Oco<'static, str> as AttributeValue>::Cloneable
Source§fn into_cloneable_owned(
self,
) -> <Oco<'static, str> as AttributeValue>::CloneableOwned
fn into_cloneable_owned( self, ) -> <Oco<'static, str> as AttributeValue>::CloneableOwned
'static.Source§fn dry_resolve(&mut self)
fn dry_resolve(&mut self)
Source§async fn resolve(self) -> <Oco<'static, str> as AttributeValue>::AsyncOutput
async fn resolve(self) -> <Oco<'static, str> as AttributeValue>::AsyncOutput
Source§impl<'a, T> Clone for Oco<'a, T>
impl<'a, T> Clone for Oco<'a, T>
Source§fn clone(&self) -> Oco<'a, T>
fn clone(&self) -> Oco<'a, T>
Returns a new Oco with the same value as this one.
If the value is Oco::Owned, this will convert it into
Oco::Counted, so that the next clone will be O(1).
§Examples
String :
let oco = Oco::<str>::Owned("Hello".to_string());
let oco2 = oco.clone();
assert_eq!(oco, oco2);
assert!(oco2.is_counted());Vec :
let oco = Oco::<[u8]>::Owned(b"Hello".to_vec());
let oco2 = oco.clone();
assert_eq!(oco, oco2);
assert!(oco2.is_counted());1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<'a, T> Deserialize<'a> for Oco<'static, T>
impl<'a, T> Deserialize<'a> for Oco<'static, T>
Source§fn deserialize<D>(
deserializer: D,
) -> Result<Oco<'static, T>, <D as Deserializer<'a>>::Error>where
D: Deserializer<'a>,
fn deserialize<D>(
deserializer: D,
) -> Result<Oco<'static, T>, <D as Deserializer<'a>>::Error>where
D: Deserializer<'a>,
Source§impl IntoClass for Oco<'static, str>
impl IntoClass for Oco<'static, str>
Source§type AsyncOutput = Oco<'static, str>
type AsyncOutput = Oco<'static, str>
Source§type State = (Element, Oco<'static, str>)
type State = (Element, Oco<'static, str>)
Source§type CloneableOwned = Oco<'static, str>
type CloneableOwned = Oco<'static, str>
'static.Source§fn hydrate<const FROM_SERVER: bool>(
self,
el: &Element,
) -> <Oco<'static, str> as IntoClass>::State
fn hydrate<const FROM_SERVER: bool>( self, el: &Element, ) -> <Oco<'static, str> as IntoClass>::State
<template>.Source§fn build(self, el: &Element) -> <Oco<'static, str> as IntoClass>::State
fn build(self, el: &Element) -> <Oco<'static, str> as IntoClass>::State
Source§fn into_cloneable(self) -> <Oco<'static, str> as IntoClass>::Cloneable
fn into_cloneable(self) -> <Oco<'static, str> as IntoClass>::Cloneable
Source§fn into_cloneable_owned(
self,
) -> <Oco<'static, str> as IntoClass>::CloneableOwned
fn into_cloneable_owned( self, ) -> <Oco<'static, str> as IntoClass>::CloneableOwned
Source§fn dry_resolve(&mut self)
fn dry_resolve(&mut self)
Source§async fn resolve(self) -> <Oco<'static, str> as IntoClass>::AsyncOutput
async fn resolve(self) -> <Oco<'static, str> as IntoClass>::AsyncOutput
Source§fn reset(state: &mut <Oco<'static, str> as IntoClass>::State)
fn reset(state: &mut <Oco<'static, str> as IntoClass>::State)
Source§const MIN_LENGTH: usize = _
const MIN_LENGTH: usize = _
Source§fn to_template(class: &mut String)
fn to_template(class: &mut String)
<template>.Source§impl IntoProperty for Oco<'static, str>
impl IntoProperty for Oco<'static, str>
Source§type CloneableOwned = Oco<'static, str>
type CloneableOwned = Oco<'static, str>
'static.Source§fn hydrate<const FROM_SERVER: bool>(
self,
el: &Element,
key: &str,
) -> <Oco<'static, str> as IntoProperty>::State
fn hydrate<const FROM_SERVER: bool>( self, el: &Element, key: &str, ) -> <Oco<'static, str> as IntoProperty>::State
Source§fn build(
self,
el: &Element,
key: &str,
) -> <Oco<'static, str> as IntoProperty>::State
fn build( self, el: &Element, key: &str, ) -> <Oco<'static, str> as IntoProperty>::State
Source§fn rebuild(
self,
state: &mut <Oco<'static, str> as IntoProperty>::State,
key: &str,
)
fn rebuild( self, state: &mut <Oco<'static, str> as IntoProperty>::State, key: &str, )
Source§fn into_cloneable(self) -> <Oco<'static, str> as IntoProperty>::Cloneable
fn into_cloneable(self) -> <Oco<'static, str> as IntoProperty>::Cloneable
Source§fn into_cloneable_owned(
self,
) -> <Oco<'static, str> as IntoProperty>::CloneableOwned
fn into_cloneable_owned( self, ) -> <Oco<'static, str> as IntoProperty>::CloneableOwned
Source§impl IntoStyle for Oco<'static, str>
impl IntoStyle for Oco<'static, str>
Source§type AsyncOutput = Oco<'static, str>
type AsyncOutput = Oco<'static, str>
Source§type State = (Element, Oco<'static, str>)
type State = (Element, Oco<'static, str>)
Source§type CloneableOwned = Oco<'static, str>
type CloneableOwned = Oco<'static, str>
'static.Source§fn hydrate<const FROM_SERVER: bool>(
self,
el: &Element,
) -> <Oco<'static, str> as IntoStyle>::State
fn hydrate<const FROM_SERVER: bool>( self, el: &Element, ) -> <Oco<'static, str> as IntoStyle>::State
<template>.Source§fn build(self, el: &Element) -> <Oco<'static, str> as IntoStyle>::State
fn build(self, el: &Element) -> <Oco<'static, str> as IntoStyle>::State
Source§fn into_cloneable(self) -> <Oco<'static, str> as IntoStyle>::Cloneable
fn into_cloneable(self) -> <Oco<'static, str> as IntoStyle>::Cloneable
Source§fn into_cloneable_owned(
self,
) -> <Oco<'static, str> as IntoStyle>::CloneableOwned
fn into_cloneable_owned( self, ) -> <Oco<'static, str> as IntoStyle>::CloneableOwned
Source§fn dry_resolve(&mut self)
fn dry_resolve(&mut self)
Source§impl IntoStyleValue for Oco<'static, str>
impl IntoStyleValue for Oco<'static, str>
Source§type AsyncOutput = Oco<'static, str>
type AsyncOutput = Oco<'static, str>
Source§type CloneableOwned = Oco<'static, str>
type CloneableOwned = Oco<'static, str>
'static.Source§fn build(
self,
style: &CssStyleDeclaration,
name: &str,
) -> <Oco<'static, str> as IntoStyleValue>::State
fn build( self, style: &CssStyleDeclaration, name: &str, ) -> <Oco<'static, str> as IntoStyleValue>::State
Source§fn rebuild(
self,
style: &CssStyleDeclaration,
name: &str,
state: &mut <Oco<'static, str> as IntoStyleValue>::State,
)
fn rebuild( self, style: &CssStyleDeclaration, name: &str, state: &mut <Oco<'static, str> as IntoStyleValue>::State, )
Source§fn hydrate(
self,
_style: &CssStyleDeclaration,
_name: &str,
) -> <Oco<'static, str> as IntoStyleValue>::State
fn hydrate( self, _style: &CssStyleDeclaration, _name: &str, ) -> <Oco<'static, str> as IntoStyleValue>::State
<template>.Source§fn into_cloneable(self) -> <Oco<'static, str> as IntoStyleValue>::Cloneable
fn into_cloneable(self) -> <Oco<'static, str> as IntoStyleValue>::Cloneable
Source§fn into_cloneable_owned(
self,
) -> <Oco<'static, str> as IntoStyleValue>::CloneableOwned
fn into_cloneable_owned( self, ) -> <Oco<'static, str> as IntoStyleValue>::CloneableOwned
Source§fn dry_resolve(&mut self)
fn dry_resolve(&mut self)
Source§async fn resolve(self) -> <Oco<'static, str> as IntoStyleValue>::AsyncOutput
async fn resolve(self) -> <Oco<'static, str> as IntoStyleValue>::AsyncOutput
Source§impl<T> Ord for Oco<'_, T>
impl<T> Ord for Oco<'_, T>
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl<'b, A, B> PartialOrd<Oco<'b, B>> for Oco<'_, A>
impl<'b, A, B> PartialOrd<Oco<'b, B>> for Oco<'_, A>
Source§impl Render for Oco<'static, str>
impl Render for Oco<'static, str>
Source§impl RenderHtml for Oco<'static, str>
impl RenderHtml for Oco<'static, str>
Source§const MIN_LENGTH: usize = 0
const MIN_LENGTH: usize = 0
Source§type AsyncOutput = Oco<'static, str>
type AsyncOutput = Oco<'static, str>
Source§fn dry_resolve(&mut self)
fn dry_resolve(&mut self)
Source§async fn resolve(self) -> <Oco<'static, str> as RenderHtml>::AsyncOutput
async fn resolve(self) -> <Oco<'static, str> as RenderHtml>::AsyncOutput
Source§fn to_html_with_buf(
self,
buf: &mut String,
position: &mut Position,
escape: bool,
mark_branches: bool,
extra_attrs: Vec<AnyAttribute>,
)
fn to_html_with_buf( self, buf: &mut String, position: &mut Position, escape: bool, mark_branches: bool, extra_attrs: Vec<AnyAttribute>, )
Source§fn hydrate<const FROM_SERVER: bool>(
self,
cursor: &Cursor,
position: &PositionState,
) -> <Oco<'static, str> as Render>::State
fn hydrate<const FROM_SERVER: bool>( self, cursor: &Cursor, position: &PositionState, ) -> <Oco<'static, str> as Render>::State
Source§fn into_owned(self) -> <Oco<'static, str> as RenderHtml>::Owned
fn into_owned(self) -> <Oco<'static, str> as RenderHtml>::Owned
'static.Source§const EXISTS: bool = true
const EXISTS: bool = true
Source§fn html_len(&self) -> usize
fn html_len(&self) -> usize
Source§fn to_html_branching(self) -> Stringwhere
Self: Sized,
fn to_html_branching(self) -> Stringwhere
Self: Sized,
Source§fn to_html_stream_in_order(self) -> StreamBuilderwhere
Self: Sized,
fn to_html_stream_in_order(self) -> StreamBuilderwhere
Self: Sized,
Source§fn to_html_stream_in_order_branching(self) -> StreamBuilderwhere
Self: Sized,
fn to_html_stream_in_order_branching(self) -> StreamBuilderwhere
Self: Sized,
Source§fn to_html_stream_out_of_order(self) -> StreamBuilderwhere
Self: Sized,
fn to_html_stream_out_of_order(self) -> StreamBuilderwhere
Self: Sized,
Source§fn to_html_stream_out_of_order_branching(self) -> StreamBuilderwhere
Self: Sized,
fn to_html_stream_out_of_order_branching(self) -> StreamBuilderwhere
Self: Sized,
Source§fn to_html_async_with_buf<const OUT_OF_ORDER: bool>(
self,
buf: &mut StreamBuilder,
position: &mut Position,
escape: bool,
mark_branches: bool,
extra_attrs: Vec<AnyAttribute>,
)where
Self: Sized,
fn to_html_async_with_buf<const OUT_OF_ORDER: bool>(
self,
buf: &mut StreamBuilder,
position: &mut Position,
escape: bool,
mark_branches: bool,
extra_attrs: Vec<AnyAttribute>,
)where
Self: Sized,
Source§fn hydrate_async(
self,
cursor: &Cursor,
position: &PositionState,
) -> impl Future<Output = Self::State>
fn hydrate_async( self, cursor: &Cursor, position: &PositionState, ) -> impl Future<Output = Self::State>
Source§fn hydrate_from<const FROM_SERVER: bool>(self, el: &Element) -> Self::Statewhere
Self: Sized,
fn hydrate_from<const FROM_SERVER: bool>(self, el: &Element) -> Self::Statewhere
Self: Sized,
RenderHtml::hydrate, beginning at the given element.Source§fn hydrate_from_position<const FROM_SERVER: bool>(
self,
el: &Element,
position: Position,
) -> Self::Statewhere
Self: Sized,
fn hydrate_from_position<const FROM_SERVER: bool>(
self,
el: &Element,
position: Position,
) -> Self::Statewhere
Self: Sized,
RenderHtml::hydrate, beginning at the given element and position.Source§impl<'a, T> Serialize for Oco<'a, T>
impl<'a, T> Serialize for Oco<'a, T>
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Source§impl ToTemplate for Oco<'static, str>
impl ToTemplate for Oco<'static, str>
Source§const TEMPLATE: &'static str = <&str as ToTemplate>::TEMPLATE
const TEMPLATE: &'static str = <&str as ToTemplate>::TEMPLATE
Source§fn to_template(
buf: &mut String,
class: &mut String,
style: &mut String,
inner_html: &mut String,
position: &mut Position,
)
fn to_template( buf: &mut String, class: &mut String, style: &mut String, inner_html: &mut String, position: &mut Position, )
<template> that corresponds
to a view of a particular type.impl<T> Eq for Oco<'_, T>
Auto Trait Implementations§
impl<'a, T> Freeze for Oco<'a, T>
impl<'a, T> RefUnwindSafe for Oco<'a, T>
impl<'a, T> Send for Oco<'a, T>
impl<'a, T> Sync for Oco<'a, T>
impl<'a, T> Unpin for Oco<'a, T>
impl<'a, T> UnwindSafe for Oco<'a, T>
Blanket Implementations§
Source§impl<V, Key, Sig, T> BindAttribute<Key, Sig, T> for Vwhere
V: AddAnyAttr,
Key: AttributeKey,
Sig: IntoSplitSignal<Value = T>,
T: FromEventTarget + AttributeValue + PartialEq + Sync + 'static,
Signal<BoolOrT<T>>: IntoProperty,
<Sig as IntoSplitSignal>::Read: Get<Value = T> + Send + Sync + Clone + 'static,
<Sig as IntoSplitSignal>::Write: Send + Clone + 'static,
Element: GetValue<T>,
impl<V, Key, Sig, T> BindAttribute<Key, Sig, T> for Vwhere
V: AddAnyAttr,
Key: AttributeKey,
Sig: IntoSplitSignal<Value = T>,
T: FromEventTarget + AttributeValue + PartialEq + Sync + 'static,
Signal<BoolOrT<T>>: IntoProperty,
<Sig as IntoSplitSignal>::Read: Get<Value = T> + Send + Sync + Clone + 'static,
<Sig as IntoSplitSignal>::Write: Send + Clone + 'static,
Element: GetValue<T>,
Source§type Output = <V as AddAnyAttr>::Output<Bind<Key, T, <Sig as IntoSplitSignal>::Read, <Sig as IntoSplitSignal>::Write>>
type Output = <V as AddAnyAttr>::Output<Bind<Key, T, <Sig as IntoSplitSignal>::Read, <Sig as IntoSplitSignal>::Write>>
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
Source§impl<T> Casing<T> for T
impl<T> Casing<T> for T
Source§fn to_case(&self, case: Case) -> String
fn to_case(&self, case: Case) -> String
self and create a new
String with the same pattern and delimeter as case. It will split on boundaries
defined at Boundary::defaults(). Read moreSource§fn with_boundaries(&self, bs: &[Boundary]) -> StateConverter<'_, T>
fn with_boundaries(&self, bs: &[Boundary]) -> StateConverter<'_, T>
StateConverter struct initialized with the boundaries
provided. Read moreSource§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<T, K, V> CustomAttribute<K, V> for T
impl<T, K, V> CustomAttribute<K, V> for T
Source§fn attr(self, key: K, value: V) -> Self::Output<CustomAttr<K, V>>
fn attr(self, key: K, value: V) -> Self::Output<CustomAttr<K, V>>
Source§impl<V, T, P, D> DirectiveAttribute<T, P, D> for V
impl<V, T, P, D> DirectiveAttribute<T, P, D> for V
Source§type Output = <V as AddAnyAttr>::Output<Directive<T, D, P>>
type Output = <V as AddAnyAttr>::Output<Directive<T, D, P>>
Source§fn directive(
self,
handler: D,
param: P,
) -> <V as DirectiveAttribute<T, P, D>>::Output
fn directive( self, handler: D, param: P, ) -> <V as DirectiveAttribute<T, P, D>>::Output
Source§impl<T> ElementExt for T
impl<T> ElementExt for T
Source§fn attr<At>(&self, attribute: At) -> <At as Attribute>::Statewhere
At: Attribute,
fn attr<At>(&self, attribute: At) -> <At as Attribute>::Statewhere
At: Attribute,
Source§fn class<C>(&self, class: C) -> <C as IntoClass>::Statewhere
C: IntoClass,
fn class<C>(&self, class: C) -> <C as IntoClass>::Statewhere
C: IntoClass,
Source§fn on<E>(
&self,
ev: E,
cb: impl FnMut(<E as EventDescriptor>::EventType) + 'static,
) -> RemoveEventHandler<Element>where
E: EventDescriptor + Send + 'static,
<E as EventDescriptor>::EventType: 'static + From<JsValue>,
fn on<E>(
&self,
ev: E,
cb: impl FnMut(<E as EventDescriptor>::EventType) + 'static,
) -> RemoveEventHandler<Element>where
E: EventDescriptor + Send + 'static,
<E as EventDescriptor>::EventType: 'static + From<JsValue>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> FromFormData for Twhere
T: DeserializeOwned,
impl<T> FromFormData for Twhere
T: DeserializeOwned,
Source§fn from_event(ev: &Event) -> Result<T, FromFormDataError>
fn from_event(ev: &Event) -> Result<T, FromFormDataError>
submit event.Source§impl<T> IntoAny for Twhere
T: Send + RenderHtml,
impl<T> IntoAny for Twhere
T: Send + RenderHtml,
Source§impl<T> IntoAttributeValue for Twhere
T: AttributeValue,
impl<T> IntoAttributeValue for Twhere
T: AttributeValue,
Source§fn into_attribute_value(self) -> <T as IntoAttributeValue>::Output
fn into_attribute_value(self) -> <T as IntoAttributeValue>::Output
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>
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>
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