Exclusive

Struct Exclusive 

Source
#[repr(transparent)]
pub struct Exclusive<T>
where T: ?Sized,
{ inner: T, }
🔬This is a nightly-only experimental API. (exclusive_wrapper)
Expand description

Exclusive provides mutable access, also referred to as exclusive access to the underlying value. However, it only permits immutable, or shared access to the underlying value when that value is Sync.

While this may seem not very useful, it allows Exclusive to unconditionally implement Sync. Indeed, the safety requirements of Sync state that for Exclusive to be Sync, it must be sound to share across threads, that is, it must be sound for &Exclusive to cross thread boundaries. By design, a &Exclusive<T> for non-Sync T has no API whatsoever, making it useless, thus harmless, thus memory safe.

Certain constructs like Futures can only be used with exclusive access, and are often Send but not Sync, so Exclusive can be used as hint to the Rust compiler that something is Sync in practice.

§Examples

Using a non-Sync future prevents the wrapping struct from being Sync:

use core::cell::Cell;

async fn other() {}
fn assert_sync<T: Sync>(t: T) {}
struct State<F> {
    future: F
}

assert_sync(State {
    future: async {
        let cell = Cell::new(1);
        let cell_ref = &cell;
        other().await;
        let value = cell_ref.get();
    }
});

Exclusive ensures the struct is Sync without stripping the future of its functionality:

#![feature(exclusive_wrapper)]
use core::cell::Cell;
use core::sync::Exclusive;

async fn other() {}
fn assert_sync<T: Sync>(t: T) {}
struct State<F> {
    future: Exclusive<F>
}

assert_sync(State {
    future: Exclusive::new(async {
        let cell = Cell::new(1);
        let cell_ref = &cell;
        other().await;
        let value = cell_ref.get();
    })
});

§Parallels with a mutex

In some sense, Exclusive can be thought of as a compile-time version of a mutex, as the borrow-checker guarantees that only one &mut can exist for any value. This is a parallel with the fact that & and &mut references together can be thought of as a compile-time version of a read-write lock.

Fields§

§inner: T
🔬This is a nightly-only experimental API. (exclusive_wrapper)

Implementations§

Source§

impl<T> Exclusive<T>

Source

pub const fn new(t: T) -> Exclusive<T>

🔬This is a nightly-only experimental API. (exclusive_wrapper)

Wrap a value in an Exclusive

Source

pub const fn into_inner(self) -> T

🔬This is a nightly-only experimental API. (exclusive_wrapper)

Unwrap the value contained in the Exclusive

Source§

impl<T> Exclusive<T>
where T: ?Sized,

Source

pub const fn get_mut(&mut self) -> &mut T

🔬This is a nightly-only experimental API. (exclusive_wrapper)

Gets exclusive access to the underlying value.

Source

pub const fn get_pin_mut(self: Pin<&mut Exclusive<T>>) -> Pin<&mut T>

🔬This is a nightly-only experimental API. (exclusive_wrapper)

Gets pinned exclusive access to the underlying value.

Exclusive is considered to structurally pin the underlying value, which means unpinned Exclusives can produce unpinned access to the underlying value, but pinned Exclusives only produce pinned access to the underlying value.

Source

pub const fn from_mut(r: &mut T) -> &mut Exclusive<T>

🔬This is a nightly-only experimental API. (exclusive_wrapper)

Build a mutable reference to an Exclusive<T> from a mutable reference to a T. This allows you to skip building an Exclusive with Exclusive::new.

Source

pub const fn from_pin_mut(r: Pin<&mut T>) -> Pin<&mut Exclusive<T>>

🔬This is a nightly-only experimental API. (exclusive_wrapper)

Build a pinned mutable reference to an Exclusive<T> from a pinned mutable reference to a T. This allows you to skip building an Exclusive with Exclusive::new.

Trait Implementations§

Source§

impl<T> AsRef<T> for Exclusive<T>
where T: Sync + ?Sized,

Source§

fn as_ref(&self) -> &T

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl<T> Clone for Exclusive<T>
where T: Sync + Clone,

Source§

fn clone(&self) -> Exclusive<T>

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<R, G> Coroutine<R> for Exclusive<G>
where G: Coroutine<R> + ?Sized,

Source§

type Yield = <G as Coroutine<R>>::Yield

🔬This is a nightly-only experimental API. (coroutine_trait)
The type of value this coroutine yields. Read more
Source§

type Return = <G as Coroutine<R>>::Return

🔬This is a nightly-only experimental API. (coroutine_trait)
The type of value this coroutine returns. Read more
Source§

fn resume( self: Pin<&mut Exclusive<G>>, arg: R, ) -> CoroutineState<<Exclusive<G> as Coroutine<R>>::Yield, <Exclusive<G> as Coroutine<R>>::Return>

🔬This is a nightly-only experimental API. (coroutine_trait)
Resumes the execution of this coroutine. Read more
Source§

impl<T> Debug for Exclusive<T>
where T: ?Sized,

Source§

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

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

impl<T> Default for Exclusive<T>
where T: Default + ?Sized,

Source§

fn default() -> Exclusive<T>

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

impl<F, Args> Fn<Args> for Exclusive<F>
where F: Sync + Fn<Args>, Args: Tuple,

Source§

extern "rust-call" fn call( &self, args: Args, ) -> <Exclusive<F> as FnOnce<Args>>::Output

🔬This is a nightly-only experimental API. (fn_traits)
Performs the call operation.
Source§

impl<F, Args> FnMut<Args> for Exclusive<F>
where F: FnMut<Args>, Args: Tuple,

Source§

extern "rust-call" fn call_mut( &mut self, args: Args, ) -> <Exclusive<F> as FnOnce<Args>>::Output

🔬This is a nightly-only experimental API. (fn_traits)
Performs the call operation.
Source§

impl<F, Args> FnOnce<Args> for Exclusive<F>
where F: FnOnce<Args>, Args: Tuple,

Source§

type Output = <F as FnOnce<Args>>::Output

The returned type after the call operator is used.
Source§

extern "rust-call" fn call_once( self, args: Args, ) -> <Exclusive<F> as FnOnce<Args>>::Output

🔬This is a nightly-only experimental API. (fn_traits)
Performs the call operation.
Source§

impl<T> From<T> for Exclusive<T>

Source§

fn from(t: T) -> Exclusive<T>

Converts to this type from the input type.
Source§

impl<T> Future for Exclusive<T>
where T: Future + ?Sized,

Source§

type Output = <T as Future>::Output

The type of value produced on completion.
Source§

fn poll( self: Pin<&mut Exclusive<T>>, cx: &mut Context<'_>, ) -> Poll<<Exclusive<T> as Future>::Output>

Attempts to resolve the future to a final value, registering the current task for wakeup if the value is not yet available. Read more
Source§

impl<T> Hash for Exclusive<T>
where T: Sync + Hash + ?Sized,

Source§

fn hash<H>(&self, state: &mut H)
where H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<T> Ord for Exclusive<T>
where T: Sync + Ord + ?Sized,

Source§

fn cmp(&self, other: &Exclusive<T>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl<T, U> PartialEq<Exclusive<U>> for Exclusive<T>
where T: Sync + PartialEq<U> + ?Sized, U: Sync + ?Sized,

Source§

fn eq(&self, other: &Exclusive<U>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<T, U> PartialOrd<Exclusive<U>> for Exclusive<T>
where T: Sync + PartialOrd<U> + ?Sized, U: Sync + ?Sized,

Source§

fn partial_cmp(&self, other: &Exclusive<U>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<T> Copy for Exclusive<T>
where T: Sync + Copy,

Source§

impl<T> Eq for Exclusive<T>
where T: Sync + Eq + ?Sized,

Source§

impl<T> StructuralPartialEq for Exclusive<T>

Source§

impl<T> Sync for Exclusive<T>
where T: ?Sized,

Auto Trait Implementations§

§

impl<T> Freeze for Exclusive<T>
where T: Freeze + ?Sized,

§

impl<T> RefUnwindSafe for Exclusive<T>
where T: RefUnwindSafe + ?Sized,

§

impl<T> Send for Exclusive<T>
where T: Send + ?Sized,

§

impl<T> Unpin for Exclusive<T>
where T: Unpin + ?Sized,

§

impl<T> UnwindSafe for Exclusive<T>
where T: UnwindSafe + ?Sized,

Blanket Implementations§

Source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S
where T: Real + Zero + Arithmetics + Clone, Swp: WhitePoint<T>, Dwp: WhitePoint<T>, D: AdaptFrom<S, Swp, Dwp, T>,

Source§

fn adapt_into_using<M>(self, method: M) -> D
where M: TransformMatrix<T>,

Convert the source color to the destination color using the specified method.
Source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford method by default.
§

impl<F, V> AddAnyAttr for F
where F: ReactiveFunction<Output = V>, V: RenderHtml + 'static,

§

type Output<SomeNewAttr: Attribute> = Box<dyn FnMut() -> <V as AddAnyAttr>::Output<<SomeNewAttr as Attribute>::CloneableOwned> + Send>

The new type once the attribute has been added.
§

fn add_any_attr<NewAttr>( self, attr: NewAttr, ) -> <F as AddAnyAttr>::Output<NewAttr>
where NewAttr: Attribute, <F as AddAnyAttr>::Output<NewAttr>: RenderHtml,

Adds an attribute to the view.
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, C> ArraysFrom<C> for T
where C: IntoArrays<T>,

Source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
Source§

impl<T, C> ArraysInto<C> for T
where C: FromArrays<T>,

Source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
§

impl<'c, E, F, T> AsyncHttpClient<'c> for T
where E: Error + 'static, F: Future<Output = Result<Response<Vec<u8>>, E>> + 'c, T: Fn(Request<Vec<u8>>) -> F,

§

type Error = E

Error type returned by HTTP client.
§

type Future = F

Future type returned by HTTP client.
§

fn call( &'c self, request: Request<Vec<u8>>, ) -> <T as AsyncHttpClient<'c>>::Future

Perform a single HTTP request.
§

impl<F, V> AttributeValue for F
where F: ReactiveFunction<Output = V>, V: AttributeValue + 'static, <V as AttributeValue>::State: 'static,

§

type AsyncOutput = <V as AttributeValue>::AsyncOutput

The type once all async data have loaded.
§

type State = RenderEffect<<V as AttributeValue>::State>

The state that should be retained between building and rebuilding.
§

type Cloneable = Arc<Mutex<dyn FnMut() -> V + Send>>

A version of the value that can be cloned. This can be the same type, or a reference-counted type. Generally speaking, this does not need to refer to the same data, but should behave in the same way. So for example, making an event handler cloneable should probably make it reference-counted (so that a 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.
§

type CloneableOwned = Arc<Mutex<dyn FnMut() -> V + Send>>

A cloneable type that is also '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.
§

fn html_len(&self) -> usize

An approximation of the actual length of this attribute in HTML.
§

fn to_html(self, key: &str, buf: &mut String)

Renders the attribute value to HTML.
§

fn to_template(_key: &str, _buf: &mut String)

Renders the attribute value to HTML for a <template>.
§

fn hydrate<const FROM_SERVER: bool>( self, key: &str, el: &Element, ) -> <F as AttributeValue>::State

Adds interactivity as necessary, given DOM nodes that were created from HTML that has either been rendered on the server, or cloned for a <template>.
§

fn build(self, el: &Element, key: &str) -> <F as AttributeValue>::State

Adds this attribute to the element during client-side rendering.
§

fn rebuild(self, key: &str, state: &mut <F as AttributeValue>::State)

Applies a new value for the attribute.
§

fn into_cloneable(self) -> <F as AttributeValue>::Cloneable

Converts this attribute into an equivalent that can be cloned.
§

fn into_cloneable_owned(self) -> <F as AttributeValue>::CloneableOwned

Converts this attributes into an equivalent that can be cloned and is 'static.
§

fn dry_resolve(&mut self)

“Runs” the attribute without other side effects. For primitive types, this is a no-op. For reactive types, this can be used to gather data about reactivity or about asynchronous data that needs to be loaded.
§

async fn resolve(self) -> <F as AttributeValue>::AsyncOutput

“Resolves” this into a form that is not waiting for any asynchronous data.
§

impl<V, Key, Sig, T> BindAttribute<Key, Sig, T> for V
where 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>,

§

type Output = <V as AddAnyAttr>::Output<Bind<Key, T, <Sig as IntoSplitSignal>::Read, <Sig as IntoSplitSignal>::Write>>

The type of the element with the two-way binding added.
§

fn bind( self, key: Key, signal: Sig, ) -> <V as BindAttribute<Key, Sig, T>>::Output

Adds a two-way binding to the element, which adds an attribute and an event listener to the element when the element is created or hydrated. Read more
Source§

impl<C, F> BlendFunction<C> for F
where C: Premultiply, F: FnOnce(PreAlpha<C>, PreAlpha<C>) -> PreAlpha<C>,

Source§

fn apply_to(self, source: PreAlpha<C>, destination: PreAlpha<C>) -> PreAlpha<C>

Apply this blend function to a pair of colors.
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
§

impl<F> Callback for F

§

fn on_request( self, request: &Request<()>, response: Response<()>, ) -> Result<Response<()>, Response<Option<String>>>

Called whenever the server read the request from the client and is ready to reply to it. May return additional reply headers. Returning an error resulting in rejecting the incoming connection.
Source§

impl<WpParam, T, U> Cam16IntoUnclamped<WpParam, T> for U
where T: FromCam16Unclamped<WpParam, U>,

Source§

type Scalar = <T as FromCam16Unclamped<WpParam, U>>::Scalar

The number type that’s used in parameters when converting.
Source§

fn cam16_into_unclamped( self, parameters: BakedParameters<WpParam, <U as Cam16IntoUnclamped<WpParam, T>>::Scalar>, ) -> T

Converts self into C, using the provided parameters.
§

impl<F, View> ChooseView for F
where F: Fn() -> View + Send + Clone + 'static, View: IntoAny,

§

async fn choose(self) -> AnyView

§

async fn preload(&self)

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
§

impl<Q, K> Comparable<K> for Q
where Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,

§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
§

impl<Func, T> ComponentConstructor<(), T> for Func
where Func: FnOnce() -> T,

§

fn construct(self, _: ()) -> T

§

impl<Func, T, P> ComponentConstructor<P, T> for Func
where Func: FnOnce(P) -> T, P: PropsOrNoPropsBuilder,

§

fn construct(self, props: P) -> T

Source§

impl<T, C> ComponentsFrom<C> for T
where C: IntoComponents<T>,

Source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
§

impl<C, F> ContainsToken<C> for F
where F: Fn(C) -> bool,

§

fn contains_token(&self, token: C) -> bool

Returns true if self contains the token
§

impl<C, F> ContainsToken<C> for F
where F: Fn(C) -> bool,

§

fn contains_token(&self, token: C) -> bool

Returns true if self contains the token
§

impl<T, K, V> CustomAttribute<K, V> for T
where T: AddAnyAttr, K: CustomAttributeKey, V: AttributeValue,

§

fn attr(self, key: K, value: V) -> Self::Output<CustomAttr<K, V>>

Adds an HTML attribute by key and value.
§

impl<F, TScore, T> CustomScorer<TScore> for F
where F: 'static + Send + Sync + Fn(&SegmentReader) -> T, T: CustomSegmentScorer<TScore>,

§

type Child = T

Type of the associated [CustomSegmentScorer].
§

fn segment_scorer( &self, segment_reader: &SegmentReader, ) -> Result<<F as CustomScorer<TScore>>::Child, TantivyError>

Builds a child scorer for a specific segment. The child scorer is associated with a specific segment.
§

impl<F, TScore> CustomSegmentScorer<TScore> for F
where F: 'static + FnMut(u32) -> TScore,

§

fn score(&mut self, doc: u32) -> TScore

Computes the score of a specific doc.
§

impl<V, T, P, D> DirectiveAttribute<T, P, D> for V
where V: AddAnyAttr, D: IntoDirective<T, P>, P: Clone + 'static, T: 'static,

§

type Output = <V as AddAnyAttr>::Output<Directive<T, D, P>>

The type of the element with the directive added.
§

fn directive( self, handler: D, param: P, ) -> <V as DirectiveAttribute<T, P, D>>::Output

Adds a directive to the element, which runs some custom logic in the browser when the element is created or hydrated.
§

impl<T> Downcast for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

Converts Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.
§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Converts Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
§

fn as_any(&self) -> &(dyn Any + 'static)

Converts &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Converts &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
§

impl<T> DowncastSend for T
where T: Any + Send,

§

fn into_any_send(self: Box<T>) -> Box<dyn Any + Send>

Converts Box<Trait> (where Trait: DowncastSend) to Box<dyn Any + Send>, which can then be downcast into Box<ConcreteType> where ConcreteType implements Trait.
§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

§

fn into_any_sync(self: Box<T>) -> Box<dyn Any + Send + Sync>

Converts Box<Trait> (where Trait: DowncastSync) to Box<dyn Any + Send + Sync>, which can then be downcast into Box<ConcreteType> where ConcreteType implements Trait.
§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

Converts Arc<Trait> (where Trait: DowncastSync) to Arc<Any>, which can then be downcast into Arc<ConcreteType> where ConcreteType implements Trait.
§

impl<Func> EffectFunction<(), NoParam> for Func
where Func: FnMut(),

§

fn run(&mut self, _: Option<()>)

Call this to execute the function. In case the actual function has no parameters the parameter p will simply be ignored.
§

impl<Func, T> EffectFunction<T, SingleParam> for Func
where Func: FnMut(Option<T>) -> T,

§

fn run(&mut self, p: Option<T>) -> T

Call this to execute the function. In case the actual function has no parameters the parameter p will simply be ignored.
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<F> ErrorSink for F
where F: FnMut(ParseError),

§

fn report_error(&mut self, error: ParseError)

§

impl<F, E> EventCallback<E> for F
where F: FnMut(E) + 'static,

§

fn invoke(&mut self, event: E)

Runs the event handler.
§

fn into_shared(self) -> Rc<RefCell<dyn FnMut(E)>>

Converts this into a cloneable/shared event handler.
§

impl<F> EventReceiver for F
where F: FnMut(Event),

§

fn std_table_open(&mut self, span: Span, _error: &mut dyn ErrorSink)

§

fn std_table_close(&mut self, span: Span, _error: &mut dyn ErrorSink)

§

fn array_table_open(&mut self, span: Span, _error: &mut dyn ErrorSink)

§

fn array_table_close(&mut self, span: Span, _error: &mut dyn ErrorSink)

§

fn inline_table_open(&mut self, span: Span, _error: &mut dyn ErrorSink) -> bool

Returns if entering the inline table is allowed
§

fn inline_table_close(&mut self, span: Span, _error: &mut dyn ErrorSink)

§

fn array_open(&mut self, span: Span, _error: &mut dyn ErrorSink) -> bool

Returns if entering the array is allowed
§

fn array_close(&mut self, span: Span, _error: &mut dyn ErrorSink)

§

fn simple_key( &mut self, span: Span, encoding: Option<Encoding>, _error: &mut dyn ErrorSink, )

§

fn key_sep(&mut self, span: Span, _error: &mut dyn ErrorSink)

§

fn key_val_sep(&mut self, span: Span, _error: &mut dyn ErrorSink)

§

fn scalar( &mut self, span: Span, encoding: Option<Encoding>, _error: &mut dyn ErrorSink, )

§

fn value_sep(&mut self, span: Span, _error: &mut dyn ErrorSink)

§

fn whitespace(&mut self, span: Span, _error: &mut dyn ErrorSink)

§

fn comment(&mut self, span: Span, _error: &mut dyn ErrorSink)

§

fn newline(&mut self, span: Span, _error: &mut dyn ErrorSink)

§

fn error(&mut self, span: Span, _error: &mut dyn ErrorSink)

Source§

impl<F> Fill for F
where F: Fn(Slot<'_, '_>) -> Result<(), Error>,

Source§

fn fill(&self, slot: Slot<'_, '_>) -> Result<(), Error>

Fill a value.
Source§

impl<T> From<!> for T

Source§

fn from(t: !) -> T

Converts to this type from the input type.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromAngle<T> for T

Source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
§

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

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

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

§

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

Attempts to deserialize the arguments from a request.
§

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

§

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

Attempts to deserialize the arguments from a request.
§

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

§

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

Attempts to deserialize the arguments from a request.
§

impl<E, T, Request> FromReq<Streaming, Request, E> for T
where Request: Req<E> + Send + 'static, T: From<ByteStream<E>> + 'static, E: FromServerFnError,

§

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

Attempts to deserialize the arguments from a request.
§

impl<E, T, Request> FromReq<StreamingText, Request, E> for T
where Request: Req<E> + Send + 'static, T: From<TextStream<E>> + 'static, E: FromServerFnError,

§

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

Attempts to deserialize the arguments from a request.
§

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

§

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

Attempts to deserialize the outputs from a response.
§

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

§

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

Attempts to deserialize the outputs from a response.
§

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

§

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

Attempts to deserialize the outputs from a response.
Source§

impl<T, U> FromStimulus<U> for T
where U: IntoStimulus<T>,

Source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, rounding and clamping.
§

impl<S, T> FromStream<T> for S
where S: From<ArcReadSignal<Option<T>>> + Send + Sync, T: Send + Sync + 'static,

§

fn from_stream(stream: impl Stream<Item = T> + Send + 'static) -> S

Creates a signal that contains the latest value of the stream.
§

fn from_stream_unsync(stream: impl Stream<Item = T> + 'static) -> S

Creates a signal that contains the latest value of the stream.
§

impl<T, Fut, F> FutureExt for F
where Fut: Future<Output = T>, F: Fn() -> Fut + Clone + Send + 'static,

§

type T = T

§

fn into_view( self, f: impl FnOnce(T) -> AnyView + Clone + Send + 'static, ) -> AnyView

§

impl<F> FutureExt for F
where F: Future,

§

fn block_on(self) -> Self::Output
where Self: Sized,

Block the thread until the future is ready. Read more
§

impl<T> FutureExt for T
where T: Future + ?Sized,

§

fn map<U, F>(self, f: F) -> Map<Self, F>
where F: FnOnce(Self::Output) -> U, Self: Sized,

Map this future’s output to a different type, returning a new future of the resulting type. Read more
§

fn map_into<U>(self) -> MapInto<Self, U>
where Self::Output: Into<U>, Self: Sized,

Map this future’s output to a different type, returning a new future of the resulting type. Read more
§

fn then<Fut, F>(self, f: F) -> Then<Self, Fut, F>
where F: FnOnce(Self::Output) -> Fut, Fut: Future, Self: Sized,

Chain on a computation for when a future finished, passing the result of the future to the provided closure f. Read more
§

fn left_future<B>(self) -> Either<Self, B>
where B: Future<Output = Self::Output>, Self: Sized,

Wrap this future in an Either future, making it the left-hand variant of that Either. Read more
§

fn right_future<A>(self) -> Either<A, Self>
where A: Future<Output = Self::Output>, Self: Sized,

Wrap this future in an Either future, making it the right-hand variant of that Either. Read more
§

fn into_stream(self) -> IntoStream<Self>
where Self: Sized,

Convert this future into a single element stream. Read more
§

fn flatten(self) -> Flatten<Self>
where Self::Output: Future, Self: Sized,

Flatten the execution of this future when the output of this future is itself another future. Read more
§

fn flatten_stream(self) -> FlattenStream<Self>
where Self::Output: Stream, Self: Sized,

Flatten the execution of this future when the successful result of this future is a stream. Read more
§

fn fuse(self) -> Fuse<Self>
where Self: Sized,

Fuse a future such that poll will never again be called once it has completed. This method can be used to turn any Future into a FusedFuture. Read more
§

fn inspect<F>(self, f: F) -> Inspect<Self, F>
where F: FnOnce(&Self::Output), Self: Sized,

Do something with the output of a future before passing it on. Read more
§

fn catch_unwind(self) -> CatchUnwind<Self>
where Self: Sized + UnwindSafe,

Available on crate feature std only.
Catches unwinding panics while polling the future. Read more
§

fn shared(self) -> Shared<Self>
where Self: Sized, Self::Output: Clone,

Available on crate feature std only.
Create a cloneable handle to this future where all handles will resolve to the same result. Read more
§

fn remote_handle(self) -> (Remote<Self>, RemoteHandle<Self::Output>)
where Self: Sized,

Available on crate features channel and std only.
Turn this future into a future that yields () on completion and sends its output to another future on a separate task. Read more
§

fn boxed<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + Send + 'a>>
where Self: Sized + Send + 'a,

Available on crate feature alloc only.
Wrap the future in a Box, pinning it. Read more
§

fn boxed_local<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + 'a>>
where Self: Sized + 'a,

Available on crate feature alloc only.
Wrap the future in a Box, pinning it. Read more
§

fn unit_error(self) -> UnitError<Self>
where Self: Sized,

§

fn never_error(self) -> NeverError<Self>
where Self: Sized,

§

fn poll_unpin(&mut self, cx: &mut Context<'_>) -> Poll<Self::Output>
where Self: Unpin,

A convenience for calling Future::poll on Unpin future types.
§

fn now_or_never(self) -> Option<Self::Output>
where Self: Sized,

Evaluates and consumes the future, returning the resulting output if the future is ready after the first call to Future::poll. Read more
§

impl<T> FutureExt for T
where T: Future + ?Sized,

§

fn with_cancellation_token( self, cancellation_token: &CancellationToken, ) -> WithCancellationTokenFuture<'_, Self>
where Self: Sized,

Similar to [CancellationToken::run_until_cancelled], but with the advantage that it is easier to write fluent call chains. Read more
§

fn with_cancellation_token_owned( self, cancellation_token: CancellationToken, ) -> WithCancellationTokenFutureOwned<Self>
where Self: Sized,

Similar to [CancellationToken::run_until_cancelled_owned], but with the advantage that it is easier to write fluent call chains. Read more
§

impl<F, Fut, Res, S> Handler<((),), S> for F
where F: FnOnce() -> Fut + Clone + Send + Sync + 'static, Fut: Future<Output = Res> + Send, Res: IntoResponse,

§

type Future = Pin<Box<dyn Future<Output = Response<Body>> + Send>>

The type of future calling this handler returns.
§

fn call( self, _req: Request<Body>, _state: S, ) -> <F as Handler<((),), S>>::Future

Call the handler with the given request.
§

fn layer<L>(self, layer: L) -> Layered<L, Self, T, S>
where L: Layer<HandlerService<Self, T, S>> + Clone, <L as Layer<HandlerService<Self, T, S>>>::Service: Service<Request<Body>>,

Apply a [tower::Layer] to the handler. Read more
§

fn with_state(self, state: S) -> HandlerService<Self, T, S>

Convert the handler into a [Service] by providing the state
§

impl<F, Fut, S, Res, M, T1> Handler<(M, T1), S> for F
where F: FnOnce(T1) -> Fut + Clone + Send + Sync + 'static, Fut: Future<Output = Res> + Send, S: Send + Sync + 'static, Res: IntoResponse, T1: FromRequest<S, M> + Send,

§

type Future = Pin<Box<dyn Future<Output = Response<Body>> + Send>>

The type of future calling this handler returns.
§

fn call( self, req: Request<Body>, state: S, ) -> <F as Handler<(M, T1), S>>::Future

Call the handler with the given request.
§

fn layer<L>(self, layer: L) -> Layered<L, Self, T, S>
where L: Layer<HandlerService<Self, T, S>> + Clone, <L as Layer<HandlerService<Self, T, S>>>::Service: Service<Request<Body>>,

Apply a [tower::Layer] to the handler. Read more
§

fn with_state(self, state: S) -> HandlerService<Self, T, S>

Convert the handler into a [Service] by providing the state
§

impl<F, Fut, S, Res, M, T1, T2> Handler<(M, T1, T2), S> for F
where F: FnOnce(T1, T2) -> Fut + Clone + Send + Sync + 'static, Fut: Future<Output = Res> + Send, S: Send + Sync + 'static, Res: IntoResponse, T1: FromRequestParts<S> + Send, T2: FromRequest<S, M> + Send,

§

type Future = Pin<Box<dyn Future<Output = Response<Body>> + Send>>

The type of future calling this handler returns.
§

fn call( self, req: Request<Body>, state: S, ) -> <F as Handler<(M, T1, T2), S>>::Future

Call the handler with the given request.
§

fn layer<L>(self, layer: L) -> Layered<L, Self, T, S>
where L: Layer<HandlerService<Self, T, S>> + Clone, <L as Layer<HandlerService<Self, T, S>>>::Service: Service<Request<Body>>,

Apply a [tower::Layer] to the handler. Read more
§

fn with_state(self, state: S) -> HandlerService<Self, T, S>

Convert the handler into a [Service] by providing the state
§

impl<F, Fut, S, Res, M, T1, T2, T3> Handler<(M, T1, T2, T3), S> for F
where F: FnOnce(T1, T2, T3) -> Fut + Clone + Send + Sync + 'static, Fut: Future<Output = Res> + Send, S: Send + Sync + 'static, Res: IntoResponse, T1: FromRequestParts<S> + Send, T2: FromRequestParts<S> + Send, T3: FromRequest<S, M> + Send,

§

type Future = Pin<Box<dyn Future<Output = Response<Body>> + Send>>

The type of future calling this handler returns.
§

fn call( self, req: Request<Body>, state: S, ) -> <F as Handler<(M, T1, T2, T3), S>>::Future

Call the handler with the given request.
§

fn layer<L>(self, layer: L) -> Layered<L, Self, T, S>
where L: Layer<HandlerService<Self, T, S>> + Clone, <L as Layer<HandlerService<Self, T, S>>>::Service: Service<Request<Body>>,

Apply a [tower::Layer] to the handler. Read more
§

fn with_state(self, state: S) -> HandlerService<Self, T, S>

Convert the handler into a [Service] by providing the state
§

impl<F, Fut, S, Res, M, T1, T2, T3, T4> Handler<(M, T1, T2, T3, T4), S> for F
where F: FnOnce(T1, T2, T3, T4) -> Fut + Clone + Send + Sync + 'static, Fut: Future<Output = Res> + Send, S: Send + Sync + 'static, Res: IntoResponse, T1: FromRequestParts<S> + Send, T2: FromRequestParts<S> + Send, T3: FromRequestParts<S> + Send, T4: FromRequest<S, M> + Send,

§

type Future = Pin<Box<dyn Future<Output = Response<Body>> + Send>>

The type of future calling this handler returns.
§

fn call( self, req: Request<Body>, state: S, ) -> <F as Handler<(M, T1, T2, T3, T4), S>>::Future

Call the handler with the given request.
§

fn layer<L>(self, layer: L) -> Layered<L, Self, T, S>
where L: Layer<HandlerService<Self, T, S>> + Clone, <L as Layer<HandlerService<Self, T, S>>>::Service: Service<Request<Body>>,

Apply a [tower::Layer] to the handler. Read more
§

fn with_state(self, state: S) -> HandlerService<Self, T, S>

Convert the handler into a [Service] by providing the state
§

impl<F, Fut, S, Res, M, T1, T2, T3, T4, T5> Handler<(M, T1, T2, T3, T4, T5), S> for F
where F: FnOnce(T1, T2, T3, T4, T5) -> Fut + Clone + Send + Sync + 'static, Fut: Future<Output = Res> + Send, S: Send + Sync + 'static, Res: IntoResponse, T1: FromRequestParts<S> + Send, T2: FromRequestParts<S> + Send, T3: FromRequestParts<S> + Send, T4: FromRequestParts<S> + Send, T5: FromRequest<S, M> + Send,

§

type Future = Pin<Box<dyn Future<Output = Response<Body>> + Send>>

The type of future calling this handler returns.
§

fn call( self, req: Request<Body>, state: S, ) -> <F as Handler<(M, T1, T2, T3, T4, T5), S>>::Future

Call the handler with the given request.
§

fn layer<L>(self, layer: L) -> Layered<L, Self, T, S>
where L: Layer<HandlerService<Self, T, S>> + Clone, <L as Layer<HandlerService<Self, T, S>>>::Service: Service<Request<Body>>,

Apply a [tower::Layer] to the handler. Read more
§

fn with_state(self, state: S) -> HandlerService<Self, T, S>

Convert the handler into a [Service] by providing the state
§

impl<F, Fut, S, Res, M, T1, T2, T3, T4, T5, T6> Handler<(M, T1, T2, T3, T4, T5, T6), S> for F
where F: FnOnce(T1, T2, T3, T4, T5, T6) -> Fut + Clone + Send + Sync + 'static, Fut: Future<Output = Res> + Send, S: Send + Sync + 'static, Res: IntoResponse, T1: FromRequestParts<S> + Send, T2: FromRequestParts<S> + Send, T3: FromRequestParts<S> + Send, T4: FromRequestParts<S> + Send, T5: FromRequestParts<S> + Send, T6: FromRequest<S, M> + Send,

§

type Future = Pin<Box<dyn Future<Output = Response<Body>> + Send>>

The type of future calling this handler returns.
§

fn call( self, req: Request<Body>, state: S, ) -> <F as Handler<(M, T1, T2, T3, T4, T5, T6), S>>::Future

Call the handler with the given request.
§

fn layer<L>(self, layer: L) -> Layered<L, Self, T, S>
where L: Layer<HandlerService<Self, T, S>> + Clone, <L as Layer<HandlerService<Self, T, S>>>::Service: Service<Request<Body>>,

Apply a [tower::Layer] to the handler. Read more
§

fn with_state(self, state: S) -> HandlerService<Self, T, S>

Convert the handler into a [Service] by providing the state
§

impl<F, Fut, S, Res, M, T1, T2, T3, T4, T5, T6, T7> Handler<(M, T1, T2, T3, T4, T5, T6, T7), S> for F
where F: FnOnce(T1, T2, T3, T4, T5, T6, T7) -> Fut + Clone + Send + Sync + 'static, Fut: Future<Output = Res> + Send, S: Send + Sync + 'static, Res: IntoResponse, T1: FromRequestParts<S> + Send, T2: FromRequestParts<S> + Send, T3: FromRequestParts<S> + Send, T4: FromRequestParts<S> + Send, T5: FromRequestParts<S> + Send, T6: FromRequestParts<S> + Send, T7: FromRequest<S, M> + Send,

§

type Future = Pin<Box<dyn Future<Output = Response<Body>> + Send>>

The type of future calling this handler returns.
§

fn call( self, req: Request<Body>, state: S, ) -> <F as Handler<(M, T1, T2, T3, T4, T5, T6, T7), S>>::Future

Call the handler with the given request.
§

fn layer<L>(self, layer: L) -> Layered<L, Self, T, S>
where L: Layer<HandlerService<Self, T, S>> + Clone, <L as Layer<HandlerService<Self, T, S>>>::Service: Service<Request<Body>>,

Apply a [tower::Layer] to the handler. Read more
§

fn with_state(self, state: S) -> HandlerService<Self, T, S>

Convert the handler into a [Service] by providing the state
§

impl<F, Fut, S, Res, M, T1, T2, T3, T4, T5, T6, T7, T8> Handler<(M, T1, T2, T3, T4, T5, T6, T7, T8), S> for F
where F: FnOnce(T1, T2, T3, T4, T5, T6, T7, T8) -> Fut + Clone + Send + Sync + 'static, Fut: Future<Output = Res> + Send, S: Send + Sync + 'static, Res: IntoResponse, T1: FromRequestParts<S> + Send, T2: FromRequestParts<S> + Send, T3: FromRequestParts<S> + Send, T4: FromRequestParts<S> + Send, T5: FromRequestParts<S> + Send, T6: FromRequestParts<S> + Send, T7: FromRequestParts<S> + Send, T8: FromRequest<S, M> + Send,

§

type Future = Pin<Box<dyn Future<Output = Response<Body>> + Send>>

The type of future calling this handler returns.
§

fn call( self, req: Request<Body>, state: S, ) -> <F as Handler<(M, T1, T2, T3, T4, T5, T6, T7, T8), S>>::Future

Call the handler with the given request.
§

fn layer<L>(self, layer: L) -> Layered<L, Self, T, S>
where L: Layer<HandlerService<Self, T, S>> + Clone, <L as Layer<HandlerService<Self, T, S>>>::Service: Service<Request<Body>>,

Apply a [tower::Layer] to the handler. Read more
§

fn with_state(self, state: S) -> HandlerService<Self, T, S>

Convert the handler into a [Service] by providing the state
§

impl<F, Fut, S, Res, M, T1, T2, T3, T4, T5, T6, T7, T8, T9> Handler<(M, T1, T2, T3, T4, T5, T6, T7, T8, T9), S> for F
where F: FnOnce(T1, T2, T3, T4, T5, T6, T7, T8, T9) -> Fut + Clone + Send + Sync + 'static, Fut: Future<Output = Res> + Send, S: Send + Sync + 'static, Res: IntoResponse, T1: FromRequestParts<S> + Send, T2: FromRequestParts<S> + Send, T3: FromRequestParts<S> + Send, T4: FromRequestParts<S> + Send, T5: FromRequestParts<S> + Send, T6: FromRequestParts<S> + Send, T7: FromRequestParts<S> + Send, T8: FromRequestParts<S> + Send, T9: FromRequest<S, M> + Send,

§

type Future = Pin<Box<dyn Future<Output = Response<Body>> + Send>>

The type of future calling this handler returns.
§

fn call( self, req: Request<Body>, state: S, ) -> <F as Handler<(M, T1, T2, T3, T4, T5, T6, T7, T8, T9), S>>::Future

Call the handler with the given request.
§

fn layer<L>(self, layer: L) -> Layered<L, Self, T, S>
where L: Layer<HandlerService<Self, T, S>> + Clone, <L as Layer<HandlerService<Self, T, S>>>::Service: Service<Request<Body>>,

Apply a [tower::Layer] to the handler. Read more
§

fn with_state(self, state: S) -> HandlerService<Self, T, S>

Convert the handler into a [Service] by providing the state
§

impl<F, Fut, S, Res, M, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> Handler<(M, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10), S> for F
where F: FnOnce(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) -> Fut + Clone + Send + Sync + 'static, Fut: Future<Output = Res> + Send, S: Send + Sync + 'static, Res: IntoResponse, T1: FromRequestParts<S> + Send, T2: FromRequestParts<S> + Send, T3: FromRequestParts<S> + Send, T4: FromRequestParts<S> + Send, T5: FromRequestParts<S> + Send, T6: FromRequestParts<S> + Send, T7: FromRequestParts<S> + Send, T8: FromRequestParts<S> + Send, T9: FromRequestParts<S> + Send, T10: FromRequest<S, M> + Send,

§

type Future = Pin<Box<dyn Future<Output = Response<Body>> + Send>>

The type of future calling this handler returns.
§

fn call( self, req: Request<Body>, state: S, ) -> <F as Handler<(M, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10), S>>::Future

Call the handler with the given request.
§

fn layer<L>(self, layer: L) -> Layered<L, Self, T, S>
where L: Layer<HandlerService<Self, T, S>> + Clone, <L as Layer<HandlerService<Self, T, S>>>::Service: Service<Request<Body>>,

Apply a [tower::Layer] to the handler. Read more
§

fn with_state(self, state: S) -> HandlerService<Self, T, S>

Convert the handler into a [Service] by providing the state
§

impl<F, Fut, S, Res, M, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> Handler<(M, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11), S> for F
where F: FnOnce(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) -> Fut + Clone + Send + Sync + 'static, Fut: Future<Output = Res> + Send, S: Send + Sync + 'static, Res: IntoResponse, T1: FromRequestParts<S> + Send, T2: FromRequestParts<S> + Send, T3: FromRequestParts<S> + Send, T4: FromRequestParts<S> + Send, T5: FromRequestParts<S> + Send, T6: FromRequestParts<S> + Send, T7: FromRequestParts<S> + Send, T8: FromRequestParts<S> + Send, T9: FromRequestParts<S> + Send, T10: FromRequestParts<S> + Send, T11: FromRequest<S, M> + Send,

§

type Future = Pin<Box<dyn Future<Output = Response<Body>> + Send>>

The type of future calling this handler returns.
§

fn call( self, req: Request<Body>, state: S, ) -> <F as Handler<(M, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11), S>>::Future

Call the handler with the given request.
§

fn layer<L>(self, layer: L) -> Layered<L, Self, T, S>
where L: Layer<HandlerService<Self, T, S>> + Clone, <L as Layer<HandlerService<Self, T, S>>>::Service: Service<Request<Body>>,

Apply a [tower::Layer] to the handler. Read more
§

fn with_state(self, state: S) -> HandlerService<Self, T, S>

Convert the handler into a [Service] by providing the state
§

impl<F, Fut, S, Res, M, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> Handler<(M, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12), S> for F
where F: FnOnce(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12) -> Fut + Clone + Send + Sync + 'static, Fut: Future<Output = Res> + Send, S: Send + Sync + 'static, Res: IntoResponse, T1: FromRequestParts<S> + Send, T2: FromRequestParts<S> + Send, T3: FromRequestParts<S> + Send, T4: FromRequestParts<S> + Send, T5: FromRequestParts<S> + Send, T6: FromRequestParts<S> + Send, T7: FromRequestParts<S> + Send, T8: FromRequestParts<S> + Send, T9: FromRequestParts<S> + Send, T10: FromRequestParts<S> + Send, T11: FromRequestParts<S> + Send, T12: FromRequest<S, M> + Send,

§

type Future = Pin<Box<dyn Future<Output = Response<Body>> + Send>>

The type of future calling this handler returns.
§

fn call( self, req: Request<Body>, state: S, ) -> <F as Handler<(M, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12), S>>::Future

Call the handler with the given request.
§

fn layer<L>(self, layer: L) -> Layered<L, Self, T, S>
where L: Layer<HandlerService<Self, T, S>> + Clone, <L as Layer<HandlerService<Self, T, S>>>::Service: Service<Request<Body>>,

Apply a [tower::Layer] to the handler. Read more
§

fn with_state(self, state: S) -> HandlerService<Self, T, S>

Convert the handler into a [Service] by providing the state
§

impl<F, Fut, S, Res, M, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> Handler<(M, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13), S> for F
where F: FnOnce(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13) -> Fut + Clone + Send + Sync + 'static, Fut: Future<Output = Res> + Send, S: Send + Sync + 'static, Res: IntoResponse, T1: FromRequestParts<S> + Send, T2: FromRequestParts<S> + Send, T3: FromRequestParts<S> + Send, T4: FromRequestParts<S> + Send, T5: FromRequestParts<S> + Send, T6: FromRequestParts<S> + Send, T7: FromRequestParts<S> + Send, T8: FromRequestParts<S> + Send, T9: FromRequestParts<S> + Send, T10: FromRequestParts<S> + Send, T11: FromRequestParts<S> + Send, T12: FromRequestParts<S> + Send, T13: FromRequest<S, M> + Send,

§

type Future = Pin<Box<dyn Future<Output = Response<Body>> + Send>>

The type of future calling this handler returns.
§

fn call( self, req: Request<Body>, state: S, ) -> <F as Handler<(M, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13), S>>::Future

Call the handler with the given request.
§

fn layer<L>(self, layer: L) -> Layered<L, Self, T, S>
where L: Layer<HandlerService<Self, T, S>> + Clone, <L as Layer<HandlerService<Self, T, S>>>::Service: Service<Request<Body>>,

Apply a [tower::Layer] to the handler. Read more
§

fn with_state(self, state: S) -> HandlerService<Self, T, S>

Convert the handler into a [Service] by providing the state
§

impl<F, Fut, S, Res, M, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> Handler<(M, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14), S> for F
where F: FnOnce(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14) -> Fut + Clone + Send + Sync + 'static, Fut: Future<Output = Res> + Send, S: Send + Sync + 'static, Res: IntoResponse, T1: FromRequestParts<S> + Send, T2: FromRequestParts<S> + Send, T3: FromRequestParts<S> + Send, T4: FromRequestParts<S> + Send, T5: FromRequestParts<S> + Send, T6: FromRequestParts<S> + Send, T7: FromRequestParts<S> + Send, T8: FromRequestParts<S> + Send, T9: FromRequestParts<S> + Send, T10: FromRequestParts<S> + Send, T11: FromRequestParts<S> + Send, T12: FromRequestParts<S> + Send, T13: FromRequestParts<S> + Send, T14: FromRequest<S, M> + Send,

§

type Future = Pin<Box<dyn Future<Output = Response<Body>> + Send>>

The type of future calling this handler returns.
§

fn call( self, req: Request<Body>, state: S, ) -> <F as Handler<(M, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14), S>>::Future

Call the handler with the given request.
§

fn layer<L>(self, layer: L) -> Layered<L, Self, T, S>
where L: Layer<HandlerService<Self, T, S>> + Clone, <L as Layer<HandlerService<Self, T, S>>>::Service: Service<Request<Body>>,

Apply a [tower::Layer] to the handler. Read more
§

fn with_state(self, state: S) -> HandlerService<Self, T, S>

Convert the handler into a [Service] by providing the state
§

impl<F, Fut, S, Res, M, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> Handler<(M, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15), S> for F
where F: FnOnce(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15) -> Fut + Clone + Send + Sync + 'static, Fut: Future<Output = Res> + Send, S: Send + Sync + 'static, Res: IntoResponse, T1: FromRequestParts<S> + Send, T2: FromRequestParts<S> + Send, T3: FromRequestParts<S> + Send, T4: FromRequestParts<S> + Send, T5: FromRequestParts<S> + Send, T6: FromRequestParts<S> + Send, T7: FromRequestParts<S> + Send, T8: FromRequestParts<S> + Send, T9: FromRequestParts<S> + Send, T10: FromRequestParts<S> + Send, T11: FromRequestParts<S> + Send, T12: FromRequestParts<S> + Send, T13: FromRequestParts<S> + Send, T14: FromRequestParts<S> + Send, T15: FromRequest<S, M> + Send,

§

type Future = Pin<Box<dyn Future<Output = Response<Body>> + Send>>

The type of future calling this handler returns.
§

fn call( self, req: Request<Body>, state: S, ) -> <F as Handler<(M, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15), S>>::Future

Call the handler with the given request.
§

fn layer<L>(self, layer: L) -> Layered<L, Self, T, S>
where L: Layer<HandlerService<Self, T, S>> + Clone, <L as Layer<HandlerService<Self, T, S>>>::Service: Service<Request<Body>>,

Apply a [tower::Layer] to the handler. Read more
§

fn with_state(self, state: S) -> HandlerService<Self, T, S>

Convert the handler into a [Service] by providing the state
§

impl<F, Fut, S, Res, M, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> Handler<(M, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16), S> for F
where F: FnOnce(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16) -> Fut + Clone + Send + Sync + 'static, Fut: Future<Output = Res> + Send, S: Send + Sync + 'static, Res: IntoResponse, T1: FromRequestParts<S> + Send, T2: FromRequestParts<S> + Send, T3: FromRequestParts<S> + Send, T4: FromRequestParts<S> + Send, T5: FromRequestParts<S> + Send, T6: FromRequestParts<S> + Send, T7: FromRequestParts<S> + Send, T8: FromRequestParts<S> + Send, T9: FromRequestParts<S> + Send, T10: FromRequestParts<S> + Send, T11: FromRequestParts<S> + Send, T12: FromRequestParts<S> + Send, T13: FromRequestParts<S> + Send, T14: FromRequestParts<S> + Send, T15: FromRequestParts<S> + Send, T16: FromRequest<S, M> + Send,

§

type Future = Pin<Box<dyn Future<Output = Response<Body>> + Send>>

The type of future calling this handler returns.
§

fn call( self, req: Request<Body>, state: S, ) -> <F as Handler<(M, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16), S>>::Future

Call the handler with the given request.
§

fn layer<L>(self, layer: L) -> Layered<L, Self, T, S>
where L: Layer<HandlerService<Self, T, S>> + Clone, <L as Layer<HandlerService<Self, T, S>>>::Service: Service<Request<Body>>,

Apply a [tower::Layer] to the handler. Read more
§

fn with_state(self, state: S) -> HandlerService<Self, T, S>

Convert the handler into a [Service] by providing the state
§

impl<H, T> HandlerWithoutStateExt<T> for H
where H: Handler<T, ()>,

§

fn into_service(self) -> HandlerService<H, T, ()>

Convert the handler into a [Service] and no state.
§

fn into_make_service(self) -> IntoMakeService<HandlerService<H, T, ()>>

Convert the handler into a MakeService and no state. Read more
§

fn into_make_service_with_connect_info<C>( self, ) -> IntoMakeServiceWithConnectInfo<HandlerService<H, T, ()>, C>

Available on crate feature tokio only.
Convert the handler into a MakeService which stores information about the incoming connection and has no state. Read more
§

impl<F, V> InnerHtmlValue for F
where F: ReactiveFunction<Output = V>, V: InnerHtmlValue + 'static, <V as InnerHtmlValue>::State: 'static,

§

type AsyncOutput = <V as InnerHtmlValue>::AsyncOutput

The type after all async data have resolved.
§

type State = RenderEffect<<V as InnerHtmlValue>::State>

The view state retained between building and rebuilding.
§

type Cloneable = Arc<Mutex<dyn FnMut() -> V + Send>>

An equivalent value that can be cloned.
§

type CloneableOwned = Arc<Mutex<dyn FnMut() -> V + Send>>

An equivalent value that can be cloned and is 'static.
§

fn html_len(&self) -> usize

The estimated length of the HTML.
§

fn to_html(self, buf: &mut String)

Renders the class to HTML.
§

fn to_template(_buf: &mut String)

Renders the class to HTML for a <template>.
§

fn hydrate<const FROM_SERVER: bool>( self, el: &Element, ) -> <F as InnerHtmlValue>::State

Adds interactivity as necessary, given DOM nodes that were created from HTML that has either been rendered on the server, or cloned for a <template>.
§

fn build(self, el: &Element) -> <F as InnerHtmlValue>::State

Adds this class to the element during client-side rendering.
§

fn rebuild(self, state: &mut <F as InnerHtmlValue>::State)

Updates the value.
§

fn into_cloneable(self) -> <F as InnerHtmlValue>::Cloneable

Converts this to a cloneable type.
§

fn into_cloneable_owned(self) -> <F as InnerHtmlValue>::CloneableOwned

Converts this to a cloneable, owned type.
§

fn dry_resolve(&mut self)

“Runs” the attribute without other side effects. For primitive types, this is a no-op. For reactive types, this can be used to gather data about reactivity or about asynchronous data that needs to be loaded.
§

async fn resolve(self) -> <F as InnerHtmlValue>::AsyncOutput

“Resolves” this into a type that is not waiting for any asynchronous data.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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, U> IntoAngle<U> for T
where U: FromAngle<T>,

Source§

fn into_angle(self) -> U

Performs a conversion into T.
§

impl<T> IntoAny for T
where T: Send + RenderHtml,

§

fn into_any(self) -> AnyView

Converts the view into a type-erased AnyView.
§

impl<T> IntoAttributeValue for T
where T: AttributeValue,

§

type Output = T

The attribute value into which this type can be converted.
§

fn into_attribute_value(self) -> <T as IntoAttributeValue>::Output

Consumes this value, transforming it into an attribute value.
Source§

impl<WpParam, T, U> IntoCam16Unclamped<WpParam, T> for U
where T: Cam16FromUnclamped<WpParam, U>,

Source§

type Scalar = <T as Cam16FromUnclamped<WpParam, U>>::Scalar

The number type that’s used in parameters when converting.
Source§

fn into_cam16_unclamped( self, parameters: BakedParameters<WpParam, <U as IntoCam16Unclamped<WpParam, T>>::Scalar>, ) -> T

Converts self into C, using the provided parameters.
§

impl<T> IntoChooseViewMaybeErased for T
where T: ChooseView + Send + Clone + 'static,

§

type Output = T

The type of the erased view.
§

fn into_maybe_erased(self) -> <T as IntoChooseViewMaybeErased>::Output

Erase the type of the view.
§

impl<F, C> IntoClass for F
where F: ReactiveFunction<Output = C>, C: IntoClass + 'static, <C as IntoClass>::State: 'static,

§

type AsyncOutput = <C as IntoClass>::AsyncOutput

The type after all async data have resolved.
§

type State = RenderEffect<<C as IntoClass>::State>

The view state retained between building and rebuilding.
§

type Cloneable = Arc<Mutex<dyn FnMut() -> C + Send>>

An equivalent value that can be cloned.
§

type CloneableOwned = Arc<Mutex<dyn FnMut() -> C + Send>>

An equivalent value that can be cloned and is 'static.
§

fn html_len(&self) -> usize

The estimated length of the HTML.
§

fn to_html(self, class: &mut String)

Renders the class to HTML.
§

fn hydrate<const FROM_SERVER: bool>( self, el: &Element, ) -> <F as IntoClass>::State

Adds interactivity as necessary, given DOM nodes that were created from HTML that has either been rendered on the server, or cloned for a <template>.
§

fn build(self, el: &Element) -> <F as IntoClass>::State

Adds this class to the element during client-side rendering.
§

fn rebuild(self, state: &mut <F as IntoClass>::State)

Updates the value.
§

fn into_cloneable(self) -> <F as IntoClass>::Cloneable

Converts this to a cloneable type.
§

fn into_cloneable_owned(self) -> <F as IntoClass>::CloneableOwned

Converts this to a cloneable, owned type.
§

fn dry_resolve(&mut self)

“Runs” the attribute without other side effects. For primitive types, this is a no-op. For reactive types, this can be used to gather data about reactivity or about asynchronous data that needs to be loaded.
§

async fn resolve(self) -> <F as IntoClass>::AsyncOutput

“Resolves” this into a type that is not waiting for any asynchronous data.
§

fn reset(state: &mut <F as IntoClass>::State)

Reset the class list to the state before this class was added.
§

const TEMPLATE: &'static str = ""

The HTML that should be included in a <template>.
§

const MIN_LENGTH: usize = _

The minimum length of the HTML.
§

fn should_overwrite(&self) -> bool

Whether this class attribute should overwrite previous class values. Returns true for class="..." attributes, false for class:name=value directives.
§

fn to_template(class: &mut String)

Renders the class to HTML for a <template>.
§

impl<T, U> IntoClass for T
where T: Fn() -> U + 'static, U: IntoClassValue,

§

fn into_class(self) -> Class

Source§

impl<T, U> IntoColor<U> for T
where U: FromColor<T>,

Source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
Source§

impl<T, U> IntoColorUnclamped<U> for T
where U: FromColorUnclamped<T>,

Source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
§

impl<F> IntoDirective<(Element,), ()> for F
where F: Fn(Element) + 'static,

§

type Cloneable = Arc<dyn Fn(Element)>

An equivalent to this directive that is cloneable and owned.
§

fn run(&self, el: Element, _: ())

Calls the handler function
§

fn into_cloneable(self) -> <F as IntoDirective<(Element,), ()>>::Cloneable

Converts this into a cloneable type.
§

impl<F, P> IntoDirective<(Element, P), P> for F
where F: Fn(Element, P) + 'static, P: 'static,

§

type Cloneable = Arc<dyn Fn(Element, P)>

An equivalent to this directive that is cloneable and owned.
§

fn run(&self, el: Element, param: P)

Calls the handler function
§

fn into_cloneable(self) -> <F as IntoDirective<(Element, P), P>>::Cloneable

Converts this into a cloneable type.
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<F> IntoFuture for F
where F: Future,

Source§

type Output = <F as Future>::Output

The output that the future will produce on completion.
Source§

type IntoFuture = F

Which kind of future are we turning this into?
Source§

fn into_future(self) -> <F as IntoFuture>::IntoFuture

Creates a future from a value. Read more
§

impl<T> IntoMaybeErased for T
where T: RenderHtml,

§

type Output = T

The type of the output.
§

fn into_maybe_erased(self) -> <T as IntoMaybeErased>::Output

Converts the view into a type-erased view if in erased mode.
§

impl<T, F> IntoOptionGetter<T, FunctionMarker> for F
where F: Fn() -> Option<T> + Send + Sync + 'static,

§

fn into_option_getter(self) -> OptionGetter<T>

Converts the given value into an OptionGetter.
§

impl<F, V> IntoProperty for F
where F: ReactiveFunction<Output = V>, V: IntoProperty + 'static, <V as IntoProperty>::State: 'static,

§

type State = RenderEffect<<V as IntoProperty>::State>

The view state retained between building and rebuilding.
§

type Cloneable = Arc<Mutex<dyn FnMut() -> V + Send>>

An equivalent value that can be cloned.
§

type CloneableOwned = Arc<Mutex<dyn FnMut() -> V + Send>>

An equivalent value that can be cloned and is 'static.
§

fn hydrate<const FROM_SERVER: bool>( self, el: &Element, key: &str, ) -> <F as IntoProperty>::State

Adds the property on an element created from HTML.
§

fn build(self, el: &Element, key: &str) -> <F as IntoProperty>::State

Adds the property during client-side rendering.
§

fn rebuild(self, state: &mut <F as IntoProperty>::State, key: &str)

Updates the property with a new value.
§

fn into_cloneable(self) -> <F as IntoProperty>::Cloneable

Converts this to a cloneable type.
§

fn into_cloneable_owned(self) -> <F as IntoProperty>::CloneableOwned

Converts this to a cloneable, owned type.
§

impl<T, F> IntoReactiveValue<ArcSignal<Option<T>>, __IntoReactiveValueMarkerOptionalSignalFromReactiveClosureAlways> for F
where T: Send + Sync + 'static, F: Fn() -> T + Send + Sync + 'static,

§

fn into_reactive_value(self) -> ArcSignal<Option<T>>

Converts self into a T.
§

impl<T, F> IntoReactiveValue<ArcSignal<Option<T>, LocalStorage>, __IntoReactiveValueMarkerOptionalSignalFromReactiveClosureAlways> for F
where T: 'static, F: Fn() -> T + 'static,

§

fn into_reactive_value(self) -> ArcSignal<Option<T>, LocalStorage>

Converts self into a T.
§

impl<F> IntoReactiveValue<ArcSignal<String>, __IntoReactiveValueMarkerSignalStrOutputToString> for F
where F: Fn() -> &'static str + Send + Sync + 'static,

§

fn into_reactive_value(self) -> ArcSignal<String>

Converts self into a T.
§

impl<F> IntoReactiveValue<ArcSignal<String, LocalStorage>, __IntoReactiveValueMarkerSignalStrOutputToString> for F
where F: Fn() -> &'static str + 'static,

§

fn into_reactive_value(self) -> ArcSignal<String, LocalStorage>

Converts self into a T.
§

impl<T, F> IntoReactiveValue<ArcSignal<T>, __IntoReactiveValueMarkerSignalFromReactiveClosure> for F
where T: Send + Sync + 'static, F: Fn() -> T + Send + Sync + 'static,

§

fn into_reactive_value(self) -> ArcSignal<T>

Converts self into a T.
§

impl<T, F> IntoReactiveValue<ArcSignal<T, LocalStorage>, __IntoReactiveValueMarkerSignalFromReactiveClosure> for F
where T: 'static, F: Fn() -> T + 'static,

§

fn into_reactive_value(self) -> ArcSignal<T, LocalStorage>

Converts self into a T.
§

impl<I, O, F> IntoReactiveValue<Callback<I, O>, __IntoReactiveValueMarkerCallbackSingleParam> for F
where F: Fn(I) -> O + Send + Sync + 'static,

§

fn into_reactive_value(self) -> Callback<I, O>

Converts self into a T.
§

impl<I, F> IntoReactiveValue<Callback<I, String>, __IntoReactiveValueMarkerCallbackStrOutputToString> for F
where F: Fn(I) -> &'static str + Send + Sync + 'static,

§

fn into_reactive_value(self) -> Callback<I, String>

Converts self into a T.
§

impl<T, F> IntoReactiveValue<Signal<Option<T>>, __IntoReactiveValueMarkerOptionalSignalFromReactiveClosureAlways> for F
where T: Send + Sync + 'static, F: Fn() -> T + Send + Sync + 'static,

§

fn into_reactive_value(self) -> Signal<Option<T>>

Converts self into a T.
§

impl<T, F> IntoReactiveValue<Signal<Option<T>, LocalStorage>, __IntoReactiveValueMarkerOptionalSignalFromReactiveClosureAlways> for F
where T: 'static, F: Fn() -> T + 'static,

§

fn into_reactive_value(self) -> Signal<Option<T>, LocalStorage>

Converts self into a T.
§

impl<F> IntoReactiveValue<Signal<String>, __IntoReactiveValueMarkerSignalStrOutputToString> for F
where F: Fn() -> &'static str + Send + Sync + 'static,

§

fn into_reactive_value(self) -> Signal<String>

Converts self into a T.
§

impl<F> IntoReactiveValue<Signal<String, LocalStorage>, __IntoReactiveValueMarkerSignalStrOutputToString> for F
where F: Fn() -> &'static str + 'static,

§

fn into_reactive_value(self) -> Signal<String, LocalStorage>

Converts self into a T.
§

impl<T, F> IntoReactiveValue<Signal<T>, __IntoReactiveValueMarkerSignalFromReactiveClosure> for F
where T: Send + Sync + 'static, F: Fn() -> T + Send + Sync + 'static,

§

fn into_reactive_value(self) -> Signal<T>

Converts self into a T.
§

impl<T, F> IntoReactiveValue<Signal<T, LocalStorage>, __IntoReactiveValueMarkerSignalFromReactiveClosure> for F
where T: 'static, F: Fn() -> T + 'static,

§

fn into_reactive_value(self) -> Signal<T, LocalStorage>

Converts self into a T.
§

impl<T, I> IntoReactiveValue<T, __IntoReactiveValueMarkerBaseCase> for I
where I: Into<T>,

§

fn into_reactive_value(self) -> T

Converts self into a T.
§

impl<I, O, F> IntoReactiveValue<UnsyncCallback<I, O>, __IntoReactiveValueMarkerCallbackSingleParam> for F
where F: Fn(I) -> O + 'static,

§

fn into_reactive_value(self) -> UnsyncCallback<I, O>

Converts self into a T.
§

impl<I, F> IntoReactiveValue<UnsyncCallback<I, String>, __IntoReactiveValueMarkerCallbackStrOutputToString> for F
where F: Fn(I) -> &'static str + 'static,

§

fn into_reactive_value(self) -> UnsyncCallback<I, String>

Converts self into a T.
§

impl<T> IntoRender for T
where T: Render,

§

type Output = T

The renderable type into which this type can be converted.
§

fn into_render(self) -> <T as IntoRender>::Output

Consumes this value, transforming it into the renderable type.
§

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

§

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

Attempts to serialize the arguments into an HTTP request.
§

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

§

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

Attempts to serialize the arguments into an HTTP request.
§

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

§

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

Attempts to serialize the arguments into an HTTP request.
§

impl<E, Response, Encoding, T> IntoRes<Patch<Encoding>, Response, E> for T
where Response: TryRes<E>, Encoding: Encodes<T>, E: FromServerFnError + Send, T: Send,

§

async fn into_res(self) -> Result<Response, E>

Attempts to serialize the output into an HTTP response.
§

impl<E, Response, Encoding, T> IntoRes<Post<Encoding>, Response, E> for T
where Response: TryRes<E>, Encoding: Encodes<T>, E: FromServerFnError + Send, T: Send,

§

async fn into_res(self) -> Result<Response, E>

Attempts to serialize the output into an HTTP response.
§

impl<E, Response, Encoding, T> IntoRes<Put<Encoding>, Response, E> for T
where Response: TryRes<E>, Encoding: Encodes<T>, E: FromServerFnError + Send, T: Send,

§

async fn into_res(self) -> Result<Response, E>

Attempts to serialize the output into an HTTP response.
§

impl<F, T, S> IntoSignalSetter<T, S> for F
where F: Fn(T) + 'static + Send + Sync, S: Storage<Box<dyn Fn(T) + Send + Sync>>,

§

fn into_signal_setter(self) -> SignalSetter<T, S>

Consumes self, returning SignalSetter<T>.
Source§

impl<T> IntoStimulus<T> for T

Source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, rounding and clamping.
§

impl<F, C> IntoStyle for F
where F: ReactiveFunction<Output = C>, C: IntoStyle + 'static, <C as IntoStyle>::State: 'static,

§

type AsyncOutput = <C as IntoStyle>::AsyncOutput

The type after all async data have resolved.
§

type State = RenderEffect<<C as IntoStyle>::State>

The view state retained between building and rebuilding.
§

type Cloneable = Arc<Mutex<dyn FnMut() -> C + Send>>

An equivalent value that can be cloned.
§

type CloneableOwned = Arc<Mutex<dyn FnMut() -> C + Send>>

An equivalent value that can be cloned and is 'static.
§

fn to_html(self, style: &mut String)

Renders the style to HTML.
§

fn hydrate<const FROM_SERVER: bool>( self, el: &Element, ) -> <F as IntoStyle>::State

Adds interactivity as necessary, given DOM nodes that were created from HTML that has either been rendered on the server, or cloned for a <template>.
§

fn build(self, el: &Element) -> <F as IntoStyle>::State

Adds this style to the element during client-side rendering.
§

fn rebuild(self, state: &mut <F as IntoStyle>::State)

Updates the value.
§

fn into_cloneable(self) -> <F as IntoStyle>::Cloneable

Converts this to a cloneable type.
§

fn into_cloneable_owned(self) -> <F as IntoStyle>::CloneableOwned

Converts this to a cloneable, owned type.
§

fn dry_resolve(&mut self)

“Runs” the attribute without other side effects. For primitive types, this is a no-op. For reactive types, this can be used to gather data about reactivity or about asynchronous data that needs to be loaded.
§

async fn resolve(self) -> <F as IntoStyle>::AsyncOutput

“Resolves” this into a type that is not waiting for any asynchronous data.
§

fn reset(state: &mut <F as IntoStyle>::State)

Reset the styling to the state before this style was added.
§

impl<F, S> IntoStyleValue for F
where F: ReactiveFunction<Output = S>, S: IntoStyleValue + 'static,

§

type AsyncOutput = F

The type after all async data have resolved.
§

type State = (Arc<str>, RenderEffect<<S as IntoStyleValue>::State>)

The view state retained between building and rebuilding.
§

type Cloneable = Arc<Mutex<dyn FnMut() -> S + Send>>

An equivalent value that can be cloned.
§

type CloneableOwned = Arc<Mutex<dyn FnMut() -> S + Send>>

An equivalent value that can be cloned and is 'static.
§

fn to_html(self, name: &str, style: &mut String)

Renders the style to HTML.
§

fn build( self, style: &CssStyleDeclaration, name: &str, ) -> <F as IntoStyleValue>::State

Adds this style to the element during client-side rendering.
§

fn rebuild( self, style: &CssStyleDeclaration, name: &str, state: &mut <F as IntoStyleValue>::State, )

Updates the value.
§

fn hydrate( self, style: &CssStyleDeclaration, name: &str, ) -> <F as IntoStyleValue>::State

Adds interactivity as necessary, given DOM nodes that were created from HTML that has either been rendered on the server, or cloned for a <template>.
§

fn into_cloneable(self) -> <F as IntoStyleValue>::Cloneable

Converts this to a cloneable type.
§

fn into_cloneable_owned(self) -> <F as IntoStyleValue>::CloneableOwned

Converts this to a cloneable, owned type.
§

fn dry_resolve(&mut self)

“Runs” the attribute without other side effects. For primitive types, this is a no-op. For reactive types, this can be used to gather data about reactivity or about asynchronous data that needs to be loaded.
§

async fn resolve(self) -> <F as IntoStyleValue>::AsyncOutput

“Resolves” this into a type that is not waiting for any asynchronous data.
§

impl<T> IntoView for T
where T: Render + RenderHtml + Send,

§

fn into_view(self) -> View<T>

Wraps the inner type.
§

impl<T, M> MakeExt<T> for M
where M: MakeVisitor<T> + Sealed<MakeExtMarker<T>>,

§

fn debug_alt(self) -> Alt<Self>

Wraps self so that any fmt::Debug fields are recorded using the alternate formatter ({:#?}).
§

fn display_messages(self) -> Messages<Self>

Wraps self so that any string fields named “message” are recorded using fmt::Display.
§

fn delimited<D>(self, delimiter: D) -> Delimited<D, Self>
where D: AsRef<str> + Clone, Self::Visitor: VisitFmt,

Wraps self so that when fields are formatted to a writer, they are separated by the provided delimiter.
§

impl<F, B> MakeSpan<B> for F
where F: FnMut(&Request<B>) -> Span,

§

fn make_span(&mut self, request: &Request<B>) -> Span

Make a span from a request.
§

impl<T, V, F> MakeVisitor<T> for F
where F: Fn(T) -> V, V: Visit,

§

type Visitor = V

The visitor type produced by this MakeVisitor.
§

fn make_visitor(&self, target: T) -> <F as MakeVisitor<T>>::Visitor

Make a new visitor for the provided target.
§

impl<'a, F, W> MakeWriter<'a> for F
where F: Fn() -> W, W: Write,

§

type Writer = W

The concrete io::Write implementation returned by make_writer.
§

fn make_writer(&'a self) -> <F as MakeWriter<'a>>::Writer

Returns an instance of Writer. Read more
§

fn make_writer_for(&'a self, meta: &Metadata<'_>) -> Self::Writer

Returns a Writer for writing data from the span or event described by the provided Metadata. Read more
§

impl<'a, M> MakeWriterExt<'a> for M
where M: MakeWriter<'a>,

§

fn with_max_level(self, level: Level) -> WithMaxLevel<Self>
where Self: Sized,

Wraps self and returns a [MakeWriter] that will only write output for events at or below the provided verbosity Level. For instance, Level::TRACE is considered to be _more verbosethanLevel::INFO`. Read more
§

fn with_min_level(self, level: Level) -> WithMinLevel<Self>
where Self: Sized,

Wraps self and returns a [MakeWriter] that will only write output for events at or above the provided verbosity Level. Read more
§

fn with_filter<F>(self, filter: F) -> WithFilter<Self, F>
where Self: Sized, F: Fn(&Metadata<'_>) -> bool,

Wraps self with a predicate that takes a span or event’s Metadata and returns a bool. The returned [MakeWriter]’s [MakeWriter::make_writer_for] method will check the predicate to determine if a writer should be produced for a given span or event. Read more
§

fn and<B>(self, other: B) -> Tee<Self, B>
where Self: Sized, B: MakeWriter<'a>,

Combines self with another type implementing [MakeWriter], returning a new [MakeWriter] that produces writers that write to both outputs. Read more
§

fn or_else<W, B>(self, other: B) -> OrElse<Self, B>
where Self: Sized + MakeWriter<'a, Writer = EitherWriter<W, Sink>>, B: MakeWriter<'a>, W: Write,

Combines self with another type implementing [MakeWriter], returning a new [MakeWriter] that calls other’s make_writer if self’s make_writer returns OptionalWriter::none. Read more
Source§

impl<F> MaybeTriple for F
where F: FnMut(Triple) + Send,

Source§

fn add_triple(&mut self, quad: impl FnOnce() -> Triple)

Available on crate feature rdf only.
§

impl<B, F> OnBodyChunk<B> for F
where F: FnMut(&B, Duration, &Span),

§

fn on_body_chunk(&mut self, chunk: &B, latency: Duration, span: &Span)

Do the thing. Read more
§

impl<F> OnEos for F
where F: FnOnce(Option<&HeaderMap>, Duration, &Span),

§

fn on_eos( self, trailers: Option<&HeaderMap>, stream_duration: Duration, span: &Span, )

Do the thing. Read more
§

impl<F> OnFailedUpgrade for F
where F: FnOnce(Error) + Send + 'static,

§

fn call(self, error: Error)

Call the callback.
§

impl<F, FailureClass> OnFailure<FailureClass> for F
where F: FnMut(FailureClass, Duration, &Span),

§

fn on_failure( &mut self, failure_classification: FailureClass, latency: Duration, span: &Span, )

Do the thing. Read more
§

impl<B, F> OnRequest<B> for F
where F: FnMut(&Request<B>, &Span),

§

fn on_request(&mut self, request: &Request<B>, span: &Span)

Do the thing. Read more
§

impl<B, F> OnResponse<B> for F
where F: FnOnce(&Response<B>, Duration, &Span),

§

fn on_response(self, response: &Response<B>, latency: Duration, span: &Span)

Do the thing. Read more
§

impl<'a, I, O, E, F> Parser<I, O, E> for F
where F: FnMut(I) -> Result<(I, O), Err<E>> + 'a,

§

fn parse(&mut self, i: I) -> Result<(I, O), Err<E>>

A parser takes in input type, and returns a Result containing either the remaining input and the output value, or an error
§

fn map<G, O2>(self, g: G) -> Map<Self, G, O>
where G: Fn(O) -> O2, Self: Sized,

Maps a function over the result of a parser
§

fn flat_map<G, H, O2>(self, g: G) -> FlatMap<Self, G, O>
where G: FnMut(O) -> H, H: Parser<I, O2, E>, Self: Sized,

Creates a second parser from the output of the first one, then apply over the rest of the input
§

fn and_then<G, O2>(self, g: G) -> AndThen<Self, G, O>
where G: Parser<O, O2, E>, Self: Sized,

Applies a second parser over the output of the first one
§

fn and<G, O2>(self, g: G) -> And<Self, G>
where G: Parser<I, O2, E>, Self: Sized,

Applies a second parser after the first one, return their results as a tuple
§

fn or<G>(self, g: G) -> Or<Self, G>
where G: Parser<I, O, E>, Self: Sized,

Applies a second parser over the input if the first one failed
§

fn into<O2, E2>(self) -> Into<Self, O, O2, E, E2>
where O2: From<O>, E2: From<E>, Self: Sized,

automatically converts the parser’s output and error values to another type, as long as they implement the From trait
§

impl<I, O, E, F> Parser<I, O, E> for F
where F: FnMut(&mut I) -> Result<O, E>, I: Stream,

§

fn parse_next(&mut self, i: &mut I) -> Result<O, E>

Take tokens from the [Stream], turning it into the output Read more
§

fn parse( &mut self, input: I, ) -> Result<O, ParseError<I, <E as ParserError<I>>::Inner>>
where Self: Sized, I: Stream + StreamIsPartial, E: ParserError<I>, <E as ParserError<I>>::Inner: ParserError<I>,

Parse all of input, generating O from it Read more
§

fn parse_peek(&mut self, input: I) -> Result<(I, O), E>

Take tokens from the [Stream], turning it into the output Read more
§

fn by_ref(&mut self) -> ByRef<'_, Self, I, O, E>
where Self: Sized,

Treat &mut Self as a parser Read more
§

fn value<O2>(self, val: O2) -> Value<Self, I, O, O2, E>
where Self: Sized, O2: Clone,

Produce the provided value Read more
§

fn default_value<O2>(self) -> DefaultValue<Self, I, O, O2, E>
where Self: Sized, O2: Default,

Produce a type’s default value Read more
§

fn void(self) -> Void<Self, I, O, E>
where Self: Sized,

Discards the output of the Parser Read more
§

fn output_into<O2>(self) -> OutputInto<Self, I, O, O2, E>
where Self: Sized, O: Into<O2>,

Convert the parser’s output to another type using std::convert::From Read more
§

fn take(self) -> Take<Self, I, O, E>
where Self: Sized, I: Stream,

Produce the consumed input as produced value. Read more
§

fn with_taken(self) -> WithTaken<Self, I, O, E>
where Self: Sized, I: Stream,

Produce the consumed input with the output Read more
§

fn span(self) -> Span<Self, I, O, E>
where Self: Sized, I: Stream + Location,

Produce the location of the consumed input as produced value. Read more
§

fn with_span(self) -> WithSpan<Self, I, O, E>
where Self: Sized, I: Stream + Location,

Produce the location of consumed input with the output Read more
§

fn map<G, O2>(self, map: G) -> Map<Self, G, I, O, O2, E>
where G: FnMut(O) -> O2, Self: Sized,

Maps a function over the output of a parser Read more
§

fn try_map<G, O2, E2>(self, map: G) -> TryMap<Self, G, I, O, O2, E, E2>
where Self: Sized, G: FnMut(O) -> Result<O2, E2>, I: Stream, E: FromExternalError<I, E2> + ParserError<I>,

Applies a function returning a Result over the output of a parser. Read more
§

fn verify_map<G, O2>(self, map: G) -> VerifyMap<Self, G, I, O, O2, E>
where Self: Sized, G: FnMut(O) -> Option<O2>, I: Stream, E: ParserError<I>,

Apply both [Parser::verify] and [Parser::map]. Read more
§

fn flat_map<G, H, O2>(self, map: G) -> FlatMap<Self, G, H, I, O, O2, E>
where Self: Sized, G: FnMut(O) -> H, H: Parser<I, O2, E>,

Creates a parser from the output of this one Read more
§

fn and_then<G, O2>(self, inner: G) -> AndThen<Self, G, I, O, O2, E>
where Self: Sized, G: Parser<O, O2, E>, O: StreamIsPartial, I: Stream,

Applies a second parser over the output of the first one Read more
§

fn parse_to<O2>(self) -> ParseTo<Self, I, O, O2, E>
where Self: Sized, I: Stream, O: ParseSlice<O2>, E: ParserError<I>,

Apply std::str::FromStr to the output of the parser Read more
§

fn verify<G, O2>(self, filter: G) -> Verify<Self, G, I, O, O2, E>
where Self: Sized, G: FnMut(&O2) -> bool, I: Stream, O: Borrow<O2>, E: ParserError<I>, O2: ?Sized,

Returns the output of the child parser if it satisfies a verification function. Read more
§

fn context<C>(self, context: C) -> Context<Self, I, O, E, C>
where Self: Sized, I: Stream, E: AddContext<I, C> + ParserError<I>, C: Clone + Debug,

If parsing fails, add context to the error Read more
§

fn context_with<F, C, FI>( self, context: F, ) -> ContextWith<Self, I, O, E, F, C, FI>
where Self: Sized, I: Stream, E: AddContext<I, C> + ParserError<I>, F: Fn() -> FI + Clone, C: Debug, FI: Iterator<Item = C>,

If parsing fails, dynamically add context to the error Read more
§

fn map_err<G, E2>(self, map: G) -> MapErr<Self, G, I, O, E, E2>
where G: FnMut(E) -> E2, Self: Sized,

Maps a function over the error of a parser Read more
§

fn complete_err(self) -> CompleteErr<Self, I, O, E>
where Self: Sized,

Transforms [Incomplete][crate::error::ErrMode::Incomplete] into [Backtrack][crate::error::ErrMode::Backtrack] Read more
§

fn err_into<E2>(self) -> ErrInto<Self, I, O, E, E2>
where Self: Sized, E: Into<E2>,

Convert the parser’s error to another type using std::convert::From
§

impl<I, O, E, F> Parser<I, O, E> for F
where F: FnMut(&mut I) -> Result<O, ErrMode<E>>, I: Stream,

§

fn parse_next(&mut self, i: &mut I) -> Result<O, ErrMode<E>>

Take tokens from the [Stream], turning it into the output Read more
§

fn parse(&mut self, input: I) -> Result<O, ParseError<I, E>>
where Self: Sized, I: Stream + StreamIsPartial, E: ParserError<I>,

Parse all of input, generating O from it
§

fn parse_peek(&mut self, input: I) -> Result<(I, O), ErrMode<E>>

Take tokens from the [Stream], turning it into the output Read more
§

fn by_ref(&mut self) -> ByRef<'_, Self>
where Self: Sized,

Treat &mut Self as a parser Read more
§

fn value<O2>(self, val: O2) -> Value<Self, I, O, O2, E>
where Self: Sized, O2: Clone,

Produce the provided value Read more
§

fn default_value<O2>(self) -> DefaultValue<Self, I, O, O2, E>
where Self: Sized, O2: Default,

Produce a type’s default value Read more
§

fn void(self) -> Void<Self, I, O, E>
where Self: Sized,

Discards the output of the Parser Read more
§

fn output_into<O2>(self) -> OutputInto<Self, I, O, O2, E>
where Self: Sized, O: Into<O2>,

Convert the parser’s output to another type using std::convert::From Read more
§

fn take(self) -> Take<Self, I, O, E>
where Self: Sized, I: Stream,

Produce the consumed input as produced value. Read more
§

fn recognize(self) -> Take<Self, I, O, E>
where Self: Sized, I: Stream,

👎Deprecated since 0.6.14: Replaced with Parser::take
Replaced with [Parser::take]
§

fn with_taken(self) -> WithTaken<Self, I, O, E>
where Self: Sized, I: Stream,

Produce the consumed input with the output Read more
§

fn with_recognized(self) -> WithTaken<Self, I, O, E>
where Self: Sized, I: Stream,

👎Deprecated since 0.6.14: Replaced with Parser::with_taken
Replaced with [Parser::with_taken]
§

fn span(self) -> Span<Self, I, O, E>
where Self: Sized, I: Stream + Location,

Produce the location of the consumed input as produced value. Read more
§

fn with_span(self) -> WithSpan<Self, I, O, E>
where Self: Sized, I: Stream + Location,

Produce the location of consumed input with the output Read more
§

fn map<G, O2>(self, map: G) -> Map<Self, G, I, O, O2, E>
where G: FnMut(O) -> O2, Self: Sized,

Maps a function over the output of a parser Read more
§

fn try_map<G, O2, E2>(self, map: G) -> TryMap<Self, G, I, O, O2, E, E2>
where Self: Sized, G: FnMut(O) -> Result<O2, E2>, I: Stream, E: FromExternalError<I, E2>,

Applies a function returning a Result over the output of a parser. Read more
§

fn verify_map<G, O2>(self, map: G) -> VerifyMap<Self, G, I, O, O2, E>
where Self: Sized, G: FnMut(O) -> Option<O2>, I: Stream, E: ParserError<I>,

Apply both [Parser::verify] and [Parser::map]. Read more
§

fn flat_map<G, H, O2>(self, map: G) -> FlatMap<Self, G, H, I, O, O2, E>
where Self: Sized, G: FnMut(O) -> H, H: Parser<I, O2, E>,

Creates a parser from the output of this one Read more
§

fn and_then<G, O2>(self, inner: G) -> AndThen<Self, G, I, O, O2, E>
where Self: Sized, G: Parser<O, O2, E>, O: StreamIsPartial, I: Stream,

Applies a second parser over the output of the first one Read more
§

fn parse_to<O2>(self) -> ParseTo<Self, I, O, O2, E>
where Self: Sized, I: Stream, O: ParseSlice<O2>, E: ParserError<I>,

Apply std::str::FromStr to the output of the parser Read more
§

fn verify<G, O2>(self, filter: G) -> Verify<Self, G, I, O, O2, E>
where Self: Sized, G: FnMut(&O2) -> bool, I: Stream, O: Borrow<O2>, E: ParserError<I>, O2: ?Sized,

Returns the output of the child parser if it satisfies a verification function. Read more
§

fn context<C>(self, context: C) -> Context<Self, I, O, E, C>
where Self: Sized, I: Stream, E: AddContext<I, C>, C: Clone + Debug,

If parsing fails, add context to the error Read more
§

fn complete_err(self) -> CompleteErr<Self>
where Self: Sized,

Transforms [Incomplete][crate::error::ErrMode::Incomplete] into [Backtrack][crate::error::ErrMode::Backtrack] Read more
§

fn err_into<E2>(self) -> ErrInto<Self, I, O, E, E2>
where Self: Sized, E: Into<E2>,

Convert the parser’s error to another type using std::convert::From
Source§

impl<F, T> Parser for F
where F: FnOnce(&ParseBuffer<'_>) -> Result<T, Error>,

Source§

type Output = T

Source§

fn parse2(self, tokens: TokenStream) -> Result<T, Error>

Parse a proc-macro2 token stream into the chosen syntax tree node. Read more
Source§

fn __parse_scoped( self, scope: Span, tokens: TokenStream, ) -> Result<<F as Parser>::Output, Error>

Source§

fn parse(self, tokens: TokenStream) -> Result<Self::Output, Error>

Available on crate feature proc-macro only.
Parse tokens of source code into the chosen syntax tree node. Read more
Source§

fn parse_str(self, s: &str) -> Result<Self::Output, Error>

Parse a string of Rust code into the chosen syntax tree node. Read more
Source§

impl<T> PathExt for T
where T: AsRef<Path>,

Source§

fn copy_dir_all<P>(&self, target: &P) -> Result<(), FileError>
where P: AsRef<Path>,

§Errors
Source§

const PATH_SEPARATOR: char = '/'

Source§

fn relative_to<'s, P>(&'s self, ancestor: &P) -> Option<RelPath<'s>>
where P: AsRef<Path>,

Source§

fn join_uri_path(&self, path: &UriPath) -> PathBuf

Source§

fn as_slash_str(&self) -> Cow<'_, str>

Source§

fn same_fs_as<P>(&self, other: &P) -> bool
where P: AsRef<Path>,

Source§

fn rename_safe<P>(&self, target: &P) -> Result<(), FileError>
where P: AsRef<Path>,

Errors Read more
Source§

impl<F> Pattern for F
where F: FnMut(char) -> bool,

Source§

type Searcher<'a> = CharPredicateSearcher<'a, F>

🔬This is a nightly-only experimental API. (pattern)
Associated searcher for this pattern
Source§

fn into_searcher<'a>(self, haystack: &'a str) -> CharPredicateSearcher<'a, F>

🔬This is a nightly-only experimental API. (pattern)
Constructs the associated searcher from self and the haystack to search in.
Source§

fn is_contained_in<'a>(self, haystack: &'a str) -> bool

🔬This is a nightly-only experimental API. (pattern)
Checks whether the pattern matches anywhere in the haystack
Source§

fn is_prefix_of<'a>(self, haystack: &'a str) -> bool

🔬This is a nightly-only experimental API. (pattern)
Checks whether the pattern matches at the front of the haystack
Source§

fn strip_prefix_of<'a>(self, haystack: &'a str) -> Option<&'a str>

🔬This is a nightly-only experimental API. (pattern)
Removes the pattern from the front of haystack, if it matches.
Source§

fn is_suffix_of<'a>(self, haystack: &'a str) -> bool

🔬This is a nightly-only experimental API. (pattern)
Checks whether the pattern matches at the back of the haystack
Source§

fn strip_suffix_of<'a>(self, haystack: &'a str) -> Option<&'a str>

🔬This is a nightly-only experimental API. (pattern)
Removes the pattern from the back of haystack, if it matches.
Source§

fn as_utf8_pattern(&self) -> Option<Utf8Pattern<'_>>

🔬This is a nightly-only experimental API. (pattern)
Returns the pattern as utf-8 bytes if possible.
Source§

impl<F, T> Peek for F
where F: Copy + FnOnce(TokenMarker) -> T, T: Token,

Source§

type Token = T

§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

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

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
§

impl<F, T> ReactiveFunction for F
where F: FnMut() -> T + Send + 'static,

§

type Output = T

The return type of the function.
§

fn invoke(&mut self) -> <F as ReactiveFunction>::Output

Call the function.
§

fn into_shared( self, ) -> Arc<Mutex<dyn FnMut() -> <F as ReactiveFunction>::Output + Send>>

Converts the function into a cloneable, shared type.
§

impl<F, V> Render for F
where F: ReactiveFunction<Output = V>, V: Render, <V as Render>::State: 'static,

§

type State = RenderEffectState<<V as Render>::State>

The “view state” for this type, which can be retained between updates. Read more
§

fn build(self) -> <F as Render>::State

Creates the view for the first time, without hydrating from existing HTML.
§

fn rebuild(self, state: &mut <F as Render>::State)

Updates the view with new data.
§

impl<F, V> RenderHtml for F
where F: ReactiveFunction<Output = V>, V: RenderHtml + 'static, <V as Render>::State: 'static,

§

const MIN_LENGTH: usize = 0usize

The minimum length of HTML created when this view is rendered.
§

type AsyncOutput = <V as RenderHtml>::AsyncOutput

The type of the view after waiting for all asynchronous data to load.
§

type Owned = F

An equivalent value that is 'static.
§

fn dry_resolve(&mut self)

“Runs” the view without other side effects. For primitive types, this is a no-op. For reactive types, this can be used to gather data about reactivity or about asynchronous data that needs to be loaded.
§

async fn resolve(self) -> <F as RenderHtml>::AsyncOutput

Waits for any asynchronous sections of the view to load and returns the output.
§

fn html_len(&self) -> usize

An estimated length for this view, when rendered to HTML. Read more
§

fn to_html_with_buf( self, buf: &mut String, position: &mut Position, escape: bool, mark_branches: bool, extra_attrs: Vec<AnyAttribute>, )

Renders a view to HTML, writing it into the given buffer.
§

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>, )

Renders a view into a buffer of (synchronous or asynchronous) HTML chunks.
§

fn hydrate<const FROM_SERVER: bool>( self, cursor: &Cursor, position: &PositionState, ) -> <F as Render>::State

Makes a set of DOM nodes rendered from HTML interactive. Read more
§

async fn hydrate_async( self, cursor: &Cursor, position: &PositionState, ) -> <F as Render>::State

Asynchronously makes a set of DOM nodes rendered from HTML interactive. Read more
§

fn into_owned(self) -> <F as RenderHtml>::Owned

Convert into the equivalent value that is 'static.
§

const EXISTS: bool = true

Whether this should actually exist in the DOM, if it is the child of an element.
§

fn to_html(self) -> String
where Self: Sized,

Renders a view to an HTML string.
§

fn to_html_branching(self) -> String
where Self: Sized,

Renders a view to HTML with branch markers. This can be used to support libraries that diff HTML pages against one another, by marking sections of the view that branch to different types with marker comments.
§

fn to_html_stream_in_order(self) -> StreamBuilder
where Self: Sized,

Renders a view to an in-order stream of HTML.
§

fn to_html_stream_in_order_branching(self) -> StreamBuilder
where Self: Sized,

Renders a view to an in-order stream of HTML with branch markers. This can be used to support libraries that diff HTML pages against one another, by marking sections of the view that branch to different types with marker comments.
§

fn to_html_stream_out_of_order(self) -> StreamBuilder
where Self: Sized,

Renders a view to an out-of-order stream of HTML.
§

fn to_html_stream_out_of_order_branching(self) -> StreamBuilder
where Self: Sized,

Renders a view to an out-of-order stream of HTML with branch markers. This can be used to support libraries that diff HTML pages against one another, by marking sections of the view that branch to different types with marker comments.
§

fn hydrate_from<const FROM_SERVER: bool>(self, el: &Element) -> Self::State
where Self: Sized,

Hydrates using RenderHtml::hydrate, beginning at the given element.
§

fn hydrate_from_position<const FROM_SERVER: bool>( self, el: &Element, position: Position, ) -> Self::State
where Self: Sized,

Hydrates using RenderHtml::hydrate, beginning at the given element and position.
§

impl<F, T> Replacer for F
where F: FnMut(&Captures<'_>) -> T, T: AsRef<[u8]>,

§

fn replace_append(&mut self, caps: &Captures<'_>, dst: &mut Vec<u8>)

Appends possibly empty data to dst to replace the current match. Read more
§

fn no_expansion<'r>(&'r mut self) -> Option<Cow<'r, [u8]>>

Return a fixed unchanging replacement byte string. Read more
§

fn by_ref<'r>(&'r mut self) -> ReplacerRef<'r, Self>

Returns a type that implements Replacer, but that borrows and wraps this Replacer. Read more
§

impl<F, T> Replacer for F
where F: FnMut(&Captures<'_>) -> T, T: AsRef<str>,

§

fn replace_append(&mut self, caps: &Captures<'_>, dst: &mut String)

Appends possibly empty data to dst to replace the current match. Read more
§

fn no_expansion<'r>(&'r mut self) -> Option<Cow<'r, str>>

Return a fixed unchanging replacement string. Read more
§

fn by_ref<'r>(&'r mut self) -> ReplacerRef<'r, Self>

Returns a type that implements Replacer, but that borrows and wraps this Replacer. Read more
§

impl<F, E> ResolveServerName for F
where F: Fn(&Uri) -> Result<ServerName<'static>, E>, E: Into<Box<dyn Error + Send + Sync>>,

§

fn resolve( &self, uri: &Uri, ) -> Result<ServerName<'static>, Box<dyn Error + Send + Sync>>

Maps a Uri into a [ServerName].
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<F, TScore> ScoreSegmentTweaker<TScore> for F
where F: 'static + FnMut(u32, f32) -> TScore,

§

fn score(&mut self, doc: u32, score: f32) -> TScore

Tweak the given score for the document doc.
§

impl<F, TScore, TSegmentScoreTweaker> ScoreTweaker<TScore> for F
where F: 'static + Send + Sync + Fn(&SegmentReader) -> TSegmentScoreTweaker, TSegmentScoreTweaker: ScoreSegmentTweaker<TScore>,

§

type Child = TSegmentScoreTweaker

Type of the associated [ScoreSegmentTweaker].
§

fn segment_tweaker( &self, segment_reader: &SegmentReader, ) -> Result<<F as ScoreTweaker<TScore>>::Child, TantivyError>

Builds a child tweaker for a specific segment. The child scorer is associated with a specific segment.
§

impl<T> SerializableKey for T

§

fn ser_key(&self) -> String

Serializes the key to a unique string. Read more
§

impl<T> StorageAccess<T> for T

§

fn as_borrowed(&self) -> &T

Borrows the value.
§

fn into_taken(self) -> T

Takes the value.
§

impl<E, T> SyncHttpClient for T
where E: Error + 'static, T: Fn(Request<Vec<u8>>) -> Result<Response<Vec<u8>>, E>,

§

type Error = E

Error type returned by HTTP client.
§

fn call( &self, request: Request<Vec<u8>>, ) -> Result<Response<Vec<u8>>, <T as SyncHttpClient>::Error>

Perform a single HTTP request.
Source§

impl<T> ToHex for T
where T: AsRef<[u8]>,

Source§

fn encode_hex<U>(&self) -> U
where U: FromIterator<char>,

Encode the hex strict representing self into the result. Lower case letters are used (e.g. f9b4ca)
Source§

fn encode_hex_upper<U>(&self) -> U
where U: FromIterator<char>,

Encode the hex strict representing self into the result. Upper case letters are used (e.g. F9B4CA)
§

impl<F> ToHref for F
where F: Fn() -> String + 'static,

§

fn to_href(&self) -> Box<dyn Fn() -> String + '_>

Converts the (static or reactive) URL into a function that can be called to return the URL.
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
§

impl<F, V> ToTemplate for F
where F: ReactiveFunction<Output = V>, V: ToTemplate,

§

const TEMPLATE: &'static str = V::TEMPLATE

The HTML content of the static template.
§

fn to_template( buf: &mut String, class: &mut String, style: &mut String, inner_html: &mut String, position: &mut Position, )

Renders a view type to a template. This does not take actual view data, but can be used for constructing part of an HTML <template> that corresponds to a view of a particular type.
§

const CLASS: &'static str = ""

The class attribute content known at compile time.
§

const STYLE: &'static str = ""

The style attribute content known at compile time.
§

const LEN: usize = _

The length of the template.
§

fn to_template_attribute( buf: &mut String, class: &mut String, style: &mut String, inner_html: &mut String, position: &mut Position, )

Renders a view type to a template in attribute position.
Source§

impl<T, C> TryComponentsInto<C> for T
where C: TryFromComponents<T>,

Source§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
Source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of colors. 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.
§

impl<F, T, E> TryFuture for F
where F: Future<Output = Result<T, E>> + ?Sized,

§

type Ok = T

The type of successful values yielded by this future
§

type Error = E

The type of failures yielded by this future
§

fn try_poll( self: Pin<&mut F>, cx: &mut Context<'_>, ) -> Poll<<F as Future>::Output>

Poll this TryFuture as if it were a Future. Read more
§

impl<Fut> TryFutureExt for Fut
where Fut: TryFuture + ?Sized,

§

fn flatten_sink<Item>(self) -> FlattenSink<Self, Self::Ok>
where Self::Ok: Sink<Item, Error = Self::Error>, Self: Sized,

Available on crate feature sink only.
Flattens the execution of this future when the successful result of this future is a [Sink]. Read more
§

fn map_ok<T, F>(self, f: F) -> MapOk<Self, F>
where F: FnOnce(Self::Ok) -> T, Self: Sized,

Maps this future’s success value to a different value. Read more
§

fn map_ok_or_else<T, E, F>(self, e: E, f: F) -> MapOkOrElse<Self, F, E>
where F: FnOnce(Self::Ok) -> T, E: FnOnce(Self::Error) -> T, Self: Sized,

Maps this future’s success value to a different value, and permits for error handling resulting in the same type. Read more
§

fn map_err<E, F>(self, f: F) -> MapErr<Self, F>
where F: FnOnce(Self::Error) -> E, Self: Sized,

Maps this future’s error value to a different value. Read more
§

fn err_into<E>(self) -> ErrInto<Self, E>
where Self: Sized, Self::Error: Into<E>,

Maps this future’s Error to a new error type using the Into trait. Read more
§

fn ok_into<U>(self) -> OkInto<Self, U>
where Self: Sized, Self::Ok: Into<U>,

Maps this future’s Ok to a new type using the Into trait.
§

fn and_then<Fut, F>(self, f: F) -> AndThen<Self, Fut, F>
where F: FnOnce(Self::Ok) -> Fut, Fut: TryFuture<Error = Self::Error>, Self: Sized,

Executes another future after this one resolves successfully. The success value is passed to a closure to create this subsequent future. Read more
§

fn or_else<Fut, F>(self, f: F) -> OrElse<Self, Fut, F>
where F: FnOnce(Self::Error) -> Fut, Fut: TryFuture<Ok = Self::Ok>, Self: Sized,

Executes another future if this one resolves to an error. The error value is passed to a closure to create this subsequent future. Read more
§

fn inspect_ok<F>(self, f: F) -> InspectOk<Self, F>
where F: FnOnce(&Self::Ok), Self: Sized,

Do something with the success value of a future before passing it on. Read more
§

fn inspect_err<F>(self, f: F) -> InspectErr<Self, F>
where F: FnOnce(&Self::Error), Self: Sized,

Do something with the error value of a future before passing it on. Read more
§

fn try_flatten(self) -> TryFlatten<Self, Self::Ok>
where Self::Ok: TryFuture<Error = Self::Error>, Self: Sized,

Flatten the execution of this future when the successful result of this future is another future. Read more
§

fn try_flatten_stream(self) -> TryFlattenStream<Self>
where Self::Ok: TryStream<Error = Self::Error>, Self: Sized,

Flatten the execution of this future when the successful result of this future is a stream. Read more
§

fn unwrap_or_else<F>(self, f: F) -> UnwrapOrElse<Self, F>
where Self: Sized, F: FnOnce(Self::Error) -> Self::Ok,

Unwraps this future’s output, producing a future with this future’s Ok type as its Output type. Read more
§

fn into_future(self) -> IntoFuture<Self>
where Self: Sized,

Wraps a [TryFuture] into a type that implements Future. Read more
§

fn try_poll_unpin( &mut self, cx: &mut Context<'_>, ) -> Poll<Result<Self::Ok, Self::Error>>
where Self: Unpin,

A convenience method for calling [TryFuture::try_poll] on Unpin future types.
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, U> TryIntoColor<U> for T
where U: TryFromColor<T>,

Source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined range, otherwise an OutOfBounds error is returned which contains the unclamped color. Read more
Source§

impl<C, U> UintsFrom<C> for U
where C: IntoUints<U>,

Source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
Source§

impl<C, U> UintsInto<C> for U
where C: FromUints<U>,

Source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<F> Visit for F
where F: FnMut(&Field, &dyn Debug),

§

fn record_debug(&mut self, field: &Field, value: &dyn Debug)

Visit a value implementing fmt::Debug.
§

fn record_f64(&mut self, field: &Field, value: f64)

Visit a double-precision floating point value.
§

fn record_i64(&mut self, field: &Field, value: i64)

Visit a signed 64-bit integer value.
§

fn record_u64(&mut self, field: &Field, value: u64)

Visit an unsigned 64-bit integer value.
§

fn record_i128(&mut self, field: &Field, value: i128)

Visit a signed 128-bit integer value.
§

fn record_u128(&mut self, field: &Field, value: u128)

Visit an unsigned 128-bit integer value.
§

fn record_bool(&mut self, field: &Field, value: bool)

Visit a boolean value.
§

fn record_str(&mut self, field: &Field, value: &str)

Visit a string value.
§

fn record_bytes(&mut self, field: &Field, value: &[u8])

Visit a byte slice.
§

fn record_error(&mut self, field: &Field, value: &(dyn Error + 'static))

Available on crate feature std only.
Records a type implementing Error. Read more
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<F, R> Component<EmptyPropsBuilder> for F
where F: FnOnce() -> R,

§

impl<P, F, R> Component<P> for F
where F: FnOnce(P) -> R, P: Props,

§

impl<T> Fruit for T
where T: Send + Downcast,

§

impl<I, O, E, P> ModalParser<I, O, E> for P
where P: Parser<I, O, ErrMode<E>>,

§

impl<I, O, E, P> ModalParser<I, O, E> for P
where P: Parser<I, O, E>,