Skip to main content

Box

Struct Box 

1.36.0 ยท Source
pub struct Box<T, A = Global>(/* private fields */)
where
    A: Allocator,
    T: ?Sized;
Available on wayland_platform only.
Expand description

A pointer type that uniquely owns a heap allocation of type T.

See the module-level documentation for more.

Implementationsยง

Sourceยง

impl<A> Box<dyn Any, A>
where A: Allocator,

1.0.0 ยท Source

pub fn downcast<T>(self) -> Result<Box<T, A>, Box<dyn Any, A>>
where T: Any,

Attempts to downcast the box to a concrete type.

ยงExamples
use std::any::Any;

fn print_if_string(value: Box<dyn Any>) {
    if let Ok(string) = value.downcast::<String>() {
        println!("String ({}): {}", string.len(), string);
    }
}

let my_string = "Hello World".to_string();
print_if_string(Box::new(my_string));
print_if_string(Box::new(0i8));
Source

pub unsafe fn downcast_unchecked<T>(self) -> Box<T, A>
where T: Any,

๐Ÿ”ฌThis is a nightly-only experimental API. (downcast_unchecked)

Downcasts the box to a concrete type.

For a safe alternative see downcast.

ยงExamples
#![feature(downcast_unchecked)]

use std::any::Any;

let x: Box<dyn Any> = Box::new(1_usize);

unsafe {
    assert_eq!(*x.downcast_unchecked::<usize>(), 1);
}
ยงSafety

The contained value must be of type T. Calling this method with the incorrect type is undefined behavior.

Sourceยง

impl<A> Box<dyn Any + Send, A>
where A: Allocator,

1.0.0 ยท Source

pub fn downcast<T>(self) -> Result<Box<T, A>, Box<dyn Any + Send, A>>
where T: Any,

Attempts to downcast the box to a concrete type.

ยงExamples
use std::any::Any;

fn print_if_string(value: Box<dyn Any + Send>) {
    if let Ok(string) = value.downcast::<String>() {
        println!("String ({}): {}", string.len(), string);
    }
}

let my_string = "Hello World".to_string();
print_if_string(Box::new(my_string));
print_if_string(Box::new(0i8));
Source

pub unsafe fn downcast_unchecked<T>(self) -> Box<T, A>
where T: Any,

๐Ÿ”ฌThis is a nightly-only experimental API. (downcast_unchecked)

Downcasts the box to a concrete type.

For a safe alternative see downcast.

ยงExamples
#![feature(downcast_unchecked)]

use std::any::Any;

let x: Box<dyn Any + Send> = Box::new(1_usize);

unsafe {
    assert_eq!(*x.downcast_unchecked::<usize>(), 1);
}
ยงSafety

The contained value must be of type T. Calling this method with the incorrect type is undefined behavior.

Sourceยง

impl<A> Box<dyn Any + Sync + Send, A>
where A: Allocator,

1.51.0 ยท Source

pub fn downcast<T>(self) -> Result<Box<T, A>, Box<dyn Any + Sync + Send, A>>
where T: Any,

Attempts to downcast the box to a concrete type.

ยงExamples
use std::any::Any;

fn print_if_string(value: Box<dyn Any + Send + Sync>) {
    if let Ok(string) = value.downcast::<String>() {
        println!("String ({}): {}", string.len(), string);
    }
}

let my_string = "Hello World".to_string();
print_if_string(Box::new(my_string));
print_if_string(Box::new(0i8));
Source

pub unsafe fn downcast_unchecked<T>(self) -> Box<T, A>
where T: Any,

๐Ÿ”ฌThis is a nightly-only experimental API. (downcast_unchecked)

Downcasts the box to a concrete type.

For a safe alternative see downcast.

ยงExamples
#![feature(downcast_unchecked)]

use std::any::Any;

let x: Box<dyn Any + Send + Sync> = Box::new(1_usize);

unsafe {
    assert_eq!(*x.downcast_unchecked::<usize>(), 1);
}
ยงSafety

The contained value must be of type T. Calling this method with the incorrect type is undefined behavior.

Sourceยง

impl<T> Box<T>

1.0.0 ยท Source

pub fn new(x: T) -> Box<T>

Available on non-no_global_oom_handling only.

Allocates memory on the heap and then places x into it.

This doesnโ€™t actually allocate if T is zero-sized.

ยงExamples
let five = Box::new(5);
1.82.0 ยท Source

pub fn new_uninit() -> Box<MaybeUninit<T>>

Available on non-no_global_oom_handling only.

Constructs a new box with uninitialized contents.

ยงExamples
let mut five = Box::<u32>::new_uninit();
// Deferred initialization:
five.write(5);
let five = unsafe { five.assume_init() };

assert_eq!(*five, 5)
1.92.0 ยท Source

pub fn new_zeroed() -> Box<MaybeUninit<T>>

Available on non-no_global_oom_handling only.

Constructs a new Box with uninitialized contents, with the memory being filled with 0 bytes.

See MaybeUninit::zeroed for examples of correct and incorrect usage of this method.

ยงExamples
let zero = Box::<u32>::new_zeroed();
let zero = unsafe { zero.assume_init() };

assert_eq!(*zero, 0)
1.33.0 ยท Source

pub fn pin(x: T) -> Pin<Box<T>>

Available on non-no_global_oom_handling only.

Constructs a new Pin<Box<T>>. If T does not implement Unpin, then x will be pinned in memory and unable to be moved.

Constructing and pinning of the Box can also be done in two steps: Box::pin(x) does the same as Box::into_pin(Box::new(x)). Consider using into_pin if you already have a Box<T>, or if you want to construct a (pinned) Box in a different way than with Box::new.

Source

pub fn try_new(x: T) -> Result<Box<T>, AllocError>

๐Ÿ”ฌThis is a nightly-only experimental API. (allocator_api)

Allocates memory on the heap then places x into it, returning an error if the allocation fails

This doesnโ€™t actually allocate if T is zero-sized.

ยงExamples
#![feature(allocator_api)]

let five = Box::try_new(5)?;
Source

pub fn try_new_uninit() -> Result<Box<MaybeUninit<T>>, AllocError>

๐Ÿ”ฌThis is a nightly-only experimental API. (allocator_api)

Constructs a new box with uninitialized contents on the heap, returning an error if the allocation fails

ยงExamples
#![feature(allocator_api)]

let mut five = Box::<u32>::try_new_uninit()?;
// Deferred initialization:
five.write(5);
let five = unsafe { five.assume_init() };

assert_eq!(*five, 5);
Source

pub fn try_new_zeroed() -> Result<Box<MaybeUninit<T>>, AllocError>

๐Ÿ”ฌThis is a nightly-only experimental API. (allocator_api)

Constructs a new Box with uninitialized contents, with the memory being filled with 0 bytes on the heap

See MaybeUninit::zeroed for examples of correct and incorrect usage of this method.

ยงExamples
#![feature(allocator_api)]

let zero = Box::<u32>::try_new_zeroed()?;
let zero = unsafe { zero.assume_init() };

assert_eq!(*zero, 0);
Source

pub fn map<U>(this: Box<T>, f: impl FnOnce(T) -> U) -> Box<U>

๐Ÿ”ฌThis is a nightly-only experimental API. (smart_pointer_try_map)
Available on non-no_global_oom_handling only.

Maps the value in a box, reusing the allocation if possible.

f is called on the value in the box, and the result is returned, also boxed.

Note: this is an associated function, which means that you have to call it as Box::map(b, f) instead of b.map(f). This is so that there is no conflict with a method on the inner type.

ยงExamples
#![feature(smart_pointer_try_map)]

let b = Box::new(7);
let new = Box::map(b, |i| i + 7);
assert_eq!(*new, 14);
Source

pub fn try_map<R>( this: Box<T>, f: impl FnOnce(T) -> R, ) -> <<R as Try>::Residual as Residual<Box<<R as Try>::Output>>>::TryType
where R: Try, <R as Try>::Residual: Residual<Box<<R as Try>::Output>>,

๐Ÿ”ฌThis is a nightly-only experimental API. (smart_pointer_try_map)
Available on non-no_global_oom_handling only.

Attempts to map the value in a box, reusing the allocation if possible.

f is called on the value in the box, and if the operation succeeds, the result is returned, also boxed.

Note: this is an associated function, which means that you have to call it as Box::try_map(b, f) instead of b.try_map(f). This is so that there is no conflict with a method on the inner type.

ยงExamples
#![feature(smart_pointer_try_map)]

let b = Box::new(7);
let new = Box::try_map(b, u32::try_from).unwrap();
assert_eq!(*new, 7);
Sourceยง

impl<T, A> Box<T, A>
where A: Allocator,

Source

pub fn new_in(x: T, alloc: A) -> Box<T, A>
where A: Allocator,

๐Ÿ”ฌThis is a nightly-only experimental API. (allocator_api)
Available on non-no_global_oom_handling only.

Allocates memory in the given allocator then places x into it.

This doesnโ€™t actually allocate if T is zero-sized.

ยงExamples
#![feature(allocator_api)]

use std::alloc::System;

let five = Box::new_in(5, System);
Source

pub fn try_new_in(x: T, alloc: A) -> Result<Box<T, A>, AllocError>
where A: Allocator,

๐Ÿ”ฌThis is a nightly-only experimental API. (allocator_api)

Allocates memory in the given allocator then places x into it, returning an error if the allocation fails

This doesnโ€™t actually allocate if T is zero-sized.

ยงExamples
#![feature(allocator_api)]

use std::alloc::System;

let five = Box::try_new_in(5, System)?;
Source

pub fn new_uninit_in(alloc: A) -> Box<MaybeUninit<T>, A>
where A: Allocator,

๐Ÿ”ฌThis is a nightly-only experimental API. (allocator_api)
Available on non-no_global_oom_handling only.

Constructs a new box with uninitialized contents in the provided allocator.

ยงExamples
#![feature(allocator_api)]

use std::alloc::System;

let mut five = Box::<u32, _>::new_uninit_in(System);
// Deferred initialization:
five.write(5);
let five = unsafe { five.assume_init() };

assert_eq!(*five, 5)
Source

pub fn try_new_uninit_in(alloc: A) -> Result<Box<MaybeUninit<T>, A>, AllocError>
where A: Allocator,

๐Ÿ”ฌThis is a nightly-only experimental API. (allocator_api)

Constructs a new box with uninitialized contents in the provided allocator, returning an error if the allocation fails

ยงExamples
#![feature(allocator_api)]

use std::alloc::System;

let mut five = Box::<u32, _>::try_new_uninit_in(System)?;
// Deferred initialization:
five.write(5);
let five = unsafe { five.assume_init() };

assert_eq!(*five, 5);
Source

pub fn new_zeroed_in(alloc: A) -> Box<MaybeUninit<T>, A>
where A: Allocator,

๐Ÿ”ฌThis is a nightly-only experimental API. (allocator_api)
Available on non-no_global_oom_handling only.

Constructs a new Box with uninitialized contents, with the memory being filled with 0 bytes in the provided allocator.

See MaybeUninit::zeroed for examples of correct and incorrect usage of this method.

ยงExamples
#![feature(allocator_api)]

use std::alloc::System;

let zero = Box::<u32, _>::new_zeroed_in(System);
let zero = unsafe { zero.assume_init() };

assert_eq!(*zero, 0)
Source

pub fn try_new_zeroed_in(alloc: A) -> Result<Box<MaybeUninit<T>, A>, AllocError>
where A: Allocator,

๐Ÿ”ฌThis is a nightly-only experimental API. (allocator_api)

Constructs a new Box with uninitialized contents, with the memory being filled with 0 bytes in the provided allocator, returning an error if the allocation fails,

See MaybeUninit::zeroed for examples of correct and incorrect usage of this method.

ยงExamples
#![feature(allocator_api)]

use std::alloc::System;

let zero = Box::<u32, _>::try_new_zeroed_in(System)?;
let zero = unsafe { zero.assume_init() };

assert_eq!(*zero, 0);
Source

pub fn pin_in(x: T, alloc: A) -> Pin<Box<T, A>>
where A: 'static + Allocator,

๐Ÿ”ฌThis is a nightly-only experimental API. (allocator_api)
Available on non-no_global_oom_handling only.

Constructs a new Pin<Box<T, A>>. If T does not implement Unpin, then x will be pinned in memory and unable to be moved.

Constructing and pinning of the Box can also be done in two steps: Box::pin_in(x, alloc) does the same as Box::into_pin(Box::new_in(x, alloc)). Consider using into_pin if you already have a Box<T, A>, or if you want to construct a (pinned) Box in a different way than with Box::new_in.

ยงExamples
#![feature(allocator_api)]
use std::alloc::System;

let x = Box::pin_in(1, System);
Source

pub fn into_boxed_slice(boxed: Box<T, A>) -> Box<[T], A>

๐Ÿ”ฌThis is a nightly-only experimental API. (box_into_boxed_slice)

Converts a Box<T> into a Box<[T]>

This conversion does not allocate on the heap and happens in place.

Source

pub fn into_inner(boxed: Box<T, A>) -> T

๐Ÿ”ฌThis is a nightly-only experimental API. (box_into_inner)

Consumes the Box, returning the wrapped value.

ยงExamples
#![feature(box_into_inner)]

let c = Box::new(5);

assert_eq!(Box::into_inner(c), 5);
Source

pub fn take(boxed: Box<T, A>) -> (T, Box<MaybeUninit<T>, A>)

๐Ÿ”ฌThis is a nightly-only experimental API. (box_take)

Consumes the Box without consuming its allocation, returning the wrapped value and a Box to the uninitialized memory where the wrapped value used to live.

This can be used together with write to reuse the allocation for multiple boxed values.

ยงExamples
#![feature(box_take)]

let c = Box::new(5);

// take the value out of the box
let (value, uninit) = Box::take(c);
assert_eq!(value, 5);

// reuse the box for a second value
let c = Box::write(uninit, 6);
assert_eq!(*c, 6);
Sourceยง

impl<T> Box<T>
where T: CloneToUninit + ?Sized,

Source

pub fn clone_from_ref(src: &T) -> Box<T>

๐Ÿ”ฌThis is a nightly-only experimental API. (clone_from_ref)
Available on non-no_global_oom_handling only.

Allocates memory on the heap then clones src into it.

This doesnโ€™t actually allocate if src is zero-sized.

ยงExamples
#![feature(clone_from_ref)]

let hello: Box<str> = Box::clone_from_ref("hello");
Source

pub fn try_clone_from_ref(src: &T) -> Result<Box<T>, AllocError>

๐Ÿ”ฌThis is a nightly-only experimental API. (clone_from_ref)

Allocates memory on the heap then clones src into it, returning an error if allocation fails.

This doesnโ€™t actually allocate if src is zero-sized.

ยงExamples
#![feature(clone_from_ref)]
#![feature(allocator_api)]

let hello: Box<str> = Box::try_clone_from_ref("hello")?;
Sourceยง

impl<T, A> Box<T, A>
where T: CloneToUninit + ?Sized, A: Allocator,

Source

pub fn clone_from_ref_in(src: &T, alloc: A) -> Box<T, A>

๐Ÿ”ฌThis is a nightly-only experimental API. (clone_from_ref)
Available on non-no_global_oom_handling only.

Allocates memory in the given allocator then clones src into it.

This doesnโ€™t actually allocate if src is zero-sized.

ยงExamples
#![feature(clone_from_ref)]
#![feature(allocator_api)]

use std::alloc::System;

let hello: Box<str, System> = Box::clone_from_ref_in("hello", System);
Source

pub fn try_clone_from_ref_in(src: &T, alloc: A) -> Result<Box<T, A>, AllocError>

๐Ÿ”ฌThis is a nightly-only experimental API. (clone_from_ref)

Allocates memory in the given allocator then clones src into it, returning an error if allocation fails.

This doesnโ€™t actually allocate if src is zero-sized.

ยงExamples
#![feature(clone_from_ref)]
#![feature(allocator_api)]

use std::alloc::System;

let hello: Box<str, System> = Box::try_clone_from_ref_in("hello", System)?;
Sourceยง

impl<T> Box<[T]>

1.82.0 ยท Source

pub fn new_uninit_slice(len: usize) -> Box<[MaybeUninit<T>]>

Available on non-no_global_oom_handling only.

Constructs a new boxed slice with uninitialized contents.

ยงExamples
let mut values = Box::<[u32]>::new_uninit_slice(3);
// Deferred initialization:
values[0].write(1);
values[1].write(2);
values[2].write(3);
let values = unsafe { values.assume_init() };

assert_eq!(*values, [1, 2, 3])
1.92.0 ยท Source

pub fn new_zeroed_slice(len: usize) -> Box<[MaybeUninit<T>]>

Available on non-no_global_oom_handling only.

Constructs a new boxed slice with uninitialized contents, with the memory being filled with 0 bytes.

See MaybeUninit::zeroed for examples of correct and incorrect usage of this method.

ยงExamples
let values = Box::<[u32]>::new_zeroed_slice(3);
let values = unsafe { values.assume_init() };

assert_eq!(*values, [0, 0, 0])
Source

pub fn try_new_uninit_slice( len: usize, ) -> Result<Box<[MaybeUninit<T>]>, AllocError>

๐Ÿ”ฌThis is a nightly-only experimental API. (allocator_api)

Constructs a new boxed slice with uninitialized contents. Returns an error if the allocation fails.

ยงExamples
#![feature(allocator_api)]

let mut values = Box::<[u32]>::try_new_uninit_slice(3)?;
// Deferred initialization:
values[0].write(1);
values[1].write(2);
values[2].write(3);
let values = unsafe { values.assume_init() };

assert_eq!(*values, [1, 2, 3]);
Source

pub fn try_new_zeroed_slice( len: usize, ) -> Result<Box<[MaybeUninit<T>]>, AllocError>

๐Ÿ”ฌThis is a nightly-only experimental API. (allocator_api)

Constructs a new boxed slice with uninitialized contents, with the memory being filled with 0 bytes. Returns an error if the allocation fails.

See MaybeUninit::zeroed for examples of correct and incorrect usage of this method.

ยงExamples
#![feature(allocator_api)]

let values = Box::<[u32]>::try_new_zeroed_slice(3)?;
let values = unsafe { values.assume_init() };

assert_eq!(*values, [0, 0, 0]);
Sourceยง

impl<T, A> Box<[T], A>
where A: Allocator,

Source

pub fn new_uninit_slice_in(len: usize, alloc: A) -> Box<[MaybeUninit<T>], A>

๐Ÿ”ฌThis is a nightly-only experimental API. (allocator_api)
Available on non-no_global_oom_handling only.

Constructs a new boxed slice with uninitialized contents in the provided allocator.

ยงExamples
#![feature(allocator_api)]

use std::alloc::System;

let mut values = Box::<[u32], _>::new_uninit_slice_in(3, System);
// Deferred initialization:
values[0].write(1);
values[1].write(2);
values[2].write(3);
let values = unsafe { values.assume_init() };

assert_eq!(*values, [1, 2, 3])
Source

pub fn new_zeroed_slice_in(len: usize, alloc: A) -> Box<[MaybeUninit<T>], A>

๐Ÿ”ฌThis is a nightly-only experimental API. (allocator_api)
Available on non-no_global_oom_handling only.

Constructs a new boxed slice with uninitialized contents in the provided allocator, with the memory being filled with 0 bytes.

See MaybeUninit::zeroed for examples of correct and incorrect usage of this method.

ยงExamples
#![feature(allocator_api)]

use std::alloc::System;

let values = Box::<[u32], _>::new_zeroed_slice_in(3, System);
let values = unsafe { values.assume_init() };

assert_eq!(*values, [0, 0, 0])
Source

pub fn try_new_uninit_slice_in( len: usize, alloc: A, ) -> Result<Box<[MaybeUninit<T>], A>, AllocError>

๐Ÿ”ฌThis is a nightly-only experimental API. (allocator_api)

Constructs a new boxed slice with uninitialized contents in the provided allocator. Returns an error if the allocation fails.

ยงExamples
#![feature(allocator_api)]

use std::alloc::System;

let mut values = Box::<[u32], _>::try_new_uninit_slice_in(3, System)?;
// Deferred initialization:
values[0].write(1);
values[1].write(2);
values[2].write(3);
let values = unsafe { values.assume_init() };

assert_eq!(*values, [1, 2, 3]);
Source

pub fn try_new_zeroed_slice_in( len: usize, alloc: A, ) -> Result<Box<[MaybeUninit<T>], A>, AllocError>

๐Ÿ”ฌThis is a nightly-only experimental API. (allocator_api)

Constructs a new boxed slice with uninitialized contents in the provided allocator, with the memory being filled with 0 bytes. Returns an error if the allocation fails.

See MaybeUninit::zeroed for examples of correct and incorrect usage of this method.

ยงExamples
#![feature(allocator_api)]

use std::alloc::System;

let values = Box::<[u32], _>::try_new_zeroed_slice_in(3, System)?;
let values = unsafe { values.assume_init() };

assert_eq!(*values, [0, 0, 0]);
Source

pub fn into_array<const N: usize>(self) -> Option<Box<[T; N], A>>

๐Ÿ”ฌThis is a nightly-only experimental API. (alloc_slice_into_array)

Converts the boxed slice into a boxed array.

This operation does not reallocate; the underlying array of the slice is simply reinterpreted as an array type.

If N is not exactly equal to the length of self, then this method returns None.

ยงExamples
#![feature(alloc_slice_into_array)]
let box_slice: Box<[i32]> = Box::new([1, 2, 3]);

let box_array: Box<[i32; 3]> = box_slice.into_array().unwrap();
Sourceยง

impl<T, A> Box<MaybeUninit<T>, A>
where A: Allocator,

1.82.0 ยท Source

pub unsafe fn assume_init(self) -> Box<T, A>

Converts to Box<T, A>.

ยงSafety

As with MaybeUninit::assume_init, it is up to the caller to guarantee that the value really is in an initialized state. Calling this when the content is not yet fully initialized causes immediate undefined behavior.

ยงExamples
let mut five = Box::<u32>::new_uninit();
// Deferred initialization:
five.write(5);
let five: Box<u32> = unsafe { five.assume_init() };

assert_eq!(*five, 5)
1.87.0 ยท Source

pub fn write(boxed: Box<MaybeUninit<T>, A>, value: T) -> Box<T, A>

Writes the value and converts to Box<T, A>.

This method converts the box similarly to Box::assume_init but writes value into it before conversion thus guaranteeing safety. In some scenarios use of this method may improve performance because the compiler may be able to optimize copying from stack.

ยงExamples
let big_box = Box::<[usize; 1024]>::new_uninit();

let mut array = [0; 1024];
for (i, place) in array.iter_mut().enumerate() {
    *place = i;
}

// The optimizer may be able to elide this copy, so previous code writes
// to heap directly.
let big_box = Box::write(big_box, array);

for (i, x) in big_box.iter().enumerate() {
    assert_eq!(*x, i);
}
Sourceยง

impl<T, A> Box<[MaybeUninit<T>], A>
where A: Allocator,

1.82.0 ยท Source

pub unsafe fn assume_init(self) -> Box<[T], A>

Converts to Box<[T], A>.

ยงSafety

As with MaybeUninit::assume_init, it is up to the caller to guarantee that the values really are in an initialized state. Calling this when the content is not yet fully initialized causes immediate undefined behavior.

ยงExamples
let mut values = Box::<[u32]>::new_uninit_slice(3);
// Deferred initialization:
values[0].write(1);
values[1].write(2);
values[2].write(3);
let values = unsafe { values.assume_init() };

assert_eq!(*values, [1, 2, 3])
Sourceยง

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

1.4.0 ยท Source

pub unsafe fn from_raw(raw: *mut T) -> Box<T>

Constructs a box from a raw pointer.

After calling this function, the raw pointer is owned by the resulting Box. Specifically, the Box destructor will call the destructor of T and free the allocated memory. For this to be safe, the memory must have been allocated in accordance with the memory layout used by Box .

ยงSafety

This function is unsafe because improper use may lead to memory problems. For example, a double-free may occur if the function is called twice on the same raw pointer.

The raw pointer must point to a block of memory allocated by the global allocator.

The safety conditions are described in the memory layout section. Note that the considerations for unsafe code apply to all Box<T> values.

ยงExamples

Recreate a Box which was previously converted to a raw pointer using Box::into_raw:

let x = Box::new(5);
let ptr = Box::into_raw(x);
let x = unsafe { Box::from_raw(ptr) };

Manually create a Box from scratch by using the global allocator:

use std::alloc::{alloc, Layout};

unsafe {
    let ptr = alloc(Layout::new::<i32>()) as *mut i32;
    // In general .write is required to avoid attempting to destruct
    // the (uninitialized) previous contents of `ptr`, though for this
    // simple example `*ptr = 5` would have worked as well.
    ptr.write(5);
    let x = Box::from_raw(ptr);
}
Source

pub unsafe fn from_non_null(ptr: NonNull<T>) -> Box<T>

๐Ÿ”ฌThis is a nightly-only experimental API. (box_vec_non_null)

Constructs a box from a NonNull pointer.

After calling this function, the NonNull pointer is owned by the resulting Box. Specifically, the Box destructor will call the destructor of T and free the allocated memory. For this to be safe, the memory must have been allocated in accordance with the memory layout used by Box .

ยงSafety

This function is unsafe because improper use may lead to memory problems. For example, a double-free may occur if the function is called twice on the same NonNull pointer.

The non-null pointer must point to a block of memory allocated by the global allocator.

The safety conditions are described in the memory layout section. Note that the considerations for unsafe code apply to all Box<T> values.

ยงExamples

Recreate a Box which was previously converted to a NonNull pointer using Box::into_non_null:

#![feature(box_vec_non_null)]

let x = Box::new(5);
let non_null = Box::into_non_null(x);
let x = unsafe { Box::from_non_null(non_null) };

Manually create a Box from scratch by using the global allocator:

#![feature(box_vec_non_null)]

use std::alloc::{alloc, Layout};
use std::ptr::NonNull;

unsafe {
    let non_null = NonNull::new(alloc(Layout::new::<i32>()).cast::<i32>())
        .expect("allocation failed");
    // In general .write is required to avoid attempting to destruct
    // the (uninitialized) previous contents of `non_null`.
    non_null.write(5);
    let x = Box::from_non_null(non_null);
}
1.4.0 ยท Source

pub fn into_raw(b: Box<T>) -> *mut T

Consumes the Box, returning a wrapped raw pointer.

The pointer will be properly aligned and non-null.

After calling this function, the caller is responsible for the memory previously managed by the Box. In particular, the caller should properly destroy T and release the memory, taking into account the memory layout used by Box. The easiest way to do this is to convert the raw pointer back into a Box with the Box::from_raw function, allowing the Box destructor to perform the cleanup.

Note: this is an associated function, which means that you have to call it as Box::into_raw(b) instead of b.into_raw(). This is so that there is no conflict with a method on the inner type.

ยงExamples

Converting the raw pointer back into a Box with Box::from_raw for automatic cleanup:

let x = Box::new(String::from("Hello"));
let ptr = Box::into_raw(x);
let x = unsafe { Box::from_raw(ptr) };

Manual cleanup by explicitly running the destructor and deallocating the memory:

use std::alloc::{dealloc, Layout};
use std::ptr;

let x = Box::new(String::from("Hello"));
let ptr = Box::into_raw(x);
unsafe {
    ptr::drop_in_place(ptr);
    dealloc(ptr as *mut u8, Layout::new::<String>());
}

Note: This is equivalent to the following:

let x = Box::new(String::from("Hello"));
let ptr = Box::into_raw(x);
unsafe {
    drop(Box::from_raw(ptr));
}
Source

pub fn into_non_null(b: Box<T>) -> NonNull<T>

๐Ÿ”ฌThis is a nightly-only experimental API. (box_vec_non_null)

Consumes the Box, returning a wrapped NonNull pointer.

The pointer will be properly aligned.

After calling this function, the caller is responsible for the memory previously managed by the Box. In particular, the caller should properly destroy T and release the memory, taking into account the memory layout used by Box. The easiest way to do this is to convert the NonNull pointer back into a Box with the Box::from_non_null function, allowing the Box destructor to perform the cleanup.

Note: this is an associated function, which means that you have to call it as Box::into_non_null(b) instead of b.into_non_null(). This is so that there is no conflict with a method on the inner type.

ยงExamples

Converting the NonNull pointer back into a Box with Box::from_non_null for automatic cleanup:

#![feature(box_vec_non_null)]

let x = Box::new(String::from("Hello"));
let non_null = Box::into_non_null(x);
let x = unsafe { Box::from_non_null(non_null) };

Manual cleanup by explicitly running the destructor and deallocating the memory:

#![feature(box_vec_non_null)]

use std::alloc::{dealloc, Layout};

let x = Box::new(String::from("Hello"));
let non_null = Box::into_non_null(x);
unsafe {
    non_null.drop_in_place();
    dealloc(non_null.as_ptr().cast::<u8>(), Layout::new::<String>());
}

Note: This is equivalent to the following:

#![feature(box_vec_non_null)]

let x = Box::new(String::from("Hello"));
let non_null = Box::into_non_null(x);
unsafe {
    drop(Box::from_non_null(non_null));
}
Sourceยง

impl<T, A> Box<T, A>
where A: Allocator, T: ?Sized,

Source

pub unsafe fn from_raw_in(raw: *mut T, alloc: A) -> Box<T, A>

๐Ÿ”ฌThis is a nightly-only experimental API. (allocator_api)

Constructs a box from a raw pointer in the given allocator.

After calling this function, the raw pointer is owned by the resulting Box. Specifically, the Box destructor will call the destructor of T and free the allocated memory. For this to be safe, the memory must have been allocated in accordance with the memory layout used by Box .

ยงSafety

This function is unsafe because improper use may lead to memory problems. For example, a double-free may occur if the function is called twice on the same raw pointer.

The raw pointer must point to a block of memory allocated by alloc.

The safety conditions are described in the memory layout section. Note that the considerations for unsafe code apply to all Box<T, A> values.

ยงExamples

Recreate a Box which was previously converted to a raw pointer using Box::into_raw_with_allocator:

#![feature(allocator_api)]

use std::alloc::System;

let x = Box::new_in(5, System);
let (ptr, alloc) = Box::into_raw_with_allocator(x);
let x = unsafe { Box::from_raw_in(ptr, alloc) };

Manually create a Box from scratch by using the system allocator:

#![feature(allocator_api, slice_ptr_get)]

use std::alloc::{Allocator, Layout, System};

unsafe {
    let ptr = System.allocate(Layout::new::<i32>())?.as_mut_ptr() as *mut i32;
    // In general .write is required to avoid attempting to destruct
    // the (uninitialized) previous contents of `ptr`, though for this
    // simple example `*ptr = 5` would have worked as well.
    ptr.write(5);
    let x = Box::from_raw_in(ptr, System);
}
Source

pub unsafe fn from_non_null_in(raw: NonNull<T>, alloc: A) -> Box<T, A>

๐Ÿ”ฌThis is a nightly-only experimental API. (allocator_api)

Constructs a box from a NonNull pointer in the given allocator.

After calling this function, the NonNull pointer is owned by the resulting Box. Specifically, the Box destructor will call the destructor of T and free the allocated memory. For this to be safe, the memory must have been allocated in accordance with the memory layout used by Box .

ยงSafety

This function is unsafe because improper use may lead to memory problems. For example, a double-free may occur if the function is called twice on the same raw pointer.

The non-null pointer must point to a block of memory allocated by alloc.

The safety conditions are described in the memory layout section. Note that the considerations for unsafe code apply to all Box<T, A> values.

ยงExamples

Recreate a Box which was previously converted to a NonNull pointer using Box::into_non_null_with_allocator:

#![feature(allocator_api)]

use std::alloc::System;

let x = Box::new_in(5, System);
let (non_null, alloc) = Box::into_non_null_with_allocator(x);
let x = unsafe { Box::from_non_null_in(non_null, alloc) };

Manually create a Box from scratch by using the system allocator:

#![feature(allocator_api)]

use std::alloc::{Allocator, Layout, System};

unsafe {
    let non_null = System.allocate(Layout::new::<i32>())?.cast::<i32>();
    // In general .write is required to avoid attempting to destruct
    // the (uninitialized) previous contents of `non_null`.
    non_null.write(5);
    let x = Box::from_non_null_in(non_null, System);
}
Source

pub fn into_raw_with_allocator(b: Box<T, A>) -> (*mut T, A)

๐Ÿ”ฌThis is a nightly-only experimental API. (allocator_api)

Consumes the Box, returning a wrapped raw pointer and the allocator.

The pointer will be properly aligned and non-null.

After calling this function, the caller is responsible for the memory previously managed by the Box. In particular, the caller should properly destroy T and release the memory, taking into account the memory layout used by Box. The easiest way to do this is to convert the raw pointer back into a Box with the Box::from_raw_in function, allowing the Box destructor to perform the cleanup.

Note: this is an associated function, which means that you have to call it as Box::into_raw_with_allocator(b) instead of b.into_raw_with_allocator(). This is so that there is no conflict with a method on the inner type.

ยงExamples

Converting the raw pointer back into a Box with Box::from_raw_in for automatic cleanup:

#![feature(allocator_api)]

use std::alloc::System;

let x = Box::new_in(String::from("Hello"), System);
let (ptr, alloc) = Box::into_raw_with_allocator(x);
let x = unsafe { Box::from_raw_in(ptr, alloc) };

Manual cleanup by explicitly running the destructor and deallocating the memory:

#![feature(allocator_api)]

use std::alloc::{Allocator, Layout, System};
use std::ptr::{self, NonNull};

let x = Box::new_in(String::from("Hello"), System);
let (ptr, alloc) = Box::into_raw_with_allocator(x);
unsafe {
    ptr::drop_in_place(ptr);
    let non_null = NonNull::new_unchecked(ptr);
    alloc.deallocate(non_null.cast(), Layout::new::<String>());
}
Source

pub fn into_non_null_with_allocator(b: Box<T, A>) -> (NonNull<T>, A)

๐Ÿ”ฌThis is a nightly-only experimental API. (allocator_api)

Consumes the Box, returning a wrapped NonNull pointer and the allocator.

The pointer will be properly aligned.

After calling this function, the caller is responsible for the memory previously managed by the Box. In particular, the caller should properly destroy T and release the memory, taking into account the memory layout used by Box. The easiest way to do this is to convert the NonNull pointer back into a Box with the Box::from_non_null_in function, allowing the Box destructor to perform the cleanup.

Note: this is an associated function, which means that you have to call it as Box::into_non_null_with_allocator(b) instead of b.into_non_null_with_allocator(). This is so that there is no conflict with a method on the inner type.

ยงExamples

Converting the NonNull pointer back into a Box with Box::from_non_null_in for automatic cleanup:

#![feature(allocator_api)]

use std::alloc::System;

let x = Box::new_in(String::from("Hello"), System);
let (non_null, alloc) = Box::into_non_null_with_allocator(x);
let x = unsafe { Box::from_non_null_in(non_null, alloc) };

Manual cleanup by explicitly running the destructor and deallocating the memory:

#![feature(allocator_api)]

use std::alloc::{Allocator, Layout, System};

let x = Box::new_in(String::from("Hello"), System);
let (non_null, alloc) = Box::into_non_null_with_allocator(x);
unsafe {
    non_null.drop_in_place();
    alloc.deallocate(non_null.cast::<u8>(), Layout::new::<String>());
}
Source

pub fn as_mut_ptr(b: &mut Box<T, A>) -> *mut T

๐Ÿ”ฌThis is a nightly-only experimental API. (box_as_ptr)

Returns a raw mutable pointer to the Boxโ€™s contents.

The caller must ensure that the Box outlives the pointer this function returns, or else it will end up dangling.

This method guarantees that for the purpose of the aliasing model, this method does not materialize a reference to the underlying memory, and thus the returned pointer will remain valid when mixed with other calls to as_ptr and as_mut_ptr. Note that calling other methods that materialize references to the memory may still invalidate this pointer. See the example below for how this guarantee can be used.

ยงExamples

Due to the aliasing guarantee, the following code is legal:

#![feature(box_as_ptr)]

unsafe {
    let mut b = Box::new(0);
    let ptr1 = Box::as_mut_ptr(&mut b);
    ptr1.write(1);
    let ptr2 = Box::as_mut_ptr(&mut b);
    ptr2.write(2);
    // Notably, the write to `ptr2` did *not* invalidate `ptr1`:
    ptr1.write(3);
}
Source

pub fn as_ptr(b: &Box<T, A>) -> *const T

๐Ÿ”ฌThis is a nightly-only experimental API. (box_as_ptr)

Returns a raw pointer to the Boxโ€™s contents.

The caller must ensure that the Box outlives the pointer this function returns, or else it will end up dangling.

The caller must also ensure that the memory the pointer (non-transitively) points to is never written to (except inside an UnsafeCell) using this pointer or any pointer derived from it. If you need to mutate the contents of the Box, use as_mut_ptr.

This method guarantees that for the purpose of the aliasing model, this method does not materialize a reference to the underlying memory, and thus the returned pointer will remain valid when mixed with other calls to as_ptr and as_mut_ptr. Note that calling other methods that materialize mutable references to the memory, as well as writing to this memory, may still invalidate this pointer. See the example below for how this guarantee can be used.

ยงExamples

Due to the aliasing guarantee, the following code is legal:

#![feature(box_as_ptr)]

unsafe {
    let mut v = Box::new(0);
    let ptr1 = Box::as_ptr(&v);
    let ptr2 = Box::as_mut_ptr(&mut v);
    let _val = ptr2.read();
    // No write to this memory has happened yet, so `ptr1` is still valid.
    let _val = ptr1.read();
    // However, once we do a write...
    ptr2.write(1);
    // ... `ptr1` is no longer valid.
    // This would be UB: let _val = ptr1.read();
}
Source

pub fn allocator(b: &Box<T, A>) -> &A

๐Ÿ”ฌThis is a nightly-only experimental API. (allocator_api)

Returns a reference to the underlying allocator.

Note: this is an associated function, which means that you have to call it as Box::allocator(&b) instead of b.allocator(). This is so that there is no conflict with a method on the inner type.

1.26.0 ยท Source

pub fn leak<'a>(b: Box<T, A>) -> &'a mut T
where A: 'a,

Consumes and leaks the Box, returning a mutable reference, &'a mut T.

Note that the type T must outlive the chosen lifetime 'a. If the type has only static references, or none at all, then this may be chosen to be 'static.

This function is mainly useful for data that lives for the remainder of the programโ€™s life. Dropping the returned reference will cause a memory leak. If this is not acceptable, the reference should first be wrapped with the Box::from_raw function producing a Box. This Box can then be dropped which will properly destroy T and release the allocated memory.

Note: this is an associated function, which means that you have to call it as Box::leak(b) instead of b.leak(). This is so that there is no conflict with a method on the inner type.

ยงExamples

Simple usage:

let x = Box::new(41);
let static_ref: &'static mut usize = Box::leak(x);
*static_ref += 1;
assert_eq!(*static_ref, 42);

Unsized data:

let x = vec![1, 2, 3].into_boxed_slice();
let static_ref = Box::leak(x);
static_ref[0] = 4;
assert_eq!(*static_ref, [4, 2, 3]);
1.63.0 ยท Source

pub fn into_pin(boxed: Box<T, A>) -> Pin<Box<T, A>>
where A: 'static,

Converts a Box<T> into a Pin<Box<T>>. If T does not implement Unpin, then *boxed will be pinned in memory and unable to be moved.

This conversion does not allocate on the heap and happens in place.

This is also available via From.

Constructing and pinning a Box with Box::into_pin(Box::new(x)) can also be written more concisely using Box::pin(x). This into_pin method is useful if you already have a Box<T>, or you are constructing a (pinned) Box in a different way than with Box::new.

ยงNotes

Itโ€™s not recommended that crates add an impl like From<Box<T>> for Pin<T>, as itโ€™ll introduce an ambiguity when calling Pin::from. A demonstration of such a poor impl is shown below.

โ“˜
struct Foo; // A type defined in this crate.
impl From<Box<()>> for Pin<Foo> {
    fn from(_: Box<()>) -> Pin<Foo> {
        Pin::new(Foo)
    }
}

let foo = Box::new(());
let bar = Pin::from(foo);

Trait Implementationsยง

Sourceยง

impl<T, A> Allocator for Box<T, A>
where T: Allocator + ?Sized, A: Allocator,

Sourceยง

fn allocate(&self, layout: Layout) -> Result<NonNull<[u8]>, AllocError>

๐Ÿ”ฌThis is a nightly-only experimental API. (allocator_api)
Attempts to allocate a block of memory. Read more
Sourceยง

fn allocate_zeroed(&self, layout: Layout) -> Result<NonNull<[u8]>, AllocError>

๐Ÿ”ฌThis is a nightly-only experimental API. (allocator_api)
Behaves like allocate, but also ensures that the returned memory is zero-initialized. Read more
Sourceยง

unsafe fn deallocate(&self, ptr: NonNull<u8>, layout: Layout)

๐Ÿ”ฌThis is a nightly-only experimental API. (allocator_api)
Deallocates the memory referenced by ptr. Read more
Sourceยง

unsafe fn grow( &self, ptr: NonNull<u8>, old_layout: Layout, new_layout: Layout, ) -> Result<NonNull<[u8]>, AllocError>

๐Ÿ”ฌThis is a nightly-only experimental API. (allocator_api)
Attempts to extend the memory block. Read more
Sourceยง

unsafe fn grow_zeroed( &self, ptr: NonNull<u8>, old_layout: Layout, new_layout: Layout, ) -> Result<NonNull<[u8]>, AllocError>

๐Ÿ”ฌThis is a nightly-only experimental API. (allocator_api)
Behaves like grow, but also ensures that the new contents are set to zero before being returned. Read more
Sourceยง

unsafe fn shrink( &self, ptr: NonNull<u8>, old_layout: Layout, new_layout: Layout, ) -> Result<NonNull<[u8]>, AllocError>

๐Ÿ”ฌThis is a nightly-only experimental API. (allocator_api)
Attempts to shrink the memory block. Read more
Sourceยง

fn by_ref(&self) -> &Self
where Self: Sized,

๐Ÿ”ฌThis is a nightly-only experimental API. (allocator_api)
Creates a โ€œby referenceโ€ adapter for this instance of Allocator. Read more
ยง

impl<A> ApplicationHandler for Box<A>
where A: ApplicationHandler + ?Sized,

ยง

fn new_events( &mut self, event_loop: &(dyn ActiveEventLoop + 'static), cause: StartCause, )

Emitted when new events arrive from the OS to be processed. Read more
ยง

fn resumed(&mut self, event_loop: &(dyn ActiveEventLoop + 'static))

Emitted when the application has been resumed. Read more
ยง

fn can_create_surfaces(&mut self, event_loop: &(dyn ActiveEventLoop + 'static))

Emitted from the point onwards the application should create render surfaces. Read more
ยง

fn proxy_wake_up(&mut self, event_loop: &(dyn ActiveEventLoop + 'static))

Called after a wake up is requested using EventLoopProxy::wake_up(). Read more
ยง

fn window_event( &mut self, event_loop: &(dyn ActiveEventLoop + 'static), window_id: WindowId, event: WindowEvent, )

Emitted when the OS sends an event to a winit window.
ยง

fn device_event( &mut self, event_loop: &(dyn ActiveEventLoop + 'static), device_id: Option<DeviceId>, event: DeviceEvent, )

Emitted when the OS sends an event to a device. Read more
ยง

fn about_to_wait(&mut self, event_loop: &(dyn ActiveEventLoop + 'static))

Emitted when the event loop is about to block and wait for new events. Read more
ยง

fn suspended(&mut self, event_loop: &(dyn ActiveEventLoop + 'static))

Emitted when the application has been suspended. Read more
ยง

fn destroy_surfaces(&mut self, event_loop: &(dyn ActiveEventLoop + 'static))

Emitted when the application must destroy its render surfaces. Read more
ยง

fn memory_warning(&mut self, event_loop: &(dyn ActiveEventLoop + 'static))

Emitted when the application has received a memory warning. Read more
ยง

fn macos_handler(&mut self) -> Option<&mut dyn ApplicationHandlerExtMacOS>

The macOS-specific handler. Read more
Sourceยง

impl<T, C, const N: usize> ArraysAs<[C]> for Box<[[T; N]]>
where C: ArrayCast<Array = [T; N]>,

Sourceยง

fn arrays_as(&self) -> &[C]

Cast this collection of arrays into a collection of colors.
Sourceยง

impl<T, C, const N: usize> ArraysAsMut<[C]> for Box<[[T; N]]>
where C: ArrayCast<Array = [T; N]>,

Sourceยง

fn arrays_as_mut(&mut self) -> &mut [C]

Cast this collection of arrays into a mutable collection of colors.
Sourceยง

impl<T, C, const N: usize> AsArrays<[[T; N]]> for Box<[C]>
where C: ArrayCast<Array = [T; N]>,

Sourceยง

fn as_arrays(&self) -> &[[T; N]]

Cast this collection of colors into a collection of arrays.
Sourceยง

impl<T, C, const N: usize> AsArraysMut<[[T; N]]> for Box<[C]>
where C: ArrayCast<Array = [T; N]>,

Sourceยง

fn as_arrays_mut(&mut self) -> &mut [[T; N]]

Cast this collection of colors into a mutable collection of arrays.
Sourceยง

impl<T, C, const N: usize> AsComponents<[T]> for Box<[C]>
where C: ArrayCast<Array = [T; N]>,

Sourceยง

fn as_components(&self) -> &[T]

Cast this collection of colors into a collection of color components.
Sourceยง

impl<T, C, const N: usize> AsComponentsMut<[T]> for Box<[C]>
where C: ArrayCast<Array = [T; N]>,

Sourceยง

fn as_components_mut(&mut self) -> &mut [T]

Cast this collection of colors into a mutable collection of color components.
1.64.0 ยท Sourceยง

impl<T> AsFd for Box<T>
where T: AsFd + ?Sized,

Sourceยง

fn as_fd(&self) -> BorrowedFd<'_>

Borrows the file descriptor. Read more
ยง

impl<T> AsMimeTypes for Box<T>
where T: AsMimeTypes + ?Sized,

ยง

fn available(&self) -> Cow<'static, [String]>

List available mime types for this data to convert to a byte slice.
ยง

fn as_bytes(&self, mime_type: &str) -> Option<Cow<'static, [u8]>>

Converts a type to a byte slice for the given mime type if possible.
1.5.0 ยท Sourceยง

impl<T, A> AsMut<T> for Box<T, A>
where A: Allocator, T: ?Sized,

Sourceยง

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

Converts this type into a mutable reference of the (usually inferred) input type.
1.63.0 ยท Sourceยง

impl<T> AsRawFd for Box<T>
where T: AsRawFd,

Sourceยง

fn as_raw_fd(&self) -> i32

Extracts the raw file descriptor. Read more
ยง

impl<T> AsRawXcbConnection for Box<T>
where T: AsRawXcbConnection + ?Sized,

Available on crate feature alloc only.
ยง

fn as_raw_xcb_connection(&self) -> *mut xcb_connection_t

Get a raw xcb connection pointer from this object.
1.5.0 ยท Sourceยง

impl<T, A> AsRef<T> for Box<T, A>
where A: Allocator, T: ?Sized,

Sourceยง

fn as_ref(&self) -> &T

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

impl<C> AsUints<[<C as UintCast>::Uint]> for Box<[C]>
where C: UintCast,

Sourceยง

fn as_uints(&self) -> &[<C as UintCast>::Uint]

Cast this collection of colors into a collection of unsigned integers.
Sourceยง

impl<C> AsUintsMut<[<C as UintCast>::Uint]> for Box<[C]>
where C: UintCast,

Sourceยง

fn as_uints_mut(&mut self) -> &mut [<C as UintCast>::Uint]

Cast this collection of colors into a mutable collection of unsigned integers.
ยง

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

ยง

fn poll_fill_buf( self: Pin<&mut Box<T>>, cx: &mut Context<'_>, ) -> Poll<Result<&[u8], Error>>

Attempt to return the contents of the internal buffer, filling it with more data from the inner reader if it is empty. Read more
ยง

fn consume(self: Pin<&mut Box<T>>, amt: usize)

Tells this buffer that amt bytes have been consumed from the buffer, so they should no longer be returned in calls to poll_read. Read more
ยง

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

ยง

fn poll_fill_buf( self: Pin<&mut Box<T>>, cx: &mut Context<'_>, ) -> Poll<Result<&[u8], Error>>

Attempts to return the contents of the internal buffer, filling it with more data from the inner reader if it is empty. Read more
ยง

fn consume(self: Pin<&mut Box<T>>, amt: usize)

Tells this buffer that amt bytes have been consumed from the buffer, so they should no longer be returned in calls to poll_read. Read more
1.85.0 ยท Sourceยง

impl<Args, F, A> AsyncFn<Args> for Box<F, A>
where Args: Tuple, F: AsyncFn<Args> + ?Sized, A: Allocator,

Sourceยง

extern "rust-call" fn async_call( &self, args: Args, ) -> <Box<F, A> as AsyncFnMut<Args>>::CallRefFuture<'_>

๐Ÿ”ฌThis is a nightly-only experimental API. (async_fn_traits)
Call the AsyncFn, returning a future which may borrow from the called closure.
1.85.0 ยท Sourceยง

impl<Args, F, A> AsyncFnMut<Args> for Box<F, A>
where Args: Tuple, F: AsyncFnMut<Args> + ?Sized, A: Allocator,

Sourceยง

type CallRefFuture<'a> = <F as AsyncFnMut<Args>>::CallRefFuture<'a> where Box<F, A>: 'a

๐Ÿ”ฌThis is a nightly-only experimental API. (async_fn_traits)
Sourceยง

extern "rust-call" fn async_call_mut( &mut self, args: Args, ) -> <Box<F, A> as AsyncFnMut<Args>>::CallRefFuture<'_>

๐Ÿ”ฌThis is a nightly-only experimental API. (async_fn_traits)
Call the AsyncFnMut, returning a future which may borrow from the called closure.
1.85.0 ยท Sourceยง

impl<Args, F, A> AsyncFnOnce<Args> for Box<F, A>
where Args: Tuple, F: AsyncFnOnce<Args> + ?Sized, A: Allocator,

Sourceยง

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

๐Ÿ”ฌThis is a nightly-only experimental API. (async_fn_traits)
Output type of the called closureโ€™s future.
Sourceยง

type CallOnceFuture = <F as AsyncFnOnce<Args>>::CallOnceFuture

๐Ÿ”ฌThis is a nightly-only experimental API. (async_fn_traits)
Future returned by AsyncFnOnce::async_call_once.
Sourceยง

extern "rust-call" fn async_call_once( self, args: Args, ) -> <Box<F, A> as AsyncFnOnce<Args>>::CallOnceFuture

๐Ÿ”ฌThis is a nightly-only experimental API. (async_fn_traits)
Call the AsyncFnOnce, returning a future which may move out of the called closure.
Sourceยง

impl<S> AsyncIterator for Box<S>
where S: AsyncIterator + Unpin + ?Sized,

Sourceยง

type Item = <S as AsyncIterator>::Item

๐Ÿ”ฌThis is a nightly-only experimental API. (async_iterator)
The type of items yielded by the async iterator.
Sourceยง

fn poll_next( self: Pin<&mut Box<S>>, cx: &mut Context<'_>, ) -> Poll<Option<<Box<S> as AsyncIterator>::Item>>

๐Ÿ”ฌThis is a nightly-only experimental API. (async_iterator)
Attempts to pull out the next value of this async iterator, registering the current task for wakeup if the value is not yet available, and returning None if the async iterator is exhausted. Read more
Sourceยง

fn size_hint(&self) -> (usize, Option<usize>)

๐Ÿ”ฌThis is a nightly-only experimental API. (async_iterator)
Returns the bounds on the remaining length of the async iterator. Read more
ยง

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

ยง

fn poll_read( self: Pin<&mut Box<T>>, cx: &mut Context<'_>, buf: &mut [u8], ) -> Poll<Result<usize, Error>>

Attempt to read from the AsyncRead into buf. Read more
ยง

fn poll_read_vectored( self: Pin<&mut Box<T>>, cx: &mut Context<'_>, bufs: &mut [IoSliceMut<'_>], ) -> Poll<Result<usize, Error>>

Attempt to read from the AsyncRead into bufs using vectored IO operations. Read more
ยง

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

ยง

fn poll_read( self: Pin<&mut Box<T>>, cx: &mut Context<'_>, buf: &mut ReadBuf<'_>, ) -> Poll<Result<(), Error>>

Attempts to read from the AsyncRead into buf. Read more
ยง

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

ยง

fn poll_seek( self: Pin<&mut Box<T>>, cx: &mut Context<'_>, pos: SeekFrom, ) -> Poll<Result<u64, Error>>

Attempt to seek to an offset, in bytes, in a stream. Read more
ยง

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

ยง

fn start_seek(self: Pin<&mut Box<T>>, pos: SeekFrom) -> Result<(), Error>

Attempts to seek to an offset, in bytes, in a stream. Read more
ยง

fn poll_complete( self: Pin<&mut Box<T>>, cx: &mut Context<'_>, ) -> Poll<Result<u64, Error>>

Waits for a seek operation to complete. Read more
ยง

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

ยง

fn poll_write( self: Pin<&mut Box<T>>, cx: &mut Context<'_>, buf: &[u8], ) -> Poll<Result<usize, Error>>

Attempt to write bytes from buf into the object. Read more
ยง

fn poll_write_vectored( self: Pin<&mut Box<T>>, cx: &mut Context<'_>, bufs: &[IoSlice<'_>], ) -> Poll<Result<usize, Error>>

Attempt to write bytes from bufs into the object using vectored IO operations. Read more
ยง

fn poll_flush( self: Pin<&mut Box<T>>, cx: &mut Context<'_>, ) -> Poll<Result<(), Error>>

Attempt to flush the object, ensuring that any buffered data reach their destination. Read more
ยง

fn poll_close( self: Pin<&mut Box<T>>, cx: &mut Context<'_>, ) -> Poll<Result<(), Error>>

Attempt to close the object. Read more
ยง

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

ยง

fn poll_write( self: Pin<&mut Box<T>>, cx: &mut Context<'_>, buf: &[u8], ) -> Poll<Result<usize, Error>>

Attempt to write bytes from buf into the object. Read more
ยง

fn poll_write_vectored( self: Pin<&mut Box<T>>, cx: &mut Context<'_>, bufs: &[IoSlice<'_>], ) -> Poll<Result<usize, Error>>

Like poll_write, except that it writes from a slice of buffers. Read more
ยง

fn is_write_vectored(&self) -> bool

Determines if this writer has an efficient poll_write_vectored implementation. Read more
ยง

fn poll_flush( self: Pin<&mut Box<T>>, cx: &mut Context<'_>, ) -> Poll<Result<(), Error>>

Attempts to flush the object, ensuring that any buffered data reach their destination. Read more
ยง

fn poll_shutdown( self: Pin<&mut Box<T>>, cx: &mut Context<'_>, ) -> Poll<Result<(), Error>>

Initiates or attempts to shut down this writer, returning success when the I/O connection has completely shut down. Read more
ยง

impl<T> Basic for Box<T>
where T: Basic + ?Sized,

ยง

const SIGNATURE_CHAR: char = T::SIGNATURE_CHAR

The type signature, as a character.
ยง

const SIGNATURE_STR: &'static str = T::SIGNATURE_STR

The type signature, as a string.
ยง

fn alignment(format: Format) -> usize

The required padding alignment for the given format. Read more
ยง

impl<T> Basic for Box<T>
where T: Basic + ?Sized,

ยง

const SIGNATURE_CHAR: char = T::SIGNATURE_CHAR

The type signature, as a character.
ยง

const SIGNATURE_STR: &'static str = T::SIGNATURE_STR

The type signature, as a string.
ยง

fn alignment() -> usize

The required padding alignment. Read more
1.1.0 ยท Sourceยง

impl<T, A> Borrow<T> for Box<T, A>
where A: Allocator, T: ?Sized,

Sourceยง

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
1.1.0 ยท Sourceยง

impl<T, A> BorrowMut<T> for Box<T, A>
where A: Allocator, T: ?Sized,

Sourceยง

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

Mutably borrows from an owned value. Read more
ยง

impl<T> Buf for Box<T>
where T: Buf + ?Sized,

ยง

fn remaining(&self) -> usize

Returns the number of bytes between the current position and the end of the buffer. Read more
ยง

fn chunk(&self) -> &[u8] โ“˜

Returns a slice starting at the current position and of length between 0 and Buf::remaining(). Note that this can return a shorter slice (this allows non-continuous internal representation). Read more
ยง

fn chunks_vectored<'b>(&'b self, dst: &mut [IoSlice<'b>]) -> usize

Available on crate feature std only.
Fills dst with potentially multiple slices starting at selfโ€™s current position. Read more
ยง

fn advance(&mut self, cnt: usize)

Advance the internal cursor of the Buf Read more
ยง

fn has_remaining(&self) -> bool

Returns true if there are any more bytes to consume Read more
ยง

fn copy_to_slice(&mut self, dst: &mut [u8])

Copies bytes from self into dst. Read more
ยง

fn get_u8(&mut self) -> u8

Gets an unsigned 8 bit integer from self. Read more
ยง

fn get_i8(&mut self) -> i8

Gets a signed 8 bit integer from self. Read more
ยง

fn get_u16(&mut self) -> u16

Gets an unsigned 16 bit integer from self in big-endian byte order. Read more
ยง

fn get_u16_le(&mut self) -> u16

Gets an unsigned 16 bit integer from self in little-endian byte order. Read more
ยง

fn get_u16_ne(&mut self) -> u16

Gets an unsigned 16 bit integer from self in native-endian byte order. Read more
ยง

fn get_i16(&mut self) -> i16

Gets a signed 16 bit integer from self in big-endian byte order. Read more
ยง

fn get_i16_le(&mut self) -> i16

Gets a signed 16 bit integer from self in little-endian byte order. Read more
ยง

fn get_i16_ne(&mut self) -> i16

Gets a signed 16 bit integer from self in native-endian byte order. Read more
ยง

fn get_u32(&mut self) -> u32

Gets an unsigned 32 bit integer from self in the big-endian byte order. Read more
ยง

fn get_u32_le(&mut self) -> u32

Gets an unsigned 32 bit integer from self in the little-endian byte order. Read more
ยง

fn get_u32_ne(&mut self) -> u32

Gets an unsigned 32 bit integer from self in native-endian byte order. Read more
ยง

fn get_i32(&mut self) -> i32

Gets a signed 32 bit integer from self in big-endian byte order. Read more
ยง

fn get_i32_le(&mut self) -> i32

Gets a signed 32 bit integer from self in little-endian byte order. Read more
ยง

fn get_i32_ne(&mut self) -> i32

Gets a signed 32 bit integer from self in native-endian byte order. Read more
ยง

fn get_u64(&mut self) -> u64

Gets an unsigned 64 bit integer from self in big-endian byte order. Read more
ยง

fn get_u64_le(&mut self) -> u64

Gets an unsigned 64 bit integer from self in little-endian byte order. Read more
ยง

fn get_u64_ne(&mut self) -> u64

Gets an unsigned 64 bit integer from self in native-endian byte order. Read more
ยง

fn get_i64(&mut self) -> i64

Gets a signed 64 bit integer from self in big-endian byte order. Read more
ยง

fn get_i64_le(&mut self) -> i64

Gets a signed 64 bit integer from self in little-endian byte order. Read more
ยง

fn get_i64_ne(&mut self) -> i64

Gets a signed 64 bit integer from self in native-endian byte order. Read more
ยง

fn get_u128(&mut self) -> u128

Gets an unsigned 128 bit integer from self in big-endian byte order. Read more
ยง

fn get_u128_le(&mut self) -> u128

Gets an unsigned 128 bit integer from self in little-endian byte order. Read more
ยง

fn get_u128_ne(&mut self) -> u128

Gets an unsigned 128 bit integer from self in native-endian byte order. Read more
ยง

fn get_i128(&mut self) -> i128

Gets a signed 128 bit integer from self in big-endian byte order. Read more
ยง

fn get_i128_le(&mut self) -> i128

Gets a signed 128 bit integer from self in little-endian byte order. Read more
ยง

fn get_i128_ne(&mut self) -> i128

Gets a signed 128 bit integer from self in native-endian byte order. Read more
ยง

fn get_uint(&mut self, nbytes: usize) -> u64

Gets an unsigned n-byte integer from self in big-endian byte order. Read more
ยง

fn get_uint_le(&mut self, nbytes: usize) -> u64

Gets an unsigned n-byte integer from self in little-endian byte order. Read more
ยง

fn get_uint_ne(&mut self, nbytes: usize) -> u64

Gets an unsigned n-byte integer from self in native-endian byte order. Read more
ยง

fn get_int(&mut self, nbytes: usize) -> i64

Gets a signed n-byte integer from self in big-endian byte order. Read more
ยง

fn get_int_le(&mut self, nbytes: usize) -> i64

Gets a signed n-byte integer from self in little-endian byte order. Read more
ยง

fn get_int_ne(&mut self, nbytes: usize) -> i64

Gets a signed n-byte integer from self in native-endian byte order. Read more
ยง

fn get_f32(&mut self) -> f32

Gets an IEEE754 single-precision (4 bytes) floating point number from self in big-endian byte order. Read more
ยง

fn get_f32_le(&mut self) -> f32

Gets an IEEE754 single-precision (4 bytes) floating point number from self in little-endian byte order. Read more
ยง

fn get_f32_ne(&mut self) -> f32

Gets an IEEE754 single-precision (4 bytes) floating point number from self in native-endian byte order. Read more
ยง

fn get_f64(&mut self) -> f64

Gets an IEEE754 double-precision (8 bytes) floating point number from self in big-endian byte order. Read more
ยง

fn get_f64_le(&mut self) -> f64

Gets an IEEE754 double-precision (8 bytes) floating point number from self in little-endian byte order. Read more
ยง

fn get_f64_ne(&mut self) -> f64

Gets an IEEE754 double-precision (8 bytes) floating point number from self in native-endian byte order. Read more
ยง

fn try_copy_to_slice(&mut self, dst: &mut [u8]) -> Result<(), TryGetError>

Copies bytes from self into dst. Read more
ยง

fn try_get_u8(&mut self) -> Result<u8, TryGetError>

Gets an unsigned 8 bit integer from self. Read more
ยง

fn try_get_i8(&mut self) -> Result<i8, TryGetError>

Gets a signed 8 bit integer from self. Read more
ยง

fn try_get_u16(&mut self) -> Result<u16, TryGetError>

Gets an unsigned 16 bit integer from self in big-endian byte order. Read more
ยง

fn try_get_u16_le(&mut self) -> Result<u16, TryGetError>

Gets an unsigned 16 bit integer from self in little-endian byte order. Read more
ยง

fn try_get_u16_ne(&mut self) -> Result<u16, TryGetError>

Gets an unsigned 16 bit integer from self in native-endian byte order. Read more
ยง

fn try_get_i16(&mut self) -> Result<i16, TryGetError>

Gets a signed 16 bit integer from self in big-endian byte order. Read more
ยง

fn try_get_i16_le(&mut self) -> Result<i16, TryGetError>

Gets an signed 16 bit integer from self in little-endian byte order. Read more
ยง

fn try_get_i16_ne(&mut self) -> Result<i16, TryGetError>

Gets a signed 16 bit integer from self in native-endian byte order. Read more
ยง

fn try_get_u32(&mut self) -> Result<u32, TryGetError>

Gets an unsigned 32 bit integer from self in big-endian byte order. Read more
ยง

fn try_get_u32_le(&mut self) -> Result<u32, TryGetError>

Gets an unsigned 32 bit integer from self in little-endian byte order. Read more
ยง

fn try_get_u32_ne(&mut self) -> Result<u32, TryGetError>

Gets an unsigned 32 bit integer from self in native-endian byte order. Read more
ยง

fn try_get_i32(&mut self) -> Result<i32, TryGetError>

Gets a signed 32 bit integer from self in big-endian byte order. Read more
ยง

fn try_get_i32_le(&mut self) -> Result<i32, TryGetError>

Gets a signed 32 bit integer from self in little-endian byte order. Read more
ยง

fn try_get_i32_ne(&mut self) -> Result<i32, TryGetError>

Gets a signed 32 bit integer from self in native-endian byte order. Read more
ยง

fn try_get_u64(&mut self) -> Result<u64, TryGetError>

Gets an unsigned 64 bit integer from self in big-endian byte order. Read more
ยง

fn try_get_u64_le(&mut self) -> Result<u64, TryGetError>

Gets an unsigned 64 bit integer from self in little-endian byte order. Read more
ยง

fn try_get_u64_ne(&mut self) -> Result<u64, TryGetError>

Gets an unsigned 64 bit integer from self in native-endian byte order. Read more
ยง

fn try_get_i64(&mut self) -> Result<i64, TryGetError>

Gets a signed 64 bit integer from self in big-endian byte order. Read more
ยง

fn try_get_i64_le(&mut self) -> Result<i64, TryGetError>

Gets a signed 64 bit integer from self in little-endian byte order. Read more
ยง

fn try_get_i64_ne(&mut self) -> Result<i64, TryGetError>

Gets a signed 64 bit integer from self in native-endian byte order. Read more
ยง

fn try_get_u128(&mut self) -> Result<u128, TryGetError>

Gets an unsigned 128 bit integer from self in big-endian byte order. Read more
ยง

fn try_get_u128_le(&mut self) -> Result<u128, TryGetError>

Gets an unsigned 128 bit integer from self in little-endian byte order. Read more
ยง

fn try_get_u128_ne(&mut self) -> Result<u128, TryGetError>

Gets an unsigned 128 bit integer from self in native-endian byte order. Read more
ยง

fn try_get_i128(&mut self) -> Result<i128, TryGetError>

Gets a signed 128 bit integer from self in big-endian byte order. Read more
ยง

fn try_get_i128_le(&mut self) -> Result<i128, TryGetError>

Gets a signed 128 bit integer from self in little-endian byte order. Read more
ยง

fn try_get_i128_ne(&mut self) -> Result<i128, TryGetError>

Gets a signed 128 bit integer from self in native-endian byte order. Read more
ยง

fn try_get_uint(&mut self, nbytes: usize) -> Result<u64, TryGetError>

Gets an unsigned n-byte integer from self in big-endian byte order. Read more
ยง

fn try_get_uint_le(&mut self, nbytes: usize) -> Result<u64, TryGetError>

Gets an unsigned n-byte integer from self in little-endian byte order. Read more
ยง

fn try_get_uint_ne(&mut self, nbytes: usize) -> Result<u64, TryGetError>

Gets an unsigned n-byte integer from self in native-endian byte order. Read more
ยง

fn try_get_int(&mut self, nbytes: usize) -> Result<i64, TryGetError>

Gets a signed n-byte integer from self in big-endian byte order. Read more
ยง

fn try_get_int_le(&mut self, nbytes: usize) -> Result<i64, TryGetError>

Gets a signed n-byte integer from self in little-endian byte order. Read more
ยง

fn try_get_int_ne(&mut self, nbytes: usize) -> Result<i64, TryGetError>

Gets a signed n-byte integer from self in native-endian byte order. Read more
ยง

fn try_get_f32(&mut self) -> Result<f32, TryGetError>

Gets an IEEE754 single-precision (4 bytes) floating point number from self in big-endian byte order. Read more
ยง

fn try_get_f32_le(&mut self) -> Result<f32, TryGetError>

Gets an IEEE754 single-precision (4 bytes) floating point number from self in little-endian byte order. Read more
ยง

fn try_get_f32_ne(&mut self) -> Result<f32, TryGetError>

Gets an IEEE754 single-precision (4 bytes) floating point number from self in native-endian byte order. Read more
ยง

fn try_get_f64(&mut self) -> Result<f64, TryGetError>

Gets an IEEE754 double-precision (8 bytes) floating point number from self in big-endian byte order. Read more
ยง

fn try_get_f64_le(&mut self) -> Result<f64, TryGetError>

Gets an IEEE754 double-precision (8 bytes) floating point number from self in little-endian byte order. Read more
ยง

fn try_get_f64_ne(&mut self) -> Result<f64, TryGetError>

Gets an IEEE754 double-precision (8 bytes) floating point number from self in native-endian byte order. Read more
ยง

fn copy_to_bytes(&mut self, len: usize) -> Bytes

Consumes len bytes inside self and returns new instance of Bytes with this data. Read more
ยง

fn take(self, limit: usize) -> Take<Self>
where Self: Sized,

Creates an adaptor which will read at most limit bytes from self. Read more
ยง

fn chain<U>(self, next: U) -> Chain<Self, U>
where U: Buf, Self: Sized,

Creates an adaptor which will chain this buffer with another. Read more
ยง

fn reader(self) -> Reader<Self>
where Self: Sized,

Available on crate feature std only.
Creates an adaptor which implements the Read trait for self. Read more
ยง

impl<T> BufMut for Box<T>
where T: BufMut + ?Sized,

ยง

fn remaining_mut(&self) -> usize

Returns the number of bytes that can be written from the current position until the end of the buffer is reached. Read more
ยง

fn chunk_mut(&mut self) -> &mut UninitSlice

Returns a mutable slice starting at the current BufMut position and of length between 0 and BufMut::remaining_mut(). Note that this can be shorter than the whole remainder of the buffer (this allows non-continuous implementation). Read more
ยง

unsafe fn advance_mut(&mut self, cnt: usize)

Advance the internal cursor of the BufMut Read more
ยง

fn put_slice(&mut self, src: &[u8])

Transfer bytes into self from src and advance the cursor by the number of bytes written. Read more
ยง

fn put_u8(&mut self, n: u8)

Writes an unsigned 8 bit integer to self. Read more
ยง

fn put_i8(&mut self, n: i8)

Writes a signed 8 bit integer to self. Read more
ยง

fn put_u16(&mut self, n: u16)

Writes an unsigned 16 bit integer to self in big-endian byte order. Read more
ยง

fn put_u16_le(&mut self, n: u16)

Writes an unsigned 16 bit integer to self in little-endian byte order. Read more
ยง

fn put_u16_ne(&mut self, n: u16)

Writes an unsigned 16 bit integer to self in native-endian byte order. Read more
ยง

fn put_i16(&mut self, n: i16)

Writes a signed 16 bit integer to self in big-endian byte order. Read more
ยง

fn put_i16_le(&mut self, n: i16)

Writes a signed 16 bit integer to self in little-endian byte order. Read more
ยง

fn put_i16_ne(&mut self, n: i16)

Writes a signed 16 bit integer to self in native-endian byte order. Read more
ยง

fn put_u32(&mut self, n: u32)

Writes an unsigned 32 bit integer to self in big-endian byte order. Read more
ยง

fn put_u32_le(&mut self, n: u32)

Writes an unsigned 32 bit integer to self in little-endian byte order. Read more
ยง

fn put_u32_ne(&mut self, n: u32)

Writes an unsigned 32 bit integer to self in native-endian byte order. Read more
ยง

fn put_i32(&mut self, n: i32)

Writes a signed 32 bit integer to self in big-endian byte order. Read more
ยง

fn put_i32_le(&mut self, n: i32)

Writes a signed 32 bit integer to self in little-endian byte order. Read more
ยง

fn put_i32_ne(&mut self, n: i32)

Writes a signed 32 bit integer to self in native-endian byte order. Read more
ยง

fn put_u64(&mut self, n: u64)

Writes an unsigned 64 bit integer to self in the big-endian byte order. Read more
ยง

fn put_u64_le(&mut self, n: u64)

Writes an unsigned 64 bit integer to self in little-endian byte order. Read more
ยง

fn put_u64_ne(&mut self, n: u64)

Writes an unsigned 64 bit integer to self in native-endian byte order. Read more
ยง

fn put_i64(&mut self, n: i64)

Writes a signed 64 bit integer to self in the big-endian byte order. Read more
ยง

fn put_i64_le(&mut self, n: i64)

Writes a signed 64 bit integer to self in little-endian byte order. Read more
ยง

fn put_i64_ne(&mut self, n: i64)

Writes a signed 64 bit integer to self in native-endian byte order. Read more
ยง

fn has_remaining_mut(&self) -> bool

Returns true if there is space in self for more bytes. Read more
ยง

fn put<T>(&mut self, src: T)
where T: Buf, Self: Sized,

Transfer bytes into self from src and advance the cursor by the number of bytes written. Read more
ยง

fn put_bytes(&mut self, val: u8, cnt: usize)

Put cnt bytes val into self. Read more
ยง

fn put_u128(&mut self, n: u128)

Writes an unsigned 128 bit integer to self in the big-endian byte order. Read more
ยง

fn put_u128_le(&mut self, n: u128)

Writes an unsigned 128 bit integer to self in little-endian byte order. Read more
ยง

fn put_u128_ne(&mut self, n: u128)

Writes an unsigned 128 bit integer to self in native-endian byte order. Read more
ยง

fn put_i128(&mut self, n: i128)

Writes a signed 128 bit integer to self in the big-endian byte order. Read more
ยง

fn put_i128_le(&mut self, n: i128)

Writes a signed 128 bit integer to self in little-endian byte order. Read more
ยง

fn put_i128_ne(&mut self, n: i128)

Writes a signed 128 bit integer to self in native-endian byte order. Read more
ยง

fn put_uint(&mut self, n: u64, nbytes: usize)

Writes an unsigned n-byte integer to self in big-endian byte order. Read more
ยง

fn put_uint_le(&mut self, n: u64, nbytes: usize)

Writes an unsigned n-byte integer to self in the little-endian byte order. Read more
ยง

fn put_uint_ne(&mut self, n: u64, nbytes: usize)

Writes an unsigned n-byte integer to self in the native-endian byte order. Read more
ยง

fn put_int(&mut self, n: i64, nbytes: usize)

Writes low nbytes of a signed integer to self in big-endian byte order. Read more
ยง

fn put_int_le(&mut self, n: i64, nbytes: usize)

Writes low nbytes of a signed integer to self in little-endian byte order. Read more
ยง

fn put_int_ne(&mut self, n: i64, nbytes: usize)

Writes low nbytes of a signed integer to self in native-endian byte order. Read more
ยง

fn put_f32(&mut self, n: f32)

Writes an IEEE754 single-precision (4 bytes) floating point number to self in big-endian byte order. Read more
ยง

fn put_f32_le(&mut self, n: f32)

Writes an IEEE754 single-precision (4 bytes) floating point number to self in little-endian byte order. Read more
ยง

fn put_f32_ne(&mut self, n: f32)

Writes an IEEE754 single-precision (4 bytes) floating point number to self in native-endian byte order. Read more
ยง

fn put_f64(&mut self, n: f64)

Writes an IEEE754 double-precision (8 bytes) floating point number to self in big-endian byte order. Read more
ยง

fn put_f64_le(&mut self, n: f64)

Writes an IEEE754 double-precision (8 bytes) floating point number to self in little-endian byte order. Read more
ยง

fn put_f64_ne(&mut self, n: f64)

Writes an IEEE754 double-precision (8 bytes) floating point number to self in native-endian byte order. Read more
ยง

fn limit(self, limit: usize) -> Limit<Self>
where Self: Sized,

Creates an adaptor which can write at most limit bytes to self. Read more
ยง

fn writer(self) -> Writer<Self>
where Self: Sized,

Available on crate feature std only.
Creates an adaptor which implements the Write trait for self. Read more
ยง

fn chain_mut<U>(self, next: U) -> Chain<Self, U>
where U: BufMut, Self: Sized,

Creates an adapter which will chain this buffer with another. Read more
1.0.0 ยท Sourceยง

impl<B> BufRead for Box<B>
where B: BufRead + ?Sized,

Sourceยง

fn fill_buf(&mut self) -> Result<&[u8], Error>

Returns the contents of the internal buffer, filling it with more data, via Read methods, if empty. Read more
Sourceยง

fn consume(&mut self, amt: usize)

Marks the given amount of additional bytes from the internal buffer as having been read. Subsequent calls to read only return bytes that have not been marked as read. Read more
Sourceยง

fn has_data_left(&mut self) -> Result<bool, Error>

๐Ÿ”ฌThis is a nightly-only experimental API. (buf_read_has_data_left)
Checks if there is any data left to be read. Read more
Sourceยง

fn read_until(&mut self, byte: u8, buf: &mut Vec<u8>) -> Result<usize, Error>

Reads all bytes into buf until the delimiter byte or EOF is reached. Read more
Sourceยง

fn skip_until(&mut self, byte: u8) -> Result<usize, Error>

Skips all bytes until the delimiter byte or EOF is reached. Read more
Sourceยง

fn read_line(&mut self, buf: &mut String) -> Result<usize, Error>

Reads all bytes until a newline (the 0xA byte) is reached, and append them to the provided String buffer. Read more
1.0.0 ยท Sourceยง

fn split(self, byte: u8) -> Split<Self>
where Self: Sized,

Returns an iterator over the contents of this reader split on the byte byte. Read more
1.0.0 ยท Sourceยง

fn lines(self) -> Lines<Self>
where Self: Sized,

Returns an iterator over the lines of this reader. Read more
1.3.0 ยท Sourceยง

impl<T, A> Clone for Box<[T], A>
where T: Clone, A: Allocator + Clone,

Available on non-no_global_oom_handling only.
Sourceยง

fn clone_from(&mut self, source: &Box<[T], A>)

Copies sourceโ€™s contents into self without creating a new allocation, so long as the two are of the same length.

ยงExamples
let x = Box::new([5, 6, 7]);
let mut y = Box::new([8, 9, 10]);
let yp: *const [i32] = &*y;

y.clone_from(&x);

// The value is the same
assert_eq!(x, y);

// And no allocation occurred
assert_eq!(yp, &*y);
Sourceยง

fn clone(&self) -> Box<[T], A>

Returns a duplicate of the value. Read more
ยง

impl Clone for Box<BStr>

Available on crate feature alloc only.
ยง

fn clone(&self) -> Box<BStr>

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 Clone for Box<ByteStr>

Sourceยง

fn clone(&self) -> Box<ByteStr>

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
1.29.0 ยท Sourceยง

impl Clone for Box<CStr>

Sourceยง

fn clone(&self) -> Box<CStr>

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
1.29.0 ยท Sourceยง

impl Clone for Box<OsStr>

Sourceยง

fn clone(&self) -> Box<OsStr>

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
1.29.0 ยท Sourceยง

impl Clone for Box<Path>

Sourceยง

fn clone(&self) -> Box<Path>

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 Clone for Box<RawValue>

Sourceยง

fn clone(&self) -> Box<RawValue>

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
ยง

impl<K, V> Clone for Box<Slice<K, V>>
where K: Clone, V: Clone,

ยง

fn clone(&self) -> Box<Slice<K, V>>

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
ยง

impl<T> Clone for Box<Slice<T>>
where T: Clone,

ยง

fn clone(&self) -> Box<Slice<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
1.0.0 ยท Sourceยง

impl<T, A> Clone for Box<T, A>
where T: Clone, A: Allocator + Clone,

Available on non-no_global_oom_handling only.
Sourceยง

fn clone(&self) -> Box<T, A>

Returns a new box with a clone() of this boxโ€™s contents.

ยงExamples
let x = Box::new(5);
let y = x.clone();

// The value is the same
assert_eq!(x, y);

// But they are unique objects
assert_ne!(&*x as *const i32, &*y as *const i32);
Sourceยง

fn clone_from(&mut self, source: &Box<T, A>)

Copies sourceโ€™s contents into self without creating a new allocation.

ยงExamples
let x = Box::new(5);
let mut y = Box::new(10);
let yp: *const i32 = &*y;

y.clone_from(&x);

// The value is the same
assert_eq!(x, y);

// And no allocation occurred
assert_eq!(yp, &*y);
ยง

impl Clone for Box<dyn DynDigest>

Available on crate feature alloc only.
ยง

fn clone(&self) -> Box<dyn DynDigest>

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
1.3.0 ยท Sourceยง

impl Clone for Box<str>

Available on non-no_global_oom_handling only.
Sourceยง

fn clone(&self) -> Box<str>

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
ยง

impl<C> Connection for Box<C>
where C: Connection + ?Sized,

ยง

fn wait_for_event(&self) -> Result<Event, ConnectionError>

Wait for a new event from the X11 server.
ยง

fn wait_for_raw_event( &self, ) -> Result<<Box<C> as RequestConnection>::Buf, ConnectionError>

Wait for a new raw/unparsed event from the X11 server.
ยง

fn wait_for_event_with_sequence(&self) -> Result<(Event, u64), ConnectionError>

Wait for a new event from the X11 server.
ยง

fn wait_for_raw_event_with_sequence( &self, ) -> Result<(<Box<C> as RequestConnection>::Buf, u64), ConnectionError>

Wait for a new raw/unparsed event from the X11 server.
ยง

fn poll_for_event(&self) -> Result<Option<Event>, ConnectionError>

Poll for a new event from the X11 server.
ยง

fn poll_for_raw_event( &self, ) -> Result<Option<<Box<C> as RequestConnection>::Buf>, ConnectionError>

Poll for a new raw/unparsed event from the X11 server.
ยง

fn poll_for_event_with_sequence( &self, ) -> Result<Option<(Event, u64)>, ConnectionError>

Poll for a new event from the X11 server.
ยง

fn poll_for_raw_event_with_sequence( &self, ) -> Result<Option<(<Box<C> as RequestConnection>::Buf, u64)>, ConnectionError>

Poll for a new unparsed/raw event from the X11 server.
ยง

fn flush(&self) -> Result<(), ConnectionError>

Send all pending requests to the server. Read more
ยง

fn setup(&self) -> &Setup

Get the setup information sent by the X11 server. Read more
ยง

fn generate_id(&self) -> Result<u32, ReplyOrIdError>

Generate a new X11 identifier. Read more
Sourceยง

impl<T, I, O> Convert<I, O> for Box<T>
where T: Convert<I, O>,

Available on crate feature alloc only.
Sourceยง

fn convert(&self, input: I) -> O

Convert an input value of type I to a value of type O. Read more
Sourceยง

impl<T, I, O> ConvertOnce<I, O> for Box<T>
where T: ConvertOnce<I, O>,

Available on crate feature alloc only.
Sourceยง

fn convert_once(self, input: I) -> O

Convert an input value of type I to a value of type O, while consuming itself. Read more
Sourceยง

impl<G, R, A> Coroutine<R> for Box<G, A>
where G: Coroutine<R> + Unpin + ?Sized, A: Allocator,

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 Box<G, A>>, arg: R, ) -> CoroutineState<<Box<G, A> as Coroutine<R>>::Yield, <Box<G, A> as Coroutine<R>>::Return>

๐Ÿ”ฌThis is a nightly-only experimental API. (coroutine_trait)
Resumes the execution of this coroutine. Read more
Sourceยง

impl<G, R, A> Coroutine<R> for Pin<Box<G, A>>
where G: Coroutine<R> + ?Sized, A: Allocator + 'static,

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 Pin<Box<G, A>>>, arg: R, ) -> CoroutineState<<Pin<Box<G, A>> as Coroutine<R>>::Yield, <Pin<Box<G, A>> as Coroutine<R>>::Return>

๐Ÿ”ฌThis is a nightly-only experimental API. (coroutine_trait)
Resumes the execution of this coroutine. Read more
ยง

impl<E> DBusError for Box<E>
where E: DBusError + ?Sized,

ยง

fn create_reply(&self, msg: &Header<'_>) -> Result<Message, Error>

Generate an error reply message for the given method call.
ยง

fn name(&self) -> ErrorName<'_>

The name of the error. Read more
ยง

fn description(&self) -> Option<&str>

The optional description for the error.
1.0.0 ยท Sourceยง

impl<T, A> Debug for Box<T, A>
where T: Debug + ?Sized, A: Allocator,

Sourceยง

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

Formats the value using the given formatter. Read more
1.0.0 ยท Sourceยง

impl<T> Default for Box<[T]>

Available on non-no_global_oom_handling only.
Sourceยง

fn default() -> Box<[T]>

Creates an empty [T] inside a Box.

ยง

impl Default for Box<BStr>

Available on crate feature alloc only.
ยง

fn default() -> Box<BStr>

Returns the โ€œdefault valueโ€ for a type. Read more
1.17.0 ยท Sourceยง

impl Default for Box<CStr>

Sourceยง

fn default() -> Box<CStr>

Returns the โ€œdefault valueโ€ for a type. Read more
1.17.0 ยท Sourceยง

impl Default for Box<OsStr>

Sourceยง

fn default() -> Box<OsStr>

Returns the โ€œdefault valueโ€ for a type. Read more
ยง

impl<K, V> Default for Box<Slice<K, V>>

ยง

fn default() -> Box<Slice<K, V>>

Returns the โ€œdefault valueโ€ for a type. Read more
ยง

impl<T> Default for Box<Slice<T>>

ยง

fn default() -> Box<Slice<T>>

Returns the โ€œdefault valueโ€ for a type. Read more
1.0.0 ยท Sourceยง

impl<T> Default for Box<T>
where T: Default,

Available on non-no_global_oom_handling only.
Sourceยง

fn default() -> Box<T>

Creates a Box<T>, with the Default value for T.

1.17.0 ยท Sourceยง

impl Default for Box<str>

Available on non-no_global_oom_handling only.
Sourceยง

fn default() -> Box<str>

Returns the โ€œdefault valueโ€ for a type. Read more
1.91.0 ยท Sourceยง

impl<T> Default for Pin<Box<T>>
where Box<T>: Default, T: ?Sized,

Available on non-no_global_oom_handling only.
Sourceยง

fn default() -> Pin<Box<T>>

Returns the โ€œdefault valueโ€ for a type. Read more
1.0.0 ยท Sourceยง

impl<T, A> Deref for Box<T, A>
where A: Allocator, T: ?Sized,

Sourceยง

type Target = T

The resulting type after dereferencing.
Sourceยง

fn deref(&self) -> &T

Dereferences the value.
1.0.0 ยท Sourceยง

impl<T, A> DerefMut for Box<T, A>
where A: Allocator, T: ?Sized,

Sourceยง

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

Mutably dereferences the value.
Sourceยง

impl<'de, T> Deserialize<'de> for Box<[T]>
where T: Deserialize<'de>,

Available on crate features std or alloc only.
Sourceยง

fn deserialize<D>( deserializer: D, ) -> Result<Box<[T]>, <D as Deserializer<'de>>::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Sourceยง

impl<'de> Deserialize<'de> for Box<CStr>

Available on crate feature std, or non-no_core_cstr and crate feature alloc only.
Sourceยง

fn deserialize<D>( deserializer: D, ) -> Result<Box<CStr>, <D as Deserializer<'de>>::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Sourceยง

impl<'de> Deserialize<'de> for Box<OsStr>

Available on crate feature std and (Unix or Windows) only.
Sourceยง

fn deserialize<D>( deserializer: D, ) -> Result<Box<OsStr>, <D as Deserializer<'de>>::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Sourceยง

impl<'de> Deserialize<'de> for Box<Path>

Available on crate feature std only.
Sourceยง

fn deserialize<D>( deserializer: D, ) -> Result<Box<Path>, <D as Deserializer<'de>>::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Sourceยง

impl<'de> Deserialize<'de> for Box<RawValue>

Sourceยง

fn deserialize<D>( deserializer: D, ) -> Result<Box<RawValue>, <D as Deserializer<'de>>::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Sourceยง

impl<'de, T> Deserialize<'de> for Box<T>
where T: Deserialize<'de>,

Available on crate features std or alloc only.
Sourceยง

fn deserialize<D>( deserializer: D, ) -> Result<Box<T>, <D as Deserializer<'de>>::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Sourceยง

impl<'de> Deserialize<'de> for Box<str>

Available on crate features std or alloc only.
Sourceยง

fn deserialize<D>( deserializer: D, ) -> Result<Box<str>, <D as Deserializer<'de>>::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Sourceยง

impl<'de, K, KAs, V, VAs> DeserializeAs<'de, Box<[(K, V)]>> for BTreeMap<KAs, VAs>
where KAs: DeserializeAs<'de, K>, VAs: DeserializeAs<'de, V>,

Sourceยง

fn deserialize_as<D>( deserializer: D, ) -> Result<Box<[(K, V)]>, <D as Deserializer<'de>>::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer.
Sourceยง

impl<'de, K, KAs, V, VAs> DeserializeAs<'de, Box<[(K, V)]>> for HashMap<KAs, VAs>
where KAs: DeserializeAs<'de, K>, VAs: DeserializeAs<'de, V>,

Sourceยง

fn deserialize_as<D>( deserializer: D, ) -> Result<Box<[(K, V)]>, <D as Deserializer<'de>>::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer.
Sourceยง

impl<'de, T, U> DeserializeAs<'de, Box<[T]>> for Box<[U]>
where U: DeserializeAs<'de, T>,

Sourceยง

fn deserialize_as<D>( deserializer: D, ) -> Result<Box<[T]>, <D as Deserializer<'de>>::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer.
Sourceยง

impl<'de, T, U> DeserializeAs<'de, Box<T>> for Box<U>
where U: DeserializeAs<'de, T>,

Available on crate feature alloc only.
Sourceยง

fn deserialize_as<D>( deserializer: D, ) -> Result<Box<T>, <D as Deserializer<'de>>::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer.
Sourceยง

impl<'de, T, U> DeserializeAs<'de, Pin<Box<T>>> for Pin<Box<U>>
where U: DeserializeAs<'de, T>,

Sourceยง

fn deserialize_as<D>( deserializer: D, ) -> Result<Pin<Box<T>>, <D as Deserializer<'de>>::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer.
1.0.0 ยท Sourceยง

impl<T, A> Display for Box<T, A>
where T: Display + ?Sized, A: Allocator,

Sourceยง

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

Formats the value using the given formatter. Read more
1.0.0 ยท Sourceยง

impl<I, A> DoubleEndedIterator for Box<I, A>

Sourceยง

fn next_back(&mut self) -> Option<<I as Iterator>::Item>

Removes and returns an element from the end of the iterator. Read more
Sourceยง

fn nth_back(&mut self, n: usize) -> Option<<I as Iterator>::Item>

Returns the nth element from the end of the iterator. Read more
Sourceยง

fn advance_back_by(&mut self, n: usize) -> Result<(), NonZero<usize>>

๐Ÿ”ฌThis is a nightly-only experimental API. (iter_advance_by)
Advances the iterator from the back by n elements. Read more
1.27.0 ยท Sourceยง

fn try_rfold<B, F, R>(&mut self, init: B, f: F) -> R
where Self: Sized, F: FnMut(B, Self::Item) -> R, R: Try<Output = B>,

This is the reverse version of Iterator::try_fold(): it takes elements starting from the back of the iterator. Read more
1.27.0 ยท Sourceยง

fn rfold<B, F>(self, init: B, f: F) -> B
where Self: Sized, F: FnMut(B, Self::Item) -> B,

An iterator method that reduces the iteratorโ€™s elements to a single, final value, starting from the back. Read more
1.27.0 ยท Sourceยง

fn rfind<P>(&mut self, predicate: P) -> Option<Self::Item>
where Self: Sized, P: FnMut(&Self::Item) -> bool,

Searches for an element of an iterator from the back that satisfies a predicate. Read more
1.0.0 ยท Sourceยง

impl<T, A> Drop for Box<T, A>
where A: Allocator, T: ?Sized,

Sourceยง

fn drop(&mut self)

Executes the destructor for this type. Read more
ยง

impl<T> EncodeAsVarULE<T> for &Box<T>
where T: VarULE + ?Sized,

Available on crate feature alloc only.
ยง

fn encode_var_ule_as_slices<R>(&self, cb: impl FnOnce(&[&[u8]]) -> R) -> R

Calls cb with a piecewise list of byte slices that when concatenated produce the memory pattern of the corresponding instance of T. Read more
ยง

fn encode_var_ule_len(&self) -> usize

Return the length, in bytes, of the corresponding [VarULE] type
ยง

fn encode_var_ule_write(&self, dst: &mut [u8])

Write the corresponding [VarULE] type to the dst buffer. dst should be the size of [Self::encode_var_ule_len()]
ยง

impl<T> EncodeAsVarULE<T> for Box<T>
where T: VarULE + ?Sized,

Available on crate feature alloc only.
ยง

fn encode_var_ule_as_slices<R>(&self, cb: impl FnOnce(&[&[u8]]) -> R) -> R

Calls cb with a piecewise list of byte slices that when concatenated produce the memory pattern of the corresponding instance of T. Read more
ยง

fn encode_var_ule_len(&self) -> usize

Return the length, in bytes, of the corresponding [VarULE] type
ยง

fn encode_var_ule_write(&self, dst: &mut [u8])

Write the corresponding [VarULE] type to the dst buffer. dst should be the size of [Self::encode_var_ule_len()]
1.8.0 ยท Sourceยง

impl<E> Error for Box<E>
where E: Error,

Sourceยง

fn cause(&self) -> Option<&dyn Error>

๐Ÿ‘ŽDeprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Sourceยง

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
Sourceยง

fn provide<'b>(&'b self, request: &mut Request<'b>)

๐Ÿ”ฌThis is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
1.0.0 ยท Sourceยง

fn description(&self) -> &str

๐Ÿ‘ŽDeprecated since 1.42.0:

use the Display impl or to_string()

ยง

impl<T> EventSource for Box<T>
where T: EventSource,

Blanket implementation for boxed event sources. EventSource is not an object safe trait, so this does not include trait objects.

ยง

const NEEDS_EXTRA_LIFECYCLE_EVENTS: bool = T::NEEDS_EXTRA_LIFECYCLE_EVENTS

Whether this source needs to be sent the EventSource::before_sleep and EventSource::before_handle_events notifications. These are opt-in because they require more expensive checks, and almost all sources will not need these notifications
ยง

type Event = <T as EventSource>::Event

The type of events generated by your source.
ยง

type Metadata = <T as EventSource>::Metadata

Some metadata of your event source Read more
ยง

type Ret = <T as EventSource>::Ret

The return type of the user callback Read more
ยง

type Error = <T as EventSource>::Error

The error type returned from process_events() (not the user callback!).
ยง

fn process_events<F>( &mut self, readiness: Readiness, token: Token, callback: F, ) -> Result<PostAction, <Box<T> as EventSource>::Error>
where F: FnMut(<Box<T> as EventSource>::Event, &mut <Box<T> as EventSource>::Metadata) -> <Box<T> as EventSource>::Ret,

Process any relevant events Read more
ยง

fn register( &mut self, poll: &mut Poll, token_factory: &mut TokenFactory, ) -> Result<(), Error>

Register yourself to this poll instance Read more
ยง

fn reregister( &mut self, poll: &mut Poll, token_factory: &mut TokenFactory, ) -> Result<(), Error>

Re-register your file descriptors Read more
ยง

fn unregister(&mut self, poll: &mut Poll) -> Result<(), Error>

Unregister your file descriptors Read more
ยง

fn before_sleep(&mut self) -> Result<Option<(Readiness, Token)>, Error>

Notification that a single poll is about to begin Read more
ยง

fn before_handle_events(&mut self, events: EventIterator<'_>)

Notification that polling is complete, and EventSource::process_events will be called with the given events for this source. The iterator may be empty, which indicates that no events were generated for this source Read more
1.0.0 ยท Sourceยง

impl<I, A> ExactSizeIterator for Box<I, A>

Sourceยง

fn len(&self) -> usize

Returns the exact remaining length of the iterator. Read more
Sourceยง

fn is_empty(&self) -> bool

๐Ÿ”ฌThis is a nightly-only experimental API. (exact_size_is_empty)
Returns true if the iterator is empty. Read more
1.45.0 ยท Sourceยง

impl<A> Extend<Box<str, A>> for String
where A: Allocator,

Available on non-no_global_oom_handling only.
Sourceยง

fn extend<I>(&mut self, iter: I)
where I: IntoIterator<Item = Box<str, A>>,

Extends a collection with the contents of an iterator. Read more
Sourceยง

fn extend_one(&mut self, item: A)

๐Ÿ”ฌThis is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
Sourceยง

fn extend_reserve(&mut self, additional: usize)

๐Ÿ”ฌThis is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
1.35.0 ยท Sourceยง

impl<Args, F, A> Fn<Args> for Box<F, A>
where Args: Tuple, F: Fn<Args> + ?Sized, A: Allocator,

Sourceยง

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

๐Ÿ”ฌThis is a nightly-only experimental API. (fn_traits)
Performs the call operation.
1.35.0 ยท Sourceยง

impl<Args, F, A> FnMut<Args> for Box<F, A>
where Args: Tuple, F: FnMut<Args> + ?Sized, A: Allocator,

Sourceยง

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

๐Ÿ”ฌThis is a nightly-only experimental API. (fn_traits)
Performs the call operation.
1.35.0 ยท Sourceยง

impl<Args, F, A> FnOnce<Args> for Box<F, A>
where Args: Tuple, F: FnOnce<Args> + ?Sized, A: Allocator,

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, ) -> <Box<F, A> as FnOnce<Args>>::Output

๐Ÿ”ฌThis is a nightly-only experimental API. (fn_traits)
Performs the call operation.
1.17.0 ยท Sourceยง

impl<T> From<&[T]> for Box<[T]>
where T: Clone,

Available on non-no_global_oom_handling only.
Sourceยง

fn from(slice: &[T]) -> Box<[T]>

Converts a &[T] into a Box<[T]>

This conversion allocates on the heap and performs a copy of slice and its contents.

ยงExamples
// create a &[u8] which will be used to create a Box<[u8]>
let slice: &[u8] = &[104, 101, 108, 108, 111];
let boxed_slice: Box<[u8]> = Box::from(slice);

println!("{boxed_slice:?}");
1.17.0 ยท Sourceยง

impl From<&CStr> for Box<CStr>

Sourceยง

fn from(s: &CStr) -> Box<CStr>

Converts a &CStr into a Box<CStr>, by copying the contents into a newly allocated Box.

1.17.0 ยท Sourceยง

impl From<&OsStr> for Box<OsStr>

Sourceยง

fn from(s: &OsStr) -> Box<OsStr>

Copies the string into a newly allocated Box<OsStr>.

1.17.0 ยท Sourceยง

impl From<&Path> for Box<Path>

Sourceยง

fn from(path: &Path) -> Box<Path>

Creates a boxed Path from a reference.

This will allocate and clone path to it.

ยง

impl<K, V> From<&Slice<K, V>> for Box<Slice<K, V>>
where K: Copy, V: Copy,

ยง

fn from(slice: &Slice<K, V>) -> Box<Slice<K, V>>

Converts to this type from the input type.
ยง

impl<T> From<&Slice<T>> for Box<Slice<T>>
where T: Copy,

ยง

fn from(slice: &Slice<T>) -> Box<Slice<T>>

Converts to this type from the input type.
1.84.0 ยท Sourceยง

impl<T> From<&mut [T]> for Box<[T]>
where T: Clone,

Available on non-no_global_oom_handling only.
Sourceยง

fn from(slice: &mut [T]) -> Box<[T]>

Converts a &mut [T] into a Box<[T]>

This conversion allocates on the heap and performs a copy of slice and its contents.

ยงExamples
// create a &mut [u8] which will be used to create a Box<[u8]>
let mut array = [104, 101, 108, 108, 111];
let slice: &mut [u8] = &mut array;
let boxed_slice: Box<[u8]> = Box::from(slice);

println!("{boxed_slice:?}");
1.84.0 ยท Sourceยง

impl From<&mut CStr> for Box<CStr>

Sourceยง

fn from(s: &mut CStr) -> Box<CStr>

Converts a &mut CStr into a Box<CStr>, by copying the contents into a newly allocated Box.

1.84.0 ยท Sourceยง

impl From<&mut OsStr> for Box<OsStr>

Sourceยง

fn from(s: &mut OsStr) -> Box<OsStr>

Copies the string into a newly allocated Box<OsStr>.

1.84.0 ยท Sourceยง

impl From<&mut Path> for Box<Path>

Sourceยง

fn from(path: &mut Path) -> Box<Path>

Creates a boxed Path from a reference.

This will allocate and clone path to it.

1.84.0 ยท Sourceยง

impl From<&mut str> for Box<str>

Available on non-no_global_oom_handling only.
Sourceยง

fn from(s: &mut str) -> Box<str>

Converts a &mut str into a Box<str>

This conversion allocates on the heap and performs a copy of s.

ยงExamples
let mut original = String::from("hello");
let original: &mut str = &mut original;
let boxed: Box<str> = Box::from(original);
println!("{boxed}");
1.6.0 ยท Sourceยง

impl<'a> From<&str> for Box<dyn Error + 'a>

Available on non-no_global_oom_handling only.
Sourceยง

fn from(err: &str) -> Box<dyn Error + 'a>

Converts a str into a box of dyn Error.

ยงExamples
use std::error::Error;

let a_str_error = "a str error";
let a_boxed_error = Box::<dyn Error>::from(a_str_error);
assert!(size_of::<Box<dyn Error>>() == size_of_val(&a_boxed_error))
1.0.0 ยท Sourceยง

impl<'a> From<&str> for Box<dyn Error + Sync + Send + 'a>

Available on non-no_global_oom_handling only.
Sourceยง

fn from(err: &str) -> Box<dyn Error + Sync + Send + 'a>

Converts a str into a box of dyn Error + Send + Sync.

ยงExamples
use std::error::Error;

let a_str_error = "a str error";
let a_boxed_error = Box::<dyn Error + Send + Sync>::from(a_str_error);
assert!(
    size_of::<Box<dyn Error + Send + Sync>>() == size_of_val(&a_boxed_error))
1.17.0 ยท Sourceยง

impl From<&str> for Box<str>

Available on non-no_global_oom_handling only.
Sourceยง

fn from(s: &str) -> Box<str>

Converts a &str into a Box<str>

This conversion allocates on the heap and performs a copy of s.

ยงExamples
let boxed: Box<str> = Box::from("hello");
println!("{boxed}");
1.45.0 ยท Sourceยง

impl<T, const N: usize> From<[T; N]> for Box<[T]>

Available on non-no_global_oom_handling only.
Sourceยง

fn from(array: [T; N]) -> Box<[T]>

Converts a [T; N] into a Box<[T]>

This conversion moves the array to newly heap-allocated memory.

ยงExamples
let boxed: Box<[u8]> = Box::from([4, 2]);
println!("{boxed:?}");
Sourceยง

impl<C, const N: usize> From<Box<[<C as Premultiply>::Scalar; N]>> for Box<PreAlpha<C>>
where C: Premultiply, PreAlpha<C>: ArrayCast<Array = [<C as Premultiply>::Scalar; N]>,

Available on crate feature alloc only.
Sourceยง

fn from(array: Box<[<C as Premultiply>::Scalar; N]>) -> Box<PreAlpha<C>>

Converts to this type from the input type.
1.18.0 ยท Sourceยง

impl<T, A> From<Box<[T], A>> for Vec<T, A>
where A: Allocator,

Sourceยง

fn from(s: Box<[T], A>) -> Vec<T, A>

Converts a boxed slice into a vector by transferring ownership of the existing heap allocation.

ยงExamples
let b: Box<[i32]> = vec![1, 2, 3].into_boxed_slice();
assert_eq!(Vec::from(b), vec![1, 2, 3]);
Sourceยง

impl<S, T> From<Box<[T; 1]>> for Box<Luma<S, T>>

Available on crate feature alloc only.
Sourceยง

fn from(array: Box<[T; 1]>) -> Box<Luma<S, T>>

Converts to this type from the input type.
Sourceยง

impl<T> From<Box<[T; 3]>> for Box<Cam16Jch<T>>

Available on crate feature alloc only.
Sourceยง

fn from(array: Box<[T; 3]>) -> Box<Cam16Jch<T>>

Converts to this type from the input type.
Sourceยง

impl<T> From<Box<[T; 3]>> for Box<Cam16Jmh<T>>

Available on crate feature alloc only.
Sourceยง

fn from(array: Box<[T; 3]>) -> Box<Cam16Jmh<T>>

Converts to this type from the input type.
Sourceยง

impl<T> From<Box<[T; 3]>> for Box<Cam16Jsh<T>>

Available on crate feature alloc only.
Sourceยง

fn from(array: Box<[T; 3]>) -> Box<Cam16Jsh<T>>

Converts to this type from the input type.
Sourceยง

impl<T> From<Box<[T; 3]>> for Box<Cam16Qch<T>>

Available on crate feature alloc only.
Sourceยง

fn from(array: Box<[T; 3]>) -> Box<Cam16Qch<T>>

Converts to this type from the input type.
Sourceยง

impl<T> From<Box<[T; 3]>> for Box<Cam16Qmh<T>>

Available on crate feature alloc only.
Sourceยง

fn from(array: Box<[T; 3]>) -> Box<Cam16Qmh<T>>

Converts to this type from the input type.
Sourceยง

impl<T> From<Box<[T; 3]>> for Box<Cam16Qsh<T>>

Available on crate feature alloc only.
Sourceยง

fn from(array: Box<[T; 3]>) -> Box<Cam16Qsh<T>>

Converts to this type from the input type.
Sourceยง

impl<T> From<Box<[T; 3]>> for Box<Cam16UcsJab<T>>

Available on crate feature alloc only.
Sourceยง

fn from(array: Box<[T; 3]>) -> Box<Cam16UcsJab<T>>

Converts to this type from the input type.
Sourceยง

impl<T> From<Box<[T; 3]>> for Box<Cam16UcsJmh<T>>

Available on crate feature alloc only.
Sourceยง

fn from(array: Box<[T; 3]>) -> Box<Cam16UcsJmh<T>>

Converts to this type from the input type.
Sourceยง

impl<S, T> From<Box<[T; 3]>> for Box<Hsl<S, T>>

Available on crate feature alloc only.
Sourceยง

fn from(array: Box<[T; 3]>) -> Box<Hsl<S, T>>

Converts to this type from the input type.
Sourceยง

impl<Wp, T> From<Box<[T; 3]>> for Box<Hsluv<Wp, T>>

Available on crate feature alloc only.
Sourceยง

fn from(array: Box<[T; 3]>) -> Box<Hsluv<Wp, T>>

Converts to this type from the input type.
Sourceยง

impl<S, T> From<Box<[T; 3]>> for Box<Hsv<S, T>>

Available on crate feature alloc only.
Sourceยง

fn from(array: Box<[T; 3]>) -> Box<Hsv<S, T>>

Converts to this type from the input type.
Sourceยง

impl<S, T> From<Box<[T; 3]>> for Box<Hwb<S, T>>

Available on crate feature alloc only.
Sourceยง

fn from(array: Box<[T; 3]>) -> Box<Hwb<S, T>>

Converts to this type from the input type.
Sourceยง

impl<Wp, T> From<Box<[T; 3]>> for Box<Lab<Wp, T>>

Available on crate feature alloc only.
Sourceยง

fn from(array: Box<[T; 3]>) -> Box<Lab<Wp, T>>

Converts to this type from the input type.
Sourceยง

impl<Wp, T> From<Box<[T; 3]>> for Box<Lch<Wp, T>>

Available on crate feature alloc only.
Sourceยง

fn from(array: Box<[T; 3]>) -> Box<Lch<Wp, T>>

Converts to this type from the input type.
Sourceยง

impl<Wp, T> From<Box<[T; 3]>> for Box<Lchuv<Wp, T>>

Available on crate feature alloc only.
Sourceยง

fn from(array: Box<[T; 3]>) -> Box<Lchuv<Wp, T>>

Converts to this type from the input type.
Sourceยง

impl<M, T> From<Box<[T; 3]>> for Box<Lms<M, T>>

Available on crate feature alloc only.
Sourceยง

fn from(array: Box<[T; 3]>) -> Box<Lms<M, T>>

Converts to this type from the input type.
Sourceยง

impl<Wp, T> From<Box<[T; 3]>> for Box<Luv<Wp, T>>

Available on crate feature alloc only.
Sourceยง

fn from(array: Box<[T; 3]>) -> Box<Luv<Wp, T>>

Converts to this type from the input type.
Sourceยง

impl<T> From<Box<[T; 3]>> for Box<Okhsl<T>>

Available on crate feature alloc only.
Sourceยง

fn from(array: Box<[T; 3]>) -> Box<Okhsl<T>>

Converts to this type from the input type.
Sourceยง

impl<T> From<Box<[T; 3]>> for Box<Okhsv<T>>

Available on crate feature alloc only.
Sourceยง

fn from(array: Box<[T; 3]>) -> Box<Okhsv<T>>

Converts to this type from the input type.
Sourceยง

impl<T> From<Box<[T; 3]>> for Box<Okhwb<T>>

Available on crate feature alloc only.
Sourceยง

fn from(array: Box<[T; 3]>) -> Box<Okhwb<T>>

Converts to this type from the input type.
Sourceยง

impl<T> From<Box<[T; 3]>> for Box<Oklab<T>>

Available on crate feature alloc only.
Sourceยง

fn from(array: Box<[T; 3]>) -> Box<Oklab<T>>

Converts to this type from the input type.
Sourceยง

impl<T> From<Box<[T; 3]>> for Box<Oklch<T>>

Available on crate feature alloc only.
Sourceยง

fn from(array: Box<[T; 3]>) -> Box<Oklch<T>>

Converts to this type from the input type.
Sourceยง

impl<S, T> From<Box<[T; 3]>> for Box<Rgb<S, T>>

Available on crate feature alloc only.
Sourceยง

fn from(array: Box<[T; 3]>) -> Box<Rgb<S, T>>

Converts to this type from the input type.
Sourceยง

impl<Wp, T> From<Box<[T; 3]>> for Box<Xyz<Wp, T>>

Available on crate feature alloc only.
Sourceยง

fn from(array: Box<[T; 3]>) -> Box<Xyz<Wp, T>>

Converts to this type from the input type.
Sourceยง

impl<Wp, T> From<Box<[T; 3]>> for Box<Yxy<Wp, T>>

Available on crate feature alloc only.
Sourceยง

fn from(array: Box<[T; 3]>) -> Box<Yxy<Wp, T>>

Converts to this type from the input type.
Sourceยง

impl<C, T, const N: usize> From<Box<[T; N]>> for Box<Alpha<C, T>>
where Alpha<C, T>: ArrayCast<Array = [T; N]>,

Available on crate feature alloc only.
Sourceยง

fn from(array: Box<[T; N]>) -> Box<Alpha<C, T>>

Converts to this type from the input type.
Sourceยง

impl<O, T, const N: usize> From<Box<[T; N]>> for Box<Packed<O, [T; N]>>

Available on crate feature alloc only.
Sourceยง

fn from(array: Box<[T; N]>) -> Box<Packed<O, [T; N]>>

Converts to this type from the input type.
ยง

impl From<Box<[u8]>> for Box<BStr>

Available on crate feature alloc only.
ยง

fn from(s: Box<[u8]>) -> Box<BStr>

Converts to this type from the input type.
Sourceยง

impl From<Box<[u8]>> for Box<ByteStr>

Sourceยง

fn from(s: Box<[u8]>) -> Box<ByteStr>

Converts to this type from the input type.
ยง

impl From<Box<[u8]>> for Bytes

ยง

fn from(slice: Box<[u8]>) -> Bytes

Converts to this type from the input type.
Sourceยง

impl<C, T, const N: usize> From<Box<Alpha<C, T>>> for Box<[T; N]>
where Alpha<C, T>: ArrayCast<Array = [T; N]>,

Available on crate feature alloc only.
Sourceยง

fn from(color: Box<Alpha<C, T>>) -> Box<[T; N]>

Converts to this type from the input type.
ยง

impl From<Box<BStr>> for Box<[u8]>

Available on crate feature alloc only.
ยง

fn from(s: Box<BStr>) -> Box<[u8]>

Converts to this type from the input type.
Sourceยง

impl From<Box<ByteStr>> for Box<[u8]>

Sourceยง

fn from(s: Box<ByteStr>) -> Box<[u8]>

Converts to this type from the input type.
1.18.0 ยท Sourceยง

impl From<Box<CStr>> for CString

Sourceยง

fn from(s: Box<CStr>) -> CString

Converts a Box<CStr> into a CString without copying or allocating.

Sourceยง

impl<T> From<Box<Cam16Jch<T>>> for Box<[T; 3]>

Available on crate feature alloc only.
Sourceยง

fn from(color: Box<Cam16Jch<T>>) -> Box<[T; 3]>

Converts to this type from the input type.
Sourceยง

impl<T> From<Box<Cam16Jmh<T>>> for Box<[T; 3]>

Available on crate feature alloc only.
Sourceยง

fn from(color: Box<Cam16Jmh<T>>) -> Box<[T; 3]>

Converts to this type from the input type.
Sourceยง

impl<T> From<Box<Cam16Jsh<T>>> for Box<[T; 3]>

Available on crate feature alloc only.
Sourceยง

fn from(color: Box<Cam16Jsh<T>>) -> Box<[T; 3]>

Converts to this type from the input type.
Sourceยง

impl<T> From<Box<Cam16Qch<T>>> for Box<[T; 3]>

Available on crate feature alloc only.
Sourceยง

fn from(color: Box<Cam16Qch<T>>) -> Box<[T; 3]>

Converts to this type from the input type.
Sourceยง

impl<T> From<Box<Cam16Qmh<T>>> for Box<[T; 3]>

Available on crate feature alloc only.
Sourceยง

fn from(color: Box<Cam16Qmh<T>>) -> Box<[T; 3]>

Converts to this type from the input type.
Sourceยง

impl<T> From<Box<Cam16Qsh<T>>> for Box<[T; 3]>

Available on crate feature alloc only.
Sourceยง

fn from(color: Box<Cam16Qsh<T>>) -> Box<[T; 3]>

Converts to this type from the input type.
Sourceยง

impl<T> From<Box<Cam16UcsJab<T>>> for Box<[T; 3]>

Available on crate feature alloc only.
Sourceยง

fn from(color: Box<Cam16UcsJab<T>>) -> Box<[T; 3]>

Converts to this type from the input type.
Sourceยง

impl<T> From<Box<Cam16UcsJmh<T>>> for Box<[T; 3]>

Available on crate feature alloc only.
Sourceยง

fn from(color: Box<Cam16UcsJmh<T>>) -> Box<[T; 3]>

Converts to this type from the input type.
ยง

impl<'a, F> From<Box<F>> for FutureObj<'a, ()>
where F: Future<Output = ()> + Send + 'a,

ยง

fn from(boxed: Box<F>) -> FutureObj<'a, ()> โ“˜

Converts to this type from the input type.
ยง

impl<'a, F> From<Box<F>> for LocalFutureObj<'a, ()>
where F: Future<Output = ()> + 'a,

ยง

fn from(boxed: Box<F>) -> LocalFutureObj<'a, ()> โ“˜

Converts to this type from the input type.
Sourceยง

impl<S, T> From<Box<Hsl<S, T>>> for Box<[T; 3]>

Available on crate feature alloc only.
Sourceยง

fn from(color: Box<Hsl<S, T>>) -> Box<[T; 3]>

Converts to this type from the input type.
Sourceยง

impl<Wp, T> From<Box<Hsluv<Wp, T>>> for Box<[T; 3]>

Available on crate feature alloc only.
Sourceยง

fn from(color: Box<Hsluv<Wp, T>>) -> Box<[T; 3]>

Converts to this type from the input type.
Sourceยง

impl<S, T> From<Box<Hsv<S, T>>> for Box<[T; 3]>

Available on crate feature alloc only.
Sourceยง

fn from(color: Box<Hsv<S, T>>) -> Box<[T; 3]>

Converts to this type from the input type.
Sourceยง

impl<S, T> From<Box<Hwb<S, T>>> for Box<[T; 3]>

Available on crate feature alloc only.
Sourceยง

fn from(color: Box<Hwb<S, T>>) -> Box<[T; 3]>

Converts to this type from the input type.
Sourceยง

impl<Wp, T> From<Box<Lab<Wp, T>>> for Box<[T; 3]>

Available on crate feature alloc only.
Sourceยง

fn from(color: Box<Lab<Wp, T>>) -> Box<[T; 3]>

Converts to this type from the input type.
Sourceยง

impl<Wp, T> From<Box<Lch<Wp, T>>> for Box<[T; 3]>

Available on crate feature alloc only.
Sourceยง

fn from(color: Box<Lch<Wp, T>>) -> Box<[T; 3]>

Converts to this type from the input type.
Sourceยง

impl<Wp, T> From<Box<Lchuv<Wp, T>>> for Box<[T; 3]>

Available on crate feature alloc only.
Sourceยง

fn from(color: Box<Lchuv<Wp, T>>) -> Box<[T; 3]>

Converts to this type from the input type.
Sourceยง

impl<M, T> From<Box<Lms<M, T>>> for Box<[T; 3]>

Available on crate feature alloc only.
Sourceยง

fn from(color: Box<Lms<M, T>>) -> Box<[T; 3]>

Converts to this type from the input type.
Sourceยง

impl<S, T> From<Box<Luma<S, T>>> for Box<[T; 1]>

Available on crate feature alloc only.
Sourceยง

fn from(color: Box<Luma<S, T>>) -> Box<[T; 1]>

Converts to this type from the input type.
Sourceยง

impl<Wp, T> From<Box<Luv<Wp, T>>> for Box<[T; 3]>

Available on crate feature alloc only.
Sourceยง

fn from(color: Box<Luv<Wp, T>>) -> Box<[T; 3]>

Converts to this type from the input type.
Sourceยง

impl<T> From<Box<Okhsl<T>>> for Box<[T; 3]>

Available on crate feature alloc only.
Sourceยง

fn from(color: Box<Okhsl<T>>) -> Box<[T; 3]>

Converts to this type from the input type.
Sourceยง

impl<T> From<Box<Okhsv<T>>> for Box<[T; 3]>

Available on crate feature alloc only.
Sourceยง

fn from(color: Box<Okhsv<T>>) -> Box<[T; 3]>

Converts to this type from the input type.
Sourceยง

impl<T> From<Box<Okhwb<T>>> for Box<[T; 3]>

Available on crate feature alloc only.
Sourceยง

fn from(color: Box<Okhwb<T>>) -> Box<[T; 3]>

Converts to this type from the input type.
Sourceยง

impl<T> From<Box<Oklab<T>>> for Box<[T; 3]>

Available on crate feature alloc only.
Sourceยง

fn from(color: Box<Oklab<T>>) -> Box<[T; 3]>

Converts to this type from the input type.
Sourceยง

impl<T> From<Box<Oklch<T>>> for Box<[T; 3]>

Available on crate feature alloc only.
Sourceยง

fn from(color: Box<Oklch<T>>) -> Box<[T; 3]>

Converts to this type from the input type.
Sourceยง

impl<O, T, const N: usize> From<Box<Packed<O, [T; N]>>> for Box<[T; N]>

Available on crate feature alloc only.
Sourceยง

fn from(color: Box<Packed<O, [T; N]>>) -> Box<[T; N]>

Converts to this type from the input type.
Sourceยง

impl<C, const N: usize> From<Box<PreAlpha<C>>> for Box<[<C as Premultiply>::Scalar; N]>
where C: Premultiply, PreAlpha<C>: ArrayCast<Array = [<C as Premultiply>::Scalar; N]>,

Available on crate feature alloc only.
Sourceยง

fn from(color: Box<PreAlpha<C>>) -> Box<[<C as Premultiply>::Scalar; N]>

Converts to this type from the input type.
Sourceยง

impl From<Box<RawValue>> for Box<str>

Sourceยง

fn from(raw_value: Box<RawValue>) -> Box<str>

Converts to this type from the input type.
Sourceยง

impl<S, T> From<Box<Rgb<S, T>>> for Box<[T; 3]>

Available on crate feature alloc only.
Sourceยง

fn from(color: Box<Rgb<S, T>>) -> Box<[T; 3]>

Converts to this type from the input type.
1.21.0 ยท Sourceยง

impl<T, A> From<Box<T, A>> for Arc<T, A>
where A: Allocator, T: ?Sized,

Available on non-no_global_oom_handling only.
Sourceยง

fn from(v: Box<T, A>) -> Arc<T, A> โ“˜

Move a boxed object to a new, reference-counted allocation.

ยงExample
let unique: Box<str> = Box::from("eggplant");
let shared: Arc<str> = Arc::from(unique);
assert_eq!("eggplant", &shared[..]);
1.33.0 ยท Sourceยง

impl<T, A> From<Box<T, A>> for Pin<Box<T, A>>
where A: Allocator + 'static, T: ?Sized,

Sourceยง

fn from(boxed: Box<T, A>) -> Pin<Box<T, A>>

Converts a Box<T> into a Pin<Box<T>>. If T does not implement Unpin, then *boxed will be pinned in memory and unable to be moved.

This conversion does not allocate on the heap and happens in place.

This is also available via Box::into_pin.

Constructing and pinning a Box with <Pin<Box<T>>>::from(Box::new(x)) can also be written more concisely using Box::pin(x). This From implementation is useful if you already have a Box<T>, or you are constructing a (pinned) Box in a different way than with Box::new.

1.21.0 ยท Sourceยง

impl<T, A> From<Box<T, A>> for Rc<T, A>
where A: Allocator, T: ?Sized,

Available on non-no_global_oom_handling only.
Sourceยง

fn from(v: Box<T, A>) -> Rc<T, A>

Move a boxed object to a new, reference counted, allocation.

ยงExample
let original: Box<i32> = Box::new(1);
let shared: Rc<i32> = Rc::from(original);
assert_eq!(1, *shared);
Sourceยง

impl<Wp, T> From<Box<Xyz<Wp, T>>> for Box<[T; 3]>

Available on crate feature alloc only.
Sourceยง

fn from(color: Box<Xyz<Wp, T>>) -> Box<[T; 3]>

Converts to this type from the input type.
Sourceยง

impl<Wp, T> From<Box<Yxy<Wp, T>>> for Box<[T; 3]>

Available on crate feature alloc only.
Sourceยง

fn from(color: Box<Yxy<Wp, T>>) -> Box<[T; 3]>

Converts to this type from the input type.
ยง

impl From<Box<dyn Error + Sync + Send>> for Error

ยง

fn from(value: Box<dyn Error + Sync + Send>) -> Error

Converts to this type from the input type.
Sourceยง

impl<'a> From<Box<dyn Fn(&Theme) -> Style + 'a>> for Container<'a>

Sourceยง

fn from(value: StyleFn<'a, Theme>) -> Self

Converts to this type from the input type.
Sourceยง

impl<'a> From<Box<dyn Fn(&Theme, Status) -> Style + 'a>> for TextEditor<'a>

Sourceยง

fn from(style: StyleFn<'a, Theme>) -> Self

Converts to this type from the input type.
ยง

impl<'a> From<Box<dyn Future<Output = ()> + 'a>> for LocalFutureObj<'a, ()>

ยง

fn from(boxed: Box<dyn Future<Output = ()> + 'a>) -> LocalFutureObj<'a, ()> โ“˜

Converts to this type from the input type.
ยง

impl<'a> From<Box<dyn Future<Output = ()> + Send + 'a>> for FutureObj<'a, ()>

ยง

fn from(boxed: Box<dyn Future<Output = ()> + Send + 'a>) -> FutureObj<'a, ()> โ“˜

Converts to this type from the input type.
ยง

impl From<Box<str>> for SmolStr

ยง

fn from(s: Box<str>) -> SmolStr

Converts to this type from the input type.
1.18.0 ยท Sourceยง

impl From<Box<str>> for String

Sourceยง

fn from(s: Box<str>) -> String

Converts the given boxed str slice to a String. It is notable that the str slice is owned.

ยงExamples
let s1: String = String::from("hello world");
let s2: Box<str> = s1.into_boxed_str();
let s3: String = String::from(s2);

assert_eq!("hello world", s3)
1.19.0 ยท Sourceยง

impl<A> From<Box<str, A>> for Box<[u8], A>
where A: Allocator,

Sourceยง

fn from(s: Box<str, A>) -> Box<[u8], A>

Converts a Box<str> into a Box<[u8]>

This conversion does not allocate on the heap and happens in place.

ยงExamples
// create a Box<str> which will be used to create a Box<[u8]>
let boxed: Box<str> = Box::from("hello");
let boxed_str: Box<[u8]> = Box::from(boxed);

// create a &[u8] which will be used to create a Box<[u8]>
let slice: &[u8] = &[104, 101, 108, 108, 111];
let boxed_slice = Box::from(slice);

assert_eq!(boxed_slice, boxed_str);
1.20.0 ยท Sourceยง

impl From<CString> for Box<CStr>

Sourceยง

fn from(s: CString) -> Box<CStr>

Converts a CString into a Box<CStr> without copying or allocating.

1.45.0 ยท Sourceยง

impl<T> From<Cow<'_, [T]>> for Box<[T]>
where T: Clone,

Available on non-no_global_oom_handling only.
Sourceยง

fn from(cow: Cow<'_, [T]>) -> Box<[T]>

Converts a Cow<'_, [T]> into a Box<[T]>

When cow is the Cow::Borrowed variant, this conversion allocates on the heap and copies the underlying slice. Otherwise, it will try to reuse the owned Vecโ€™s allocation.

1.45.0 ยท Sourceยง

impl From<Cow<'_, CStr>> for Box<CStr>

Sourceยง

fn from(cow: Cow<'_, CStr>) -> Box<CStr>

Converts a Cow<'a, CStr> into a Box<CStr>, by copying the contents if they are borrowed.

1.45.0 ยท Sourceยง

impl From<Cow<'_, OsStr>> for Box<OsStr>

Sourceยง

fn from(cow: Cow<'_, OsStr>) -> Box<OsStr>

Converts a Cow<'a, OsStr> into a Box<OsStr>, by copying the contents if they are borrowed.

1.45.0 ยท Sourceยง

impl From<Cow<'_, Path>> for Box<Path>

Sourceยง

fn from(cow: Cow<'_, Path>) -> Box<Path>

Creates a boxed Path from a clone-on-write pointer.

Converting from a Cow::Owned does not clone or allocate.

1.45.0 ยท Sourceยง

impl From<Cow<'_, str>> for Box<str>

Available on non-no_global_oom_handling only.
Sourceยง

fn from(cow: Cow<'_, str>) -> Box<str>

Converts a Cow<'_, str> into a Box<str>

When cow is the Cow::Borrowed variant, this conversion allocates on the heap and copies the underlying str. Otherwise, it will try to reuse the owned Stringโ€™s allocation.

ยงExamples
use std::borrow::Cow;

let unboxed = Cow::Borrowed("hello");
let boxed: Box<str> = Box::from(unboxed);
println!("{boxed}");
let unboxed = Cow::Owned("hello".to_string());
let boxed: Box<str> = Box::from(unboxed);
println!("{boxed}");
1.22.0 ยท Sourceยง

impl<'a, 'b> From<Cow<'b, str>> for Box<dyn Error + 'a>

Available on non-no_global_oom_handling only.
Sourceยง

fn from(err: Cow<'b, str>) -> Box<dyn Error + 'a>

Converts a Cow into a box of dyn Error.

ยงExamples
use std::error::Error;
use std::borrow::Cow;

let a_cow_str_error = Cow::from("a str error");
let a_boxed_error = Box::<dyn Error>::from(a_cow_str_error);
assert!(size_of::<Box<dyn Error>>() == size_of_val(&a_boxed_error))
1.22.0 ยท Sourceยง

impl<'a, 'b> From<Cow<'b, str>> for Box<dyn Error + Sync + Send + 'a>

Available on non-no_global_oom_handling only.
Sourceยง

fn from(err: Cow<'b, str>) -> Box<dyn Error + Sync + Send + 'a>

Converts a Cow into a box of dyn Error + Send + Sync.

ยงExamples
use std::error::Error;
use std::borrow::Cow;

let a_cow_str_error = Cow::from("a str error");
let a_boxed_error = Box::<dyn Error + Send + Sync>::from(a_cow_str_error);
assert!(
    size_of::<Box<dyn Error + Send + Sync>>() == size_of_val(&a_boxed_error))
1.0.0 ยท Sourceยง

impl<'a, E> From<E> for Box<dyn Error + 'a>
where E: Error + 'a,

Available on non-no_global_oom_handling only.
Sourceยง

fn from(err: E) -> Box<dyn Error + 'a>

Converts a type of Error into a box of dyn Error.

ยงExamples
use std::error::Error;
use std::fmt;

#[derive(Debug)]
struct AnError;

impl fmt::Display for AnError {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        write!(f, "An error")
    }
}

impl Error for AnError {}

let an_error = AnError;
assert!(0 == size_of_val(&an_error));
let a_boxed_error = Box::<dyn Error>::from(an_error);
assert!(size_of::<Box<dyn Error>>() == size_of_val(&a_boxed_error))
1.0.0 ยท Sourceยง

impl<'a, E> From<E> for Box<dyn Error + Sync + Send + 'a>
where E: Error + Send + Sync + 'a,

Available on non-no_global_oom_handling only.
Sourceยง

fn from(err: E) -> Box<dyn Error + Sync + Send + 'a>

Converts a type of Error + Send + Sync into a box of dyn Error + Send + Sync.

ยงExamples
use std::error::Error;
use std::fmt;

#[derive(Debug)]
struct AnError;

impl fmt::Display for AnError {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        write!(f, "An error")
    }
}

impl Error for AnError {}

unsafe impl Send for AnError {}

unsafe impl Sync for AnError {}

let an_error = AnError;
assert!(0 == size_of_val(&an_error));
let a_boxed_error = Box::<dyn Error + Send + Sync>::from(an_error);
assert!(
    size_of::<Box<dyn Error + Send + Sync>>() == size_of_val(&a_boxed_error))
ยง

impl From<Error> for Box<dyn DBusError + Sync + Send>

ยง

fn from(e: Error) -> Box<dyn DBusError + Sync + Send>

Converts to this type from the input type.
ยง

impl From<Error> for Box<dyn DBusError + Sync + Send>

A D-Bus error carried by an [Error] is boxed as is. Any other [Error] is not a D-Bus error; it is reported the way [fdo::Error] reports it.

ยง

fn from(e: Error) -> Box<dyn DBusError + Sync + Send>

Converts to this type from the input type.
Sourceยง

impl From<Error> for Box<dyn Error>

Available on crate feature std or non-anyhow_no_core_error only.
Sourceยง

fn from(error: Error) -> Box<dyn Error>

Converts to this type from the input type.
Sourceยง

impl From<Error> for Box<dyn Error + Send>

Available on crate feature std or non-anyhow_no_core_error only.
Sourceยง

fn from(error: Error) -> Box<dyn Error + Send>

Converts to this type from the input type.
Sourceยง

impl From<Error> for Box<dyn Error + Sync + Send>

Available on crate feature std or non-anyhow_no_core_error only.
Sourceยง

fn from(error: Error) -> Box<dyn Error + Sync + Send>

Converts to this type from the input type.
1.20.0 ยท Sourceยง

impl From<OsString> for Box<OsStr>

Sourceยง

fn from(s: OsString) -> Box<OsStr>

Converts an OsString into a Box<OsStr> without copying or allocating.

Sourceยง

impl From<PanicMessage> for Box<dyn Any + Send>

Sourceยง

fn from(val: PanicMessage) -> Box<dyn Any + Send>

Converts to this type from the input type.
1.20.0 ยท Sourceยง

impl From<PathBuf> for Box<Path>

Sourceยง

fn from(p: PathBuf) -> Box<Path>

Converts a PathBuf into a Box<Path>.

This conversion currently should not allocate memory, but this behavior is not guaranteed on all platforms or in all future versions.

1.6.0 ยท Sourceยง

impl<'a> From<String> for Box<dyn Error + 'a>

Available on non-no_global_oom_handling only.
Sourceยง

fn from(str_err: String) -> Box<dyn Error + 'a>

Converts a String into a box of dyn Error.

ยงExamples
use std::error::Error;

let a_string_error = "a string error".to_string();
let a_boxed_error = Box::<dyn Error>::from(a_string_error);
assert!(size_of::<Box<dyn Error>>() == size_of_val(&a_boxed_error))
1.0.0 ยท Sourceยง

impl<'a> From<String> for Box<dyn Error + Sync + Send + 'a>

Available on non-no_global_oom_handling only.
Sourceยง

fn from(err: String) -> Box<dyn Error + Sync + Send + 'a>

Converts a String into a box of dyn Error + Send + Sync.

ยงExamples
use std::error::Error;

let a_string_error = "a string error".to_string();
let a_boxed_error = Box::<dyn Error + Send + Sync>::from(a_string_error);
assert!(
    size_of::<Box<dyn Error + Send + Sync>>() == size_of_val(&a_boxed_error))
1.20.0 ยท Sourceยง

impl From<String> for Box<str>

Available on non-no_global_oom_handling only.
Sourceยง

fn from(s: String) -> Box<str>

Converts the given String to a boxed str slice that is owned.

ยงExamples
let s1: String = String::from("hello world");
let s2: Box<str> = Box::from(s1);
let s3: String = String::from(s2);

assert_eq!("hello world", s3)
ยง

impl<Theme> From<Style> for Box<dyn Fn(&Theme) -> Style + '_>

ยง

fn from(style: Style) -> Box<dyn Fn(&Theme) -> Style + '_>

Converts to this type from the input type.
ยง

impl<Theme> From<Style> for Box<dyn Fn(&Theme) -> Style + '_>

ยง

fn from(style: Style) -> Box<dyn Fn(&Theme) -> Style + '_>

Converts to this type from the input type.
ยง

impl<Theme> From<Style> for Box<dyn Fn(&Theme, Status) -> Style + '_>

ยง

fn from(style: Style) -> Box<dyn Fn(&Theme, Status) -> Style + '_>

Converts to this type from the input type.
1.6.0 ยท Sourceยง

impl<T> From<T> for Box<T>

Available on non-no_global_oom_handling only.
Sourceยง

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

Converts a T into a Box<T>

The conversion allocates on the heap and moves t from the stack into it.

ยงExamples
let x = 5;
let boxed = Box::new(5);

assert_eq!(Box::from(x), boxed);
1.20.0 ยท Sourceยง

impl<T, A> From<Vec<T, A>> for Box<[T], A>
where A: Allocator,

Available on non-no_global_oom_handling only.
Sourceยง

fn from(v: Vec<T, A>) -> Box<[T], A>

Converts a vector into a boxed slice.

Before doing the conversion, this method discards excess capacity like Vec::shrink_to_fit.

ยงExamples
assert_eq!(Box::from(vec![1, 2, 3]), vec![1, 2, 3].into_boxed_slice());

Any excess capacity is removed:

let mut vec = Vec::with_capacity(10);
vec.extend([1, 2, 3]);

assert_eq!(Box::from(vec), vec![1, 2, 3].into_boxed_slice());
Sourceยง

impl<'a, T, C, const N: usize> FromArrays<&'a Box<[[T; N]]>> for &'a [C]
where C: ArrayCast<Array = [T; N]>,

Sourceยง

fn from_arrays(arrays: &'a Box<[[T; N]]>) -> &'a [C]

Cast a collection of arrays into an collection of colors.
Sourceยง

impl<'a, T, C, const N: usize> FromArrays<&'a mut Box<[[T; N]]>> for &'a mut [C]
where C: ArrayCast<Array = [T; N]>,

Sourceยง

fn from_arrays(arrays: &'a mut Box<[[T; N]]>) -> &'a mut [C]

Cast a collection of arrays into an collection of colors.
Sourceยง

impl<T, C, const N: usize> FromArrays<Box<[[T; N]]>> for Box<[C]>
where C: ArrayCast<Array = [T; N]>,

Available on crate feature alloc only.
Sourceยง

fn from_arrays(arrays: Box<[[T; N]]>) -> Box<[C]>

Cast a collection of arrays into an collection of colors.
Sourceยง

impl<T, U> FromColor<Box<[T]>> for Box<[U]>
where T: ArrayCast, U: ArrayCast<Array = <T as ArrayCast>::Array> + FromColor<T>,

Available on crate feature alloc only.
Sourceยง

fn from_color(color: Box<[T]>) -> Box<[U]>

Convert all colors in place, without reallocating.

use palette::{convert::FromColor, SaturateAssign, Srgb, Lch};

let srgb = vec![Srgb::new(0.8f32, 1.0, 0.2), Srgb::new(0.9, 0.1, 0.3)].into_boxed_slice();
let mut lch = Box::<[Lch]>::from_color(srgb);

lch.saturate_assign(0.1);

let srgb = Box::<[Srgb]>::from_color(lch);
Sourceยง

impl<T, U> FromColorUnclamped<Box<[T]>> for Box<[U]>
where T: ArrayCast, U: ArrayCast<Array = <T as ArrayCast>::Array> + FromColorUnclamped<T>,

Available on crate feature alloc only.
Sourceยง

fn from_color_unclamped(color: Box<[T]>) -> Box<[U]>

Convert all colors in place, without reallocating.

use palette::{convert::FromColorUnclamped, SaturateAssign, Srgb, Lch};

let srgb = vec![Srgb::new(0.8f32, 1.0, 0.2), Srgb::new(0.9, 0.1, 0.3)].into_boxed_slice();
let mut lch = Box::<[Lch]>::from_color_unclamped(srgb);

lch.saturate_assign(0.1);

let srgb = Box::<[Srgb]>::from_color_unclamped(lch);
1.80.0 ยท Sourceยง

impl<'a> FromIterator<&'a char> for Box<str>

Available on non-no_global_oom_handling only.
Sourceยง

fn from_iter<T>(iter: T) -> Box<str>
where T: IntoIterator<Item = &'a char>,

Creates a value from an iterator. Read more
1.80.0 ยท Sourceยง

impl<'a> FromIterator<&'a str> for Box<str>

Available on non-no_global_oom_handling only.
Sourceยง

fn from_iter<T>(iter: T) -> Box<str>
where T: IntoIterator<Item = &'a str>,

Creates a value from an iterator. Read more
1.80.0 ยท Sourceยง

impl<A> FromIterator<Box<str, A>> for Box<str>
where A: Allocator,

Available on non-no_global_oom_handling only.
Sourceยง

fn from_iter<T>(iter: T) -> Box<str>
where T: IntoIterator<Item = Box<str, A>>,

Creates a value from an iterator. Read more
1.45.0 ยท Sourceยง

impl<A> FromIterator<Box<str, A>> for String
where A: Allocator,

Available on non-no_global_oom_handling only.
Sourceยง

fn from_iter<I>(iter: I) -> String
where I: IntoIterator<Item = Box<str, A>>,

Creates a value from an iterator. Read more
1.80.0 ยท Sourceยง

impl<'a> FromIterator<Cow<'a, str>> for Box<str>

Available on non-no_global_oom_handling only.
Sourceยง

fn from_iter<T>(iter: T) -> Box<str>
where T: IntoIterator<Item = Cow<'a, str>>,

Creates a value from an iterator. Read more
1.32.0 ยท Sourceยง

impl<I> FromIterator<I> for Box<[I]>

Available on non-no_global_oom_handling only.
Sourceยง

fn from_iter<T>(iter: T) -> Box<[I]>
where T: IntoIterator<Item = I>,

Creates a value from an iterator. Read more
1.80.0 ยท Sourceยง

impl FromIterator<String> for Box<str>

Available on non-no_global_oom_handling only.
Sourceยง

fn from_iter<T>(iter: T) -> Box<str>
where T: IntoIterator<Item = String>,

Creates a value from an iterator. Read more
1.80.0 ยท Sourceยง

impl FromIterator<char> for Box<str>

Available on non-no_global_oom_handling only.
Sourceยง

fn from_iter<T>(iter: T) -> Box<str>
where T: IntoIterator<Item = char>,

Creates a value from an iterator. Read more
Sourceยง

impl<'a, C> FromUints<&'a Box<[<C as UintCast>::Uint]>> for &'a [C]
where C: UintCast,

Sourceยง

fn from_uints(uints: &'a Box<[<C as UintCast>::Uint]>) -> &'a [C]

Cast a collection of unsigned integers into an collection of colors.
Sourceยง

impl<'a, C> FromUints<&'a mut Box<[<C as UintCast>::Uint]>> for &'a mut [C]
where C: UintCast,

Sourceยง

fn from_uints(uints: &'a mut Box<[<C as UintCast>::Uint]>) -> &'a mut [C]

Cast a collection of unsigned integers into an collection of colors.
Sourceยง

impl<C> FromUints<Box<[<C as UintCast>::Uint]>> for Box<[C]>
where C: UintCast,

Available on crate feature alloc only.
Sourceยง

fn from_uints(uints: Box<[<C as UintCast>::Uint]>) -> Box<[C]>

Cast a collection of unsigned integers into an collection of colors.
ยง

impl<F> FusedFuture for Box<F>
where F: FusedFuture + Unpin + ?Sized,

ยง

fn is_terminated(&self) -> bool

Returns true if the underlying future should no longer be polled.
ยง

impl<S> FusedStream for Box<S>
where S: FusedStream + Unpin + ?Sized,

ยง

fn is_terminated(&self) -> bool

Returns true if the stream should no longer be polled.
1.36.0 ยท Sourceยง

impl<F, A> Future for Box<F, A>
where F: Future + Unpin + ?Sized, A: Allocator,

Sourceยง

type Output = <F as Future>::Output

The type of value produced on completion.
Sourceยง

fn poll( self: Pin<&mut Box<F, A>>, cx: &mut Context<'_>, ) -> Poll<<Box<F, A> 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
ยง

impl<H> HasDisplayHandle for Box<H>
where H: HasDisplayHandle + ?Sized,

Available on crate feature alloc only.
ยง

fn display_handle(&self) -> Result<DisplayHandle<'_>, HandleError>

Get a handle to the display controller of the windowing system.
ยง

impl<H> HasWindowHandle for Box<H>
where H: HasWindowHandle + ?Sized,

Available on crate feature alloc only.
ยง

fn window_handle(&self) -> Result<WindowHandle<'_>, HandleError>

Get a handle to the window.
1.0.0 ยท Sourceยง

impl<T, A> Hash for Box<T, A>
where T: Hash + ?Sized, A: Allocator,

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
1.22.0 ยท Sourceยง

impl<T, A> Hasher for Box<T, A>
where T: Hasher + ?Sized, A: Allocator,

Sourceยง

fn finish(&self) -> u64

Returns the hash value for the values written so far. Read more
Sourceยง

fn write(&mut self, bytes: &[u8])

Writes some data into this Hasher. Read more
Sourceยง

fn write_u8(&mut self, i: u8)

Writes a single u8 into this hasher.
Sourceยง

fn write_u16(&mut self, i: u16)

Writes a single u16 into this hasher.
Sourceยง

fn write_u32(&mut self, i: u32)

Writes a single u32 into this hasher.
Sourceยง

fn write_u64(&mut self, i: u64)

Writes a single u64 into this hasher.
Sourceยง

fn write_u128(&mut self, i: u128)

Writes a single u128 into this hasher.
Sourceยง

fn write_usize(&mut self, i: usize)

Writes a single usize into this hasher.
Sourceยง

fn write_i8(&mut self, i: i8)

Writes a single i8 into this hasher.
Sourceยง

fn write_i16(&mut self, i: i16)

Writes a single i16 into this hasher.
Sourceยง

fn write_i32(&mut self, i: i32)

Writes a single i32 into this hasher.
Sourceยง

fn write_i64(&mut self, i: i64)

Writes a single i64 into this hasher.
Sourceยง

fn write_i128(&mut self, i: i128)

Writes a single i128 into this hasher.
Sourceยง

fn write_isize(&mut self, i: isize)

Writes a single isize into this hasher.
Sourceยง

fn write_length_prefix(&mut self, len: usize)

๐Ÿ”ฌThis is a nightly-only experimental API. (hasher_prefixfree_extras)
Writes a length prefix into this hasher, as part of being prefix-free. Read more
Sourceยง

fn write_str(&mut self, s: &str)

๐Ÿ”ฌThis is a nightly-only experimental API. (hasher_prefixfree_extras)
Writes a single str into this hasher. Read more
ยง

impl<T> ImageDecoder for Box<T>
where T: ImageDecoder + ?Sized,

ยง

fn dimensions(&self) -> (u32, u32)

Returns a tuple containing the width and height of the image
ยง

fn color_type(&self) -> ColorType

Returns the color type of the image data produced by this decoder
ยง

fn original_color_type(&self) -> ExtendedColorType

Returns the color type of the image file before decoding
ยง

fn icc_profile(&mut self) -> Result<Option<Vec<u8>>, ImageError>

Returns the ICC color profile embedded in the image, or Ok(None) if the image does not have one. Read more
ยง

fn exif_metadata(&mut self) -> Result<Option<Vec<u8>>, ImageError>

Returns the raw Exif chunk, if it is present. A third-party crate such as kamadak-exif is required to actually parse it. Read more
ยง

fn xmp_metadata(&mut self) -> Result<Option<Vec<u8>>, ImageError>

Returns the raw XMP chunk, if it is present. A third-party crate such as roxmltree is required to actually parse it. Read more
ยง

fn iptc_metadata(&mut self) -> Result<Option<Vec<u8>>, ImageError>

Returns the raw IPTC chunk, if it is present. Read more
ยง

fn orientation(&mut self) -> Result<Orientation, ImageError>

Returns the orientation of the image. Read more
ยง

fn total_bytes(&self) -> u64

Returns the total number of bytes in the decoded image. Read more
ยง

fn read_image(self, buf: &mut [u8]) -> Result<(), ImageError>
where Box<T>: Sized,

Returns all the bytes in the image. Read more
ยง

fn read_image_boxed(self: Box<Box<T>>, buf: &mut [u8]) -> Result<(), ImageError>

Use read_image instead; this method is an implementation detail needed so the trait can be object safe. Read more
ยง

fn set_limits(&mut self, limits: Limits) -> Result<(), ImageError>

Set the decoder to have the specified limits. See Limits for the different kinds of limits that is possible to set. Read more
Sourceยง

impl<'a, T, C, const N: usize> IntoArrays<&'a [[T; N]]> for &'a Box<[C]>
where C: ArrayCast<Array = [T; N]>,

Sourceยง

fn into_arrays(self) -> &'a [[T; N]]

Cast this collection of colors into a collection of arrays.
Sourceยง

impl<'a, T, C, const N: usize> IntoArrays<&'a mut [[T; N]]> for &'a mut Box<[C]>
where C: ArrayCast<Array = [T; N]>,

Sourceยง

fn into_arrays(self) -> &'a mut [[T; N]]

Cast this collection of colors into a collection of arrays.
Sourceยง

impl<T, C, const N: usize> IntoArrays<Box<[[T; N]]>> for Box<[C]>
where C: ArrayCast<Array = [T; N]>,

Available on crate feature alloc only.
Sourceยง

fn into_arrays(self) -> Box<[[T; N]]>

Cast this collection of colors into a collection of arrays.
Sourceยง

impl<'a, T, C> IntoComponents<&'a [T]> for &'a Box<[C]>
where T: 'a, C: ArrayCast, <C as ArrayCast>::Array: ArrayExt<Item = T>,

Sourceยง

fn into_components(self) -> &'a [T]

Cast this collection of colors into a collection of color components.
Sourceยง

impl<'a, T, C> IntoComponents<&'a mut [T]> for &'a mut Box<[C]>
where T: 'a, C: ArrayCast, <C as ArrayCast>::Array: ArrayExt<Item = T>,

Sourceยง

fn into_components(self) -> &'a mut [T]

Cast this collection of colors into a collection of color components.
Sourceยง

impl<T, C> IntoComponents<Box<[T]>> for Box<[C]>
where C: ArrayCast, <C as ArrayCast>::Array: ArrayExt<Item = T>,

Available on crate feature alloc only.
Sourceยง

fn into_components(self) -> Box<[T]>

Cast this collection of colors into a collection of color components.
1.80.0 ยท Sourceยง

impl<'a, I, A> IntoIterator for &'a Box<[I], A>
where A: Allocator,

Sourceยง

type IntoIter = Iter<'a, I>

Which kind of iterator are we turning this into?
Sourceยง

type Item = &'a I

The type of the elements being iterated over.
Sourceยง

fn into_iter(self) -> Iter<'a, I> โ“˜

Creates an iterator from a value. Read more
1.80.0 ยท Sourceยง

impl<'a, I, A> IntoIterator for &'a mut Box<[I], A>
where A: Allocator,

Sourceยง

type IntoIter = IterMut<'a, I>

Which kind of iterator are we turning this into?
Sourceยง

type Item = &'a mut I

The type of the elements being iterated over.
Sourceยง

fn into_iter(self) -> IterMut<'a, I> โ“˜

Creates an iterator from a value. Read more
1.80.0 ยท Sourceยง

impl<I, A> IntoIterator for Box<[I], A>
where A: Allocator,

Sourceยง

type IntoIter = IntoIter<I, A>

Which kind of iterator are we turning this into?
Sourceยง

type Item = I

The type of the elements being iterated over.
Sourceยง

fn into_iter(self) -> IntoIter<I, A> โ“˜

Creates an iterator from a value. Read more
ยง

impl<K, V> IntoIterator for Box<Slice<K, V>>

ยง

type IntoIter = IntoIter<K, V>

Which kind of iterator are we turning this into?
ยง

type Item = (K, V)

The type of the elements being iterated over.
ยง

fn into_iter(self) -> <Box<Slice<K, V>> as IntoIterator>::IntoIter

Creates an iterator from a value. Read more
ยง

impl<T> IntoIterator for Box<Slice<T>>

ยง

type IntoIter = IntoIter<T>

Which kind of iterator are we turning this into?
ยง

type Item = T

The type of the elements being iterated over.
ยง

fn into_iter(self) -> <Box<Slice<T>> as IntoIterator>::IntoIter

Creates an iterator from a value. Read more
Sourceยง

impl<'a, C> IntoUints<&'a [<C as UintCast>::Uint]> for &'a Box<[C]>
where C: UintCast,

Sourceยง

fn into_uints(self) -> &'a [<C as UintCast>::Uint]

Cast this collection of colors into a collection of unsigned integers.
Sourceยง

impl<'a, C> IntoUints<&'a mut [<C as UintCast>::Uint]> for &'a mut Box<[C]>
where C: UintCast,

Sourceยง

fn into_uints(self) -> &'a mut [<C as UintCast>::Uint]

Cast this collection of colors into a collection of unsigned integers.
Sourceยง

impl<C> IntoUints<Box<[<C as UintCast>::Uint]>> for Box<[C]>
where C: UintCast,

Available on crate feature alloc only.
Sourceยง

fn into_uints(self) -> Box<[<C as UintCast>::Uint]>

Cast this collection of colors into a collection of unsigned integers.
1.0.0 ยท Sourceยง

impl<I, A> Iterator for Box<I, A>
where I: Iterator + ?Sized, A: Allocator,

Sourceยง

type Item = <I as Iterator>::Item

The type of the elements being iterated over.
Sourceยง

fn next(&mut self) -> Option<<I as Iterator>::Item>

Advances the iterator and returns the next value. Read more
Sourceยง

fn size_hint(&self) -> (usize, Option<usize>)

Returns the bounds on the remaining length of the iterator. Read more
Sourceยง

fn nth(&mut self, n: usize) -> Option<<I as Iterator>::Item>

Returns the nth element of the iterator. Read more
Sourceยง

fn last(self) -> Option<<I as Iterator>::Item>

Consumes the iterator, returning the last element. Read more
Sourceยง

fn next_chunk<const N: usize>( &mut self, ) -> Result<[Self::Item; N], IntoIter<Self::Item, N>>
where Self: Sized,

๐Ÿ”ฌThis is a nightly-only experimental API. (iter_next_chunk)
Advances the iterator and returns an array containing the next N values. Read more
1.0.0 ยท Sourceยง

fn count(self) -> usize
where Self: Sized,

Consumes the iterator, counting the number of iterations and returning it. Read more
Sourceยง

fn advance_by(&mut self, n: usize) -> Result<(), NonZero<usize>>

๐Ÿ”ฌThis is a nightly-only experimental API. (iter_advance_by)
Advances the iterator by n elements. Read more
1.28.0 ยท Sourceยง

fn step_by(self, step: usize) -> StepBy<Self>
where Self: Sized,

Creates an iterator starting at the same point, but stepping by the given amount at each iteration. Read more
1.0.0 ยท Sourceยง

fn chain<U>(self, other: U) -> Chain<Self, <U as IntoIterator>::IntoIter>
where Self: Sized, U: IntoIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both in sequence. Read more
1.0.0 ยท Sourceยง

fn zip<U>(self, other: U) -> Zip<Self, <U as IntoIterator>::IntoIter>
where Self: Sized, U: IntoIterator,

โ€˜Zips upโ€™ two iterators into a single iterator of pairs. Read more
Sourceยง

fn intersperse(self, separator: Self::Item) -> Intersperse<Self>
where Self: Sized, Self::Item: Clone,

๐Ÿ”ฌThis is a nightly-only experimental API. (iter_intersperse)
Creates a new iterator which places a copy of separator between items of the original iterator. Read more
Sourceยง

fn intersperse_with<G>(self, separator: G) -> IntersperseWith<Self, G>
where Self: Sized, G: FnMut() -> Self::Item,

๐Ÿ”ฌThis is a nightly-only experimental API. (iter_intersperse)
Creates a new iterator which places an item generated by separator between items of the original iterator. Read more
1.0.0 ยท Sourceยง

fn map<B, F>(self, f: F) -> Map<Self, F>
where Self: Sized, F: FnMut(Self::Item) -> B,

Takes a closure and creates an iterator which calls that closure on each element. Read more
1.21.0 ยท Sourceยง

fn for_each<F>(self, f: F)
where Self: Sized, F: FnMut(Self::Item),

Calls a closure on each element of an iterator. Read more
1.0.0 ยท Sourceยง

fn filter<P>(self, predicate: P) -> Filter<Self, P>
where Self: Sized, P: FnMut(&Self::Item) -> bool,

Creates an iterator which uses a closure to determine if an element should be yielded. Read more
1.0.0 ยท Sourceยง

fn filter_map<B, F>(self, f: F) -> FilterMap<Self, F>
where Self: Sized, F: FnMut(Self::Item) -> Option<B>,

Creates an iterator that both filters and maps. Read more
1.0.0 ยท Sourceยง

fn enumerate(self) -> Enumerate<Self>
where Self: Sized,

Creates an iterator which gives the current iteration count as well as the next value. Read more
1.0.0 ยท Sourceยง

fn peekable(self) -> Peekable<Self>
where Self: Sized,

Creates an iterator which can use the peek and peek_mut methods to look at the next element of the iterator without consuming it. See their documentation for more information. Read more
1.0.0 ยท Sourceยง

fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P>
where Self: Sized, P: FnMut(&Self::Item) -> bool,

Creates an iterator that skips elements based on a predicate. Read more
1.0.0 ยท Sourceยง

fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P>
where Self: Sized, P: FnMut(&Self::Item) -> bool,

Creates an iterator that yields elements based on a predicate. Read more
1.57.0 ยท Sourceยง

fn map_while<B, P>(self, predicate: P) -> MapWhile<Self, P>
where Self: Sized, P: FnMut(Self::Item) -> Option<B>,

Creates an iterator that both yields elements based on a predicate and maps. Read more
1.0.0 ยท Sourceยง

fn skip(self, n: usize) -> Skip<Self>
where Self: Sized,

Creates an iterator that skips the first n elements. Read more
1.0.0 ยท Sourceยง

fn take(self, n: usize) -> Take<Self>
where Self: Sized,

Creates an iterator that yields the first n elements, or fewer if the underlying iterator ends sooner. Read more
1.0.0 ยท Sourceยง

fn scan<St, B, F>(self, initial_state: St, f: F) -> Scan<Self, St, F>
where Self: Sized, F: FnMut(&mut St, Self::Item) -> Option<B>,

An iterator adapter which, like fold, holds internal state, but unlike fold, produces a new iterator. Read more
1.0.0 ยท Sourceยง

fn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F>
where Self: Sized, U: IntoIterator, F: FnMut(Self::Item) -> U,

Creates an iterator that works like map, but flattens nested structure. Read more
1.29.0 ยท Sourceยง

fn flatten(self) -> Flatten<Self>
where Self: Sized, Self::Item: IntoIterator,

Creates an iterator that flattens nested structure. Read more
Sourceยง

fn map_windows<F, R, const N: usize>(self, f: F) -> MapWindows<Self, F, N>
where Self: Sized, F: FnMut(&[Self::Item; N]) -> R,

๐Ÿ”ฌThis is a nightly-only experimental API. (iter_map_windows)
Calls the given function f for each contiguous window of size N over self and returns an iterator over the outputs of f. Like slice::windows(), the windows during mapping overlap as well. Read more
1.0.0 ยท Sourceยง

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

Creates an iterator which ends after the first None. Read more
1.0.0 ยท Sourceยง

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

Does something with each element of an iterator, passing the value on. Read more
1.0.0 ยท Sourceยง

fn by_ref(&mut self) -> &mut Self
where Self: Sized,

Creates a โ€œby referenceโ€ adapter for this instance of Iterator. Read more
1.0.0 ยท Sourceยง

fn collect<B>(self) -> B
where B: FromIterator<Self::Item>, Self: Sized,

Transforms an iterator into a collection. Read more
Sourceยง

fn try_collect<B>( &mut self, ) -> <<Self::Item as Try>::Residual as Residual<B>>::TryType
where Self: Sized, Self::Item: Try, <Self::Item as Try>::Residual: Residual<B>, B: FromIterator<<Self::Item as Try>::Output>,

๐Ÿ”ฌThis is a nightly-only experimental API. (iterator_try_collect)
Fallibly transforms an iterator into a collection, short circuiting if a failure is encountered. Read more
Sourceยง

fn collect_into<E>(self, collection: &mut E) -> &mut E
where E: Extend<Self::Item>, Self: Sized,

๐Ÿ”ฌThis is a nightly-only experimental API. (iter_collect_into)
Collects all the items from an iterator into a collection. Read more
1.0.0 ยท Sourceยง

fn partition<B, F>(self, f: F) -> (B, B)
where Self: Sized, B: Default + Extend<Self::Item>, F: FnMut(&Self::Item) -> bool,

Consumes an iterator, creating two collections from it. Read more
Sourceยง

fn partition_in_place<'a, T, P>(self, predicate: P) -> usize
where T: 'a, Self: Sized + DoubleEndedIterator<Item = &'a mut T>, P: FnMut(&T) -> bool,

๐Ÿ”ฌThis is a nightly-only experimental API. (iter_partition_in_place)
Reorders the elements of this iterator in-place according to the given predicate, such that all those that return true precede all those that return false. Returns the number of true elements found. Read more
Sourceยง

fn is_partitioned<P>(self, predicate: P) -> bool
where Self: Sized, P: FnMut(Self::Item) -> bool,

๐Ÿ”ฌThis is a nightly-only experimental API. (iter_is_partitioned)
Checks if the elements of this iterator are partitioned according to the given predicate, such that all those that return true precede all those that return false. Read more
1.27.0 ยท Sourceยง

fn try_fold<B, F, R>(&mut self, init: B, f: F) -> R
where Self: Sized, F: FnMut(B, Self::Item) -> R, R: Try<Output = B>,

An iterator method that applies a function as long as it returns successfully, producing a single, final value. Read more
1.27.0 ยท Sourceยง

fn try_for_each<F, R>(&mut self, f: F) -> R
where Self: Sized, F: FnMut(Self::Item) -> R, R: Try<Output = ()>,

An iterator method that applies a fallible function to each item in the iterator, stopping at the first error and returning that error. Read more
1.0.0 ยท Sourceยง

fn fold<B, F>(self, init: B, f: F) -> B
where Self: Sized, F: FnMut(B, Self::Item) -> B,

Folds every element into an accumulator by applying an operation, returning the final result. Read more
1.51.0 ยท Sourceยง

fn reduce<F>(self, f: F) -> Option<Self::Item>
where Self: Sized, F: FnMut(Self::Item, Self::Item) -> Self::Item,

Reduces the elements to a single one, by repeatedly applying a reducing operation. Read more
Sourceยง

fn try_reduce<R>( &mut self, f: impl FnMut(Self::Item, Self::Item) -> R, ) -> <<R as Try>::Residual as Residual<Option<<R as Try>::Output>>>::TryType
where Self: Sized, R: Try<Output = Self::Item>, <R as Try>::Residual: Residual<Option<Self::Item>>,

๐Ÿ”ฌThis is a nightly-only experimental API. (iterator_try_reduce)
Reduces the elements to a single one by repeatedly applying a reducing operation. If the closure returns a failure, the failure is propagated back to the caller immediately. Read more
1.0.0 ยท Sourceยง

fn all<F>(&mut self, f: F) -> bool
where Self: Sized, F: FnMut(Self::Item) -> bool,

Tests if every element of the iterator matches a predicate. Read more
1.0.0 ยท Sourceยง

fn any<F>(&mut self, f: F) -> bool
where Self: Sized, F: FnMut(Self::Item) -> bool,

Tests if any element of the iterator matches a predicate. Read more
1.0.0 ยท Sourceยง

fn find<P>(&mut self, predicate: P) -> Option<Self::Item>
where Self: Sized, P: FnMut(&Self::Item) -> bool,

Searches for an element of an iterator that satisfies a predicate. Read more
1.30.0 ยท Sourceยง

fn find_map<B, F>(&mut self, f: F) -> Option<B>
where Self: Sized, F: FnMut(Self::Item) -> Option<B>,

Applies function to the elements of iterator and returns the first non-none result. Read more
Sourceยง

fn try_find<R>( &mut self, f: impl FnMut(&Self::Item) -> R, ) -> <<R as Try>::Residual as Residual<Option<Self::Item>>>::TryType
where Self: Sized, R: Try<Output = bool>, <R as Try>::Residual: Residual<Option<Self::Item>>,

๐Ÿ”ฌThis is a nightly-only experimental API. (try_find)
Applies function to the elements of iterator and returns the first true result or the first error. Read more
1.0.0 ยท Sourceยง

fn position<P>(&mut self, predicate: P) -> Option<usize>
where Self: Sized, P: FnMut(Self::Item) -> bool,

Searches for an element in an iterator, returning its index. Read more
1.0.0 ยท Sourceยง

fn rposition<P>(&mut self, predicate: P) -> Option<usize>
where P: FnMut(Self::Item) -> bool, Self: Sized + ExactSizeIterator + DoubleEndedIterator,

Searches for an element in an iterator from the right, returning its index. Read more
1.0.0 ยท Sourceยง

fn max(self) -> Option<Self::Item>
where Self: Sized, Self::Item: Ord,

Returns the maximum element of an iterator. Read more
1.0.0 ยท Sourceยง

fn min(self) -> Option<Self::Item>
where Self: Sized, Self::Item: Ord,

Returns the minimum element of an iterator. Read more
1.6.0 ยท Sourceยง

fn max_by_key<B, F>(self, f: F) -> Option<Self::Item>
where B: Ord, Self: Sized, F: FnMut(&Self::Item) -> B,

Returns the element that gives the maximum value from the specified function. Read more
1.15.0 ยท Sourceยง

fn max_by<F>(self, compare: F) -> Option<Self::Item>
where Self: Sized, F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Returns the element that gives the maximum value with respect to the specified comparison function. Read more
1.6.0 ยท Sourceยง

fn min_by_key<B, F>(self, f: F) -> Option<Self::Item>
where B: Ord, Self: Sized, F: FnMut(&Self::Item) -> B,

Returns the element that gives the minimum value from the specified function. Read more
1.15.0 ยท Sourceยง

fn min_by<F>(self, compare: F) -> Option<Self::Item>
where Self: Sized, F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Returns the element that gives the minimum value with respect to the specified comparison function. Read more
1.0.0 ยท Sourceยง

fn rev(self) -> Rev<Self>
where Self: Sized + DoubleEndedIterator,

Reverses an iteratorโ€™s direction. Read more
1.0.0 ยท Sourceยง

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where FromA: Default + Extend<A>, FromB: Default + Extend<B>, Self: Sized + Iterator<Item = (A, B)>,

Converts an iterator of pairs into a pair of containers. Read more
1.36.0 ยท Sourceยง

fn copied<'a, T>(self) -> Copied<Self>
where T: Copy + 'a, Self: Sized + Iterator<Item = &'a T>,

Creates an iterator which copies all of its elements. Read more
1.0.0 ยท Sourceยง

fn cloned<'a, T>(self) -> Cloned<Self>
where T: Clone + 'a, Self: Sized + Iterator<Item = &'a T>,

Creates an iterator which clones all of its elements. Read more
1.0.0 ยท Sourceยง

fn cycle(self) -> Cycle<Self>
where Self: Sized + Clone,

Repeats an iterator endlessly. Read more
Sourceยง

fn array_chunks<const N: usize>(self) -> ArrayChunks<Self, N>
where Self: Sized,

๐Ÿ”ฌThis is a nightly-only experimental API. (iter_array_chunks)
Returns an iterator over N elements of the iterator at a time. Read more
1.11.0 ยท Sourceยง

fn sum<S>(self) -> S
where Self: Sized, S: Sum<Self::Item>,

Sums the elements of an iterator. Read more
1.11.0 ยท Sourceยง

fn product<P>(self) -> P
where Self: Sized, P: Product<Self::Item>,

Iterates over the entire iterator, multiplying all the elements Read more
1.5.0 ยท Sourceยง

fn cmp<I>(self, other: I) -> Ordering
where I: IntoIterator<Item = Self::Item>, Self::Item: Ord, Self: Sized,

Lexicographically compares the elements of this Iterator with those of another. Read more
Sourceยง

fn cmp_by<I, F>(self, other: I, cmp: F) -> Ordering
where Self: Sized, I: IntoIterator, F: FnMut(Self::Item, <I as IntoIterator>::Item) -> Ordering,

๐Ÿ”ฌThis is a nightly-only experimental API. (iter_order_by)
Lexicographically compares the elements of this Iterator with those of another with respect to the specified comparison function. Read more
1.5.0 ยท Sourceยง

fn partial_cmp<I>(self, other: I) -> Option<Ordering>
where I: IntoIterator, Self::Item: PartialOrd<<I as IntoIterator>::Item>, Self: Sized,

Lexicographically compares the PartialOrd elements of this Iterator with those of another. The comparison works like short-circuit evaluation, returning a result without comparing the remaining elements. As soon as an order can be determined, the evaluation stops and a result is returned. Read more
Sourceยง

fn partial_cmp_by<I, F>(self, other: I, partial_cmp: F) -> Option<Ordering>
where Self: Sized, I: IntoIterator, F: FnMut(Self::Item, <I as IntoIterator>::Item) -> Option<Ordering>,

๐Ÿ”ฌThis is a nightly-only experimental API. (iter_order_by)
Lexicographically compares the elements of this Iterator with those of another with respect to the specified comparison function. Read more
1.5.0 ยท Sourceยง

fn eq<I>(self, other: I) -> bool
where I: IntoIterator, Self::Item: PartialEq<<I as IntoIterator>::Item>, Self: Sized,

Determines if the elements of this Iterator are equal to those of another. Read more
Sourceยง

fn eq_by<I, F>(self, other: I, eq: F) -> bool
where Self: Sized, I: IntoIterator, F: FnMut(Self::Item, <I as IntoIterator>::Item) -> bool,

๐Ÿ”ฌThis is a nightly-only experimental API. (iter_order_by)
Determines if the elements of this Iterator are equal to those of another with respect to the specified equality function. Read more
1.5.0 ยท Sourceยง

fn ne<I>(self, other: I) -> bool
where I: IntoIterator, Self::Item: PartialEq<<I as IntoIterator>::Item>, Self: Sized,

Determines if the elements of this Iterator are not equal to those of another. Read more
1.5.0 ยท Sourceยง

fn lt<I>(self, other: I) -> bool
where I: IntoIterator, Self::Item: PartialOrd<<I as IntoIterator>::Item>, Self: Sized,

Determines if the elements of this Iterator are lexicographically less than those of another. Read more
1.5.0 ยท Sourceยง

fn le<I>(self, other: I) -> bool
where I: IntoIterator, Self::Item: PartialOrd<<I as IntoIterator>::Item>, Self: Sized,

Determines if the elements of this Iterator are lexicographically less or equal to those of another. Read more
1.5.0 ยท Sourceยง

fn gt<I>(self, other: I) -> bool
where I: IntoIterator, Self::Item: PartialOrd<<I as IntoIterator>::Item>, Self: Sized,

Determines if the elements of this Iterator are lexicographically greater than those of another. Read more
1.5.0 ยท Sourceยง

fn ge<I>(self, other: I) -> bool
where I: IntoIterator, Self::Item: PartialOrd<<I as IntoIterator>::Item>, Self: Sized,

Determines if the elements of this Iterator are lexicographically greater than or equal to those of another. Read more
1.82.0 ยท Sourceยง

fn is_sorted(self) -> bool
where Self: Sized, Self::Item: PartialOrd,

Checks if the elements of this iterator are sorted. Read more
1.82.0 ยท Sourceยง

fn is_sorted_by<F>(self, compare: F) -> bool
where Self: Sized, F: FnMut(&Self::Item, &Self::Item) -> bool,

Checks if the elements of this iterator are sorted using the given comparator function. Read more
1.82.0 ยท Sourceยง

fn is_sorted_by_key<F, K>(self, f: F) -> bool
where Self: Sized, F: FnMut(Self::Item) -> K, K: PartialOrd,

Checks if the elements of this iterator are sorted using the given key extraction function. Read more
ยง

impl<Sp> LocalSpawn for Box<Sp>
where Sp: LocalSpawn + ?Sized,

ยง

fn spawn_local_obj( &self, future: LocalFutureObj<'static, ()>, ) -> Result<(), SpawnError>

Spawns a future that will be run to completion. Read more
ยง

fn status_local(&self) -> Result<(), SpawnError>

Determines whether the executor is able to spawn new tasks. Read more
ยง

impl<T> Log for Box<T>
where T: Log + ?Sized,

Available on crate feature alloc only.
ยง

fn enabled(&self, metadata: &Metadata<'_>) -> bool

Determines if a log message with the specified metadata would be logged. Read more
ยง

fn log(&self, record: &Record<'_>)

Logs the Record. Read more
ยง

fn flush(&self)

Flushes any buffered records. Read more
ยง

impl<T, O> Operation<O> for Box<T>
where T: Operation<O> + ?Sized,

ยง

fn traverse(&mut self, operate: &mut dyn FnMut(&mut dyn Operation<O>))

Requests further traversal of the widget tree to keep operating. Read more
ยง

fn container(&mut self, id: Option<&Id>, bounds: Rectangle)

Operates on a widget that contains other widgets.
ยง

fn focusable( &mut self, id: Option<&Id>, bounds: Rectangle, state: &mut dyn Focusable, )

Operates on a widget that can be focused.
ยง

fn scrollable( &mut self, id: Option<&Id>, bounds: Rectangle, content_bounds: Rectangle, translation: Vector, state: &mut dyn Scrollable, )

Operates on a widget that can be scrolled.
ยง

fn text_input( &mut self, id: Option<&Id>, bounds: Rectangle, state: &mut dyn TextInput, )

Operates on a widget that has text input.
ยง

fn text(&mut self, id: Option<&Id>, bounds: Rectangle, text: &str)

Operates on a widget that contains some text.
ยง

fn custom( &mut self, id: Option<&Id>, bounds: Rectangle, state: &mut (dyn Any + 'static), )

Operates on a custom widget with some state.
ยง

fn finish(&self) -> Outcome<O>

Finishes the Operation and returns its Outcome.
ยง

fn set_window_id(&mut self, id: Id)

Track the active window id being processed if relevant to the operation
ยง

fn pre_operation(&mut self, id: Option<&Id>)

Used to mark the beginning of operations for a widget and its children
ยง

impl<T, O> Operation<O> for Box<T>
where T: Operation<O> + ?Sized,

ยง

fn traverse(&mut self, operate: &mut dyn FnMut(&mut dyn Operation<O>))

Requests further traversal of the widget tree to keep operating. Read more
ยง

fn container(&mut self, id: Option<&Id>, bounds: Rectangle)

Operates on a widget that contains other widgets.
ยง

fn focusable( &mut self, id: Option<&Id>, bounds: Rectangle, state: &mut dyn Focusable, )

Operates on a widget that can be focused.
ยง

fn scrollable( &mut self, id: Option<&Id>, bounds: Rectangle, content_bounds: Rectangle, translation: Vector, state: &mut dyn Scrollable, )

Operates on a widget that can be scrolled.
ยง

fn text_input( &mut self, id: Option<&Id>, bounds: Rectangle, state: &mut dyn TextInput, )

Operates on a widget that has text input.
ยง

fn text(&mut self, id: Option<&Id>, bounds: Rectangle, text: &str)

Operates on a widget that contains some text.
ยง

fn custom( &mut self, id: Option<&Id>, bounds: Rectangle, state: &mut (dyn Any + 'static), )

Operates on a custom widget with some state.
ยง

fn finish(&self) -> Outcome<O>

Finishes the [Operation] and returns its [Outcome].
ยง

fn set_window_id(&mut self, id: Id)

Track the active window id being processed if relevant to the operation
ยง

fn pre_operation(&mut self, id: Option<&Id>)

Used to mark the beginning of operations for a widget and its children
1.0.0 ยท Sourceยง

impl<T, A> Ord for Box<T, A>
where T: Ord + ?Sized, A: Allocator,

Sourceยง

fn cmp(&self, other: &Box<T, A>) -> 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> Parse for Box<T>
where T: Parse,

Sourceยง

fn parse(input: &ParseBuffer<'_>) -> Result<Box<T>, Error>

ยง

impl<I, O, E> Parser<I, O, E> for Box<dyn Parser<I, O, E> + '_>

Available on crate feature alloc only.
ยง

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_iter(&mut self, input: I) -> ParseIter<'_, Self, I, O, E>
where Self: Sized, I: Stream + StreamIsPartial, E: ParserError<I>, <E as ParserError<I>>::Inner: ParserError<I>,

Repeat this parse until all of input is consumed, 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
1.0.0 ยท Sourceยง

impl<T, A> PartialEq for Box<T, A>
where T: PartialEq + ?Sized, A: Allocator,

Sourceยง

fn eq(&self, other: &Box<T, A>) -> bool

Tests for self and other values to be equal, and is used by ==.
Sourceยง

fn ne(&self, other: &Box<T, A>) -> bool

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

impl<T, A> PartialOrd for Box<T, A>
where T: PartialOrd + ?Sized, A: Allocator,

Sourceยง

fn partial_cmp(&self, other: &Box<T, A>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
Sourceยง

fn lt(&self, other: &Box<T, A>) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
Sourceยง

fn le(&self, other: &Box<T, A>) -> bool

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

fn ge(&self, other: &Box<T, A>) -> bool

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

fn gt(&self, other: &Box<T, A>) -> bool

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

impl<T, A> Pointer for Box<T, A>
where A: Allocator, T: ?Sized,

Sourceยง

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

Formats the value using the given formatter. Read more
ยง

impl PollIo for Box<dyn ErasedRegistration>

ยง

fn poll_io<T>( &self, cx: &mut Context<'_>, interest: Interest, operation: impl FnMut() -> Result<T, Error>, ) -> Poll<Result<T, Error>>

Run operation on the polling thread while the source is ready for interest. Read more
1.0.0 ยท Sourceยง

impl<R> Read for Box<R>
where R: Read + ?Sized,

Sourceยง

fn read(&mut self, buf: &mut [u8]) -> Result<usize, Error>

Pull some bytes from this source into the specified buffer, returning how many bytes were read. Read more
Sourceยง

fn read_buf(&mut self, cursor: BorrowedCursor<'_>) -> Result<(), Error>

๐Ÿ”ฌThis is a nightly-only experimental API. (read_buf)
Pull some bytes from this source into the specified buffer. Read more
Sourceยง

fn read_vectored(&mut self, bufs: &mut [IoSliceMut<'_>]) -> Result<usize, Error>

Like read, except that it reads into a slice of buffers. Read more
Sourceยง

fn is_read_vectored(&self) -> bool

๐Ÿ”ฌThis is a nightly-only experimental API. (can_vector)
Determines if this Reader has an efficient read_vectored implementation. Read more
Sourceยง

fn read_to_end(&mut self, buf: &mut Vec<u8>) -> Result<usize, Error>

Reads all bytes until EOF in this source, placing them into buf. Read more
Sourceยง

fn read_to_string(&mut self, buf: &mut String) -> Result<usize, Error>

Reads all bytes until EOF in this source, appending them to buf. Read more
Sourceยง

fn read_exact(&mut self, buf: &mut [u8]) -> Result<(), Error>

Reads the exact number of bytes required to fill buf. Read more
Sourceยง

fn read_buf_exact(&mut self, cursor: BorrowedCursor<'_>) -> Result<(), Error>

๐Ÿ”ฌThis is a nightly-only experimental API. (read_buf)
Reads the exact number of bytes required to fill cursor. Read more
1.0.0 ยท Sourceยง

fn by_ref(&mut self) -> &mut Self
where Self: Sized,

Creates a โ€œby referenceโ€ adapter for this instance of Read. Read more
1.0.0 ยท Sourceยง

fn bytes(self) -> Bytes<Self>
where Self: Sized,

Transforms this Read instance to an Iterator over its bytes. Read more
1.0.0 ยท Sourceยง

fn chain<R>(self, next: R) -> Chain<Self, R>
where R: Read, Self: Sized,

Creates an adapter which will chain this stream with another. Read more
1.0.0 ยท Sourceยง

fn take(self, limit: u64) -> Take<Self>
where Self: Sized,

Creates an adapter which will read at most limit bytes from it. Read more
Sourceยง

fn read_array<const N: usize>(&mut self) -> Result<[u8; N], Error>
where Self: Sized,

๐Ÿ”ฌThis is a nightly-only experimental API. (read_array)
Read and return a fixed array of bytes from this source. Read more
ยง

impl ReadHalf for Box<dyn ReadHalf>

ยง

fn can_pass_unix_fd(&self) -> bool

Return whether passing file descriptors is supported. Read more
ยง

fn receive_message<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, seq: u64, already_received_bytes: &'life1 mut Vec<u8>, already_received_fds: &'life2 mut Vec<OwnedFd>, ) -> Pin<Box<dyn Future<Output = Result<Message, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Box<dyn ReadHalf>: 'async_trait,

Receive a message on the socket. Read more
ยง

fn recvmsg<'life0, 'life1, 'async_trait>( &'life0 mut self, buf: &'life1 mut [u8], ) -> Pin<Box<dyn Future<Output = Result<(usize, Vec<OwnedFd>), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Box<dyn ReadHalf>: 'async_trait,

Attempt to receive bytes from the socket. Read more
ยง

fn peer_credentials<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<ConnectionCredentials, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Box<dyn ReadHalf>: 'async_trait,

The peer credentials.
ยง

fn auth_mechanism(&self) -> AuthMechanism

The authentication mechanism to use for this socket on the target OS. Read more
ยง

impl ReadHalf for Box<dyn ReadHalf>

ยง

fn can_pass_unix_fd(&self) -> bool

Return whether passing file descriptors is supported. Read more
ยง

fn receive_message<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, seq: u64, already_received_bytes: &'life1 mut Vec<u8>, already_received_fds: &'life2 mut Vec<OwnedFd>, ) -> Pin<Box<dyn Future<Output = Result<Message, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Box<dyn ReadHalf>: 'async_trait,

Receive a message on the socket. Read more
ยง

fn recvmsg<'life0, 'life1, 'async_trait>( &'life0 mut self, buf: &'life1 mut [u8], ) -> Pin<Box<dyn Future<Output = Result<(usize, Vec<OwnedFd>), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Box<dyn ReadHalf>: 'async_trait,

Attempt to receive bytes from the socket. Read more
ยง

fn peer_credentials<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<ConnectionCredentials, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Box<dyn ReadHalf>: 'async_trait,

The peer credentials.
ยง

fn auth_mechanism(&self) -> AuthMechanism

The authentication mechanism to use for this socket on the target OS. Read more
ยง

impl<C> RequestConnection for Box<C>
where C: RequestConnection + ?Sized,

ยง

type Buf = <C as RequestConnection>::Buf

Type used as buffer to store raw replies or events before they are parsed.
ยง

fn send_request_with_reply<R>( &self, bufs: &[IoSlice<'_>], fds: Vec<OwnedFd>, ) -> Result<Cookie<'_, Box<C>, R>, ConnectionError>
where R: TryParse,

Send a request with a reply to the server. Read more
ยง

fn send_trait_request_with_reply<R>( &self, request: R, ) -> Result<Cookie<'_, Box<C>, <R as ReplyRequest>::Reply>, ConnectionError>
where R: ReplyRequest,

Send a request with a reply to the server. Read more
ยง

fn send_request_with_reply_with_fds<R>( &self, bufs: &[IoSlice<'_>], fds: Vec<OwnedFd>, ) -> Result<CookieWithFds<'_, Box<C>, R>, ConnectionError>
where R: TryParseFd,

Send a request with a reply containing file descriptors to the server. Read more
ยง

fn send_trait_request_with_reply_with_fds<R>( &self, request: R, ) -> Result<CookieWithFds<'_, Box<C>, <R as ReplyFDsRequest>::Reply>, ConnectionError>
where R: ReplyFDsRequest,

Send a request with a reply containing file descriptors to the server. Read more
ยง

fn send_request_without_reply( &self, bufs: &[IoSlice<'_>], fds: Vec<OwnedFd>, ) -> Result<VoidCookie<'_, Box<C>>, ConnectionError>

Send a request without a reply to the server. Read more
ยง

fn send_trait_request_without_reply<R>( &self, request: R, ) -> Result<VoidCookie<'_, Box<C>>, ConnectionError>
where R: VoidRequest,

Send a request without a reply to the server. Read more
ยง

fn discard_reply(&self, sequence: u64, kind: RequestKind, mode: DiscardMode)

A reply to an error should be discarded. Read more
ยง

fn prefetch_extension_information( &self, extension_name: &'static str, ) -> Result<(), ConnectionError>

Prefetches information about an extension. Read more
ยง

fn extension_information( &self, extension_name: &'static str, ) -> Result<Option<ExtensionInformation>, ConnectionError>

Get information about an extension. Read more
ยง

fn wait_for_reply_or_error( &self, sequence: u64, ) -> Result<<Box<C> as RequestConnection>::Buf, ReplyError>

Wait for the reply to a request. Read more
ยง

fn wait_for_reply_or_raw_error( &self, sequence: u64, ) -> Result<ReplyOrError<<Box<C> as RequestConnection>::Buf>, ConnectionError>

Wait for the reply to a request. Read more
ยง

fn wait_for_reply( &self, sequence: u64, ) -> Result<Option<<Box<C> as RequestConnection>::Buf>, ConnectionError>

Wait for the reply to a request. Read more
ยง

fn wait_for_reply_with_fds( &self, sequence: u64, ) -> Result<(<Box<C> as RequestConnection>::Buf, Vec<OwnedFd>), ReplyError>

Wait for the reply to a request that has FDs. Read more
ยง

fn wait_for_reply_with_fds_raw( &self, sequence: u64, ) -> Result<ReplyOrError<(<Box<C> as RequestConnection>::Buf, Vec<OwnedFd>), <Box<C> as RequestConnection>::Buf>, ConnectionError>

Wait for the reply to a request that has FDs. Read more
ยง

fn check_for_error(&self, sequence: u64) -> Result<(), ReplyError>

Check whether a request that does not have a reply caused an X11 error. Read more
ยง

fn check_for_raw_error( &self, sequence: u64, ) -> Result<Option<<Box<C> as RequestConnection>::Buf>, ConnectionError>

Check whether a request that does not have a reply caused an X11 error. Read more
ยง

fn prefetch_maximum_request_bytes(&self)

Prefetches the maximum request length. Read more
ยง

fn maximum_request_bytes(&self) -> usize

The maximum number of bytes that the X11 server accepts in a request.
ยง

fn parse_error(&self, error: &[u8]) -> Result<X11Error, ParseError>

Parse a generic error.
ยง

fn parse_event(&self, event: &[u8]) -> Result<Event, ParseError>

Parse a generic event.
1.0.0 ยท Sourceยง

impl<S> Seek for Box<S>
where S: Seek + ?Sized,

Sourceยง

fn seek(&mut self, pos: SeekFrom) -> Result<u64, Error>

Seek to an offset, in bytes, in a stream. Read more
Sourceยง

fn rewind(&mut self) -> Result<(), Error>

Rewind to the beginning of a stream. Read more
Sourceยง

fn stream_len(&mut self) -> Result<u64, Error>

๐Ÿ”ฌThis is a nightly-only experimental API. (seek_stream_len)
Returns the length of this stream (in bytes). Read more
Sourceยง

fn stream_position(&mut self) -> Result<u64, Error>

Returns the current seek position from the start of the stream. Read more
Sourceยง

fn seek_relative(&mut self, offset: i64) -> Result<(), Error>

Seeks relative to the current position. Read more
Sourceยง

impl<T> Serialize for Box<T>
where T: Serialize + ?Sized,

Available on crate features std or alloc only.
Sourceยง

fn serialize<S>( &self, serializer: S, ) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
Sourceยง

impl<K, KAs, V, VAs> SerializeAs<Box<[(K, V)]>> for BTreeMap<KAs, VAs>
where KAs: SerializeAs<K>, VAs: SerializeAs<V>,

Sourceยง

fn serialize_as<S>( source: &Box<[(K, V)]>, serializer: S, ) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where S: Serializer,

Serialize this value into the given Serde serializer.
Sourceยง

impl<K, KAs, V, VAs> SerializeAs<Box<[(K, V)]>> for HashMap<KAs, VAs>
where KAs: SerializeAs<K>, VAs: SerializeAs<V>,

Sourceยง

fn serialize_as<S>( source: &Box<[(K, V)]>, serializer: S, ) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where S: Serializer,

Serialize this value into the given Serde serializer.
Sourceยง

impl<T, U> SerializeAs<Box<[T]>> for Box<[U]>
where U: SerializeAs<T>,

Sourceยง

fn serialize_as<S>( source: &Box<[T]>, serializer: S, ) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where S: Serializer,

Serialize this value into the given Serde serializer.
Sourceยง

impl<T, U> SerializeAs<Box<T>> for Box<U>
where U: SerializeAs<T>,

Available on crate feature alloc only.
Sourceยง

fn serialize_as<S>( source: &Box<T>, serializer: S, ) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where S: Serializer,

Serialize this value into the given Serde serializer.
Sourceยง

impl<T, U> SerializeAs<Pin<Box<T>>> for Pin<Box<U>>
where U: SerializeAs<T>,

Sourceยง

fn serialize_as<S>( source: &Pin<Box<T>>, serializer: S, ) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where S: Serializer,

Serialize this value into the given Serde serializer.
ยง

impl<S, Item> Sink<Item> for Box<S>
where S: Sink<Item> + Unpin + ?Sized,

ยง

type Error = <S as Sink<Item>>::Error

The type of value produced by the sink when an error occurs.
ยง

fn poll_ready( self: Pin<&mut Box<S>>, cx: &mut Context<'_>, ) -> Poll<Result<(), <Box<S> as Sink<Item>>::Error>>

Attempts to prepare the Sink to receive a value. Read more
ยง

fn start_send( self: Pin<&mut Box<S>>, item: Item, ) -> Result<(), <Box<S> as Sink<Item>>::Error>

Begin the process of sending a value to the sink. Each call to this function must be preceded by a successful call to poll_ready which returned Poll::Ready(Ok(())). Read more
ยง

fn poll_flush( self: Pin<&mut Box<S>>, cx: &mut Context<'_>, ) -> Poll<Result<(), <Box<S> as Sink<Item>>::Error>>

Flush any remaining output from this sink. Read more
ยง

fn poll_close( self: Pin<&mut Box<S>>, cx: &mut Context<'_>, ) -> Poll<Result<(), <Box<S> as Sink<Item>>::Error>>

Flush any remaining output and close this sink, if necessary. Read more
ยง

impl<T> Source for Box<T>
where T: Source + ?Sized,

ยง

fn register( &mut self, registry: &Registry, token: Token, interests: Interest, ) -> Result<(), Error>

Register self with the given Registry instance. Read more
ยง

fn reregister( &mut self, registry: &Registry, token: Token, interests: Interest, ) -> Result<(), Error>

Re-register self with the given Registry instance. Read more
ยง

fn deregister(&mut self, registry: &Registry) -> Result<(), Error>

Deregister self from the given Registry instance. Read more
ยง

impl<Sp> Spawn for Box<Sp>
where Sp: Spawn + ?Sized,

ยง

fn spawn_obj(&self, future: FutureObj<'static, ()>) -> Result<(), SpawnError>

Spawns a future that will be run to completion. Read more
ยง

fn status(&self) -> Result<(), SpawnError>

Determines whether the executor is able to spawn new tasks. Read more
ยง

impl<S> Stream for Box<S>
where S: Stream + Unpin + ?Sized,

ยง

type Item = <S as Stream>::Item

Values yielded by the stream.
ยง

fn poll_next( self: Pin<&mut Box<S>>, cx: &mut Context<'_>, ) -> Poll<Option<<Box<S> as Stream>::Item>>

Attempt to pull out the next value of this stream, registering the current task for wakeup if the value is not yet available, and returning None if the stream is exhausted. Read more
ยง

fn size_hint(&self) -> (usize, Option<usize>)

Returns the bounds on the remaining length of the stream. Read more
ยง

impl<S> Subscriber for Box<S>
where S: Subscriber + ?Sized,

ยง

fn register_callsite(&self, metadata: &'static Metadata<'static>) -> Interest

Registers a new callsite with this subscriber, returning whether or not the subscriber is interested in being notified about the callsite. Read more
ยง

fn enabled(&self, metadata: &Metadata<'_>) -> bool

Returns true if a span or event with the specified metadata would be recorded. Read more
ยง

fn max_level_hint(&self) -> Option<LevelFilter>

Returns the highest verbosity level that this Subscriber will enable, or None, if the subscriber does not implement level-based filtering or chooses not to implement this method. Read more
ยง

fn new_span(&self, span: &Attributes<'_>) -> Id

Visit the construction of a new span, returning a new span ID for the span being constructed. Read more
ยง

fn record(&self, span: &Id, values: &Record<'_>)

Record a set of values on a span. Read more
ยง

fn record_follows_from(&self, span: &Id, follows: &Id)

Adds an indication that span follows from the span with the id follows. Read more
ยง

fn event_enabled(&self, event: &Event<'_>) -> bool

Determine if an [Event] should be recorded. Read more
ยง

fn event(&self, event: &Event<'_>)

Records that an Event has occurred. Read more
ยง

fn enter(&self, span: &Id)

Records that a span has been entered. Read more
ยง

fn exit(&self, span: &Id)

Records that a span has been exited. Read more
ยง

fn clone_span(&self, id: &Id) -> Id

Notifies the subscriber that a span ID has been cloned. Read more
ยง

fn try_close(&self, id: Id) -> bool

Notifies the subscriber that a span ID has been dropped, and returns true if there are now 0 IDs that refer to that span. Read more
ยง

fn drop_span(&self, id: Id)

๐Ÿ‘ŽDeprecated since 0.1.2:

use Subscriber::try_close instead

This method is deprecated. Read more
ยง

fn current_span(&self) -> Current

Returns a type representing this subscriberโ€™s view of the current span. Read more
ยง

unsafe fn downcast_raw(&self, id: TypeId) -> Option<*const ()>

If self is the same type as the provided TypeId, returns an untyped *const pointer to that type. Otherwise, returns None. Read more
ยง

fn on_register_dispatch(&self, subscriber: &Dispatch)

Invoked when this subscriber becomes a [Dispatch]. Read more
Sourceยง

impl<T> ToTokens for Box<T>
where T: ToTokens + ?Sized,

Sourceยง

fn to_tokens(&self, tokens: &mut TokenStream)

๐Ÿ”ฌThis is a nightly-only experimental API. (proc_macro_totokens)
Write self to the given TokenStream. Read more
Sourceยง

fn to_token_stream(&self) -> TokenStream

๐Ÿ”ฌThis is a nightly-only experimental API. (proc_macro_totokens)
Convert self directly into a TokenStream object. Read more
Sourceยง

fn into_token_stream(self) -> TokenStream
where Self: Sized,

๐Ÿ”ฌThis is a nightly-only experimental API. (proc_macro_totokens)
Convert self directly into a TokenStream object. Read more
Sourceยง

impl<T> ToTokens for Box<T>
where T: ToTokens + ?Sized,

Sourceยง

fn to_tokens(&self, tokens: &mut TokenStream)

Write self to the given TokenStream. Read more
Sourceยง

fn to_token_stream(&self) -> TokenStream

Convert self directly into a TokenStream object. Read more
Sourceยง

fn into_token_stream(self) -> TokenStream
where Self: Sized,

Convert self directly into a TokenStream object. Read more
Sourceยง

impl<T, C, const N: usize> TryComponentsAs<[C]> for Box<[T]>
where C: ArrayCast<Array = [T; N]>,

Sourceยง

type Error = SliceCastError

The error for when try_components_as fails to cast.
Sourceยง

fn try_components_as( &self, ) -> Result<&[C], <Box<[T]> as TryComponentsAs<[C]>>::Error>

Try to cast this collection of color components into a reference to a collection of colors. Read more
Sourceยง

impl<T, C, const N: usize> TryComponentsAsMut<[C]> for Box<[T]>
where C: ArrayCast<Array = [T; N]>,

Sourceยง

type Error = SliceCastError

The error for when try_components_as_mut fails to cast.
Sourceยง

fn try_components_as_mut( &mut self, ) -> Result<&mut [C], <Box<[T]> as TryComponentsAsMut<[C]>>::Error>

Try to cast this collection of color components into a mutable reference to a collection of colors. Read more
1.43.0 ยท Sourceยง

impl<T, const N: usize> TryFrom<Box<[T]>> for Box<[T; N]>

Sourceยง

fn try_from( boxed_slice: Box<[T]>, ) -> Result<Box<[T; N]>, <Box<[T; N]> as TryFrom<Box<[T]>>>::Error>

Attempts to convert a Box<[T]> into a Box<[T; N]>.

The conversion occurs in-place and does not require a new memory allocation.

ยงErrors

Returns the old Box<[T]> in the Err variant if boxed_slice.len() does not equal N.

Sourceยง

type Error = Box<[T]>

The type returned in the event of a conversion error.
1.66.0 ยท Sourceยง

impl<T, const N: usize> TryFrom<Vec<T>> for Box<[T; N]>

Available on non-no_global_oom_handling only.
Sourceยง

fn try_from( vec: Vec<T>, ) -> Result<Box<[T; N]>, <Box<[T; N]> as TryFrom<Vec<T>>>::Error>

Attempts to convert a Vec<T> into a Box<[T; N]>.

Like Vec::into_boxed_slice, this is in-place if vec.capacity() == N, but will require a reallocation otherwise.

ยงErrors

Returns the original Vec<T> in the Err variant if boxed_slice.len() does not equal N.

ยงExamples

This can be used with vec! to create an array on the heap:

let state: Box<[f32; 100]> = vec![1.0; 100].try_into().unwrap();
assert_eq!(state.len(), 100);
Sourceยง

type Error = Vec<T>

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

impl<'a, T, C> TryFromComponents<&'a Box<[T]>> for &'a [C]
where T: 'a, C: ArrayCast, <C as ArrayCast>::Array: ArrayExt<Item = T>,

Sourceยง

type Error = SliceCastError

The error for when try_from_components fails to cast.
Sourceยง

fn try_from_components( components: &'a Box<[T]>, ) -> Result<&'a [C], <&'a [C] as TryFromComponents<&'a Box<[T]>>>::Error>

Try to cast a collection of color components into an collection of colors. Read more
Sourceยง

impl<'a, T, C> TryFromComponents<&'a mut Box<[T]>> for &'a mut [C]
where T: 'a, C: ArrayCast, <C as ArrayCast>::Array: ArrayExt<Item = T>,

Sourceยง

type Error = SliceCastError

The error for when try_from_components fails to cast.
Sourceยง

fn try_from_components( components: &'a mut Box<[T]>, ) -> Result<&'a mut [C], <&'a mut [C] as TryFromComponents<&'a mut Box<[T]>>>::Error>

Try to cast a collection of color components into an collection of colors. Read more
Sourceยง

impl<T, C> TryFromComponents<Box<[T]>> for Box<[C]>
where C: ArrayCast, <C as ArrayCast>::Array: ArrayExt<Item = T>,

Available on crate feature alloc only.
Sourceยง

type Error = BoxedSliceCastError<T>

The error for when try_from_components fails to cast.
Sourceยง

fn try_from_components( components: Box<[T]>, ) -> Result<Box<[C]>, <Box<[C]> as TryFromComponents<Box<[T]>>>::Error>

Try to cast a collection of color components into an collection of colors. Read more
ยง

impl<T> Type for Box<T>
where T: Type + ?Sized,

ยง

const SIGNATURE: &'static Signature = T::SIGNATURE

The signature for the implementing type, in parsed format. Read more
ยง

impl<T> Type for Box<T>
where T: Type + ?Sized,

ยง

const SIGNATURE: &'static Signature = T::SIGNATURE

The signature for the implementing type, in parsed format. Read more
Sourceยง

impl<C> UintsAs<[C]> for Box<[<C as UintCast>::Uint]>
where C: UintCast,

Sourceยง

fn uints_as(&self) -> &[C]

Cast this collection of unsigned integers into a collection of colors.
Sourceยง

impl<C> UintsAsMut<[C]> for Box<[<C as UintCast>::Uint]>
where C: UintCast,

Sourceยง

fn uints_as_mut(&mut self) -> &mut [C]

Cast this collection of unsigned integers into a mutable collection of colors.
ยง

impl<'a, T, F> UnsafeFutureObj<'a, T> for Box<F>
where F: Future<Output = T> + 'a,

ยง

fn into_raw(self) -> *mut dyn Future<Output = T> + 'a

Convert an owned instance into a (conceptually owned) fat pointer. Read more
ยง

unsafe fn drop(ptr: *mut dyn Future<Output = T> + 'a)

Drops the future represented by the given fat pointer. Read more
ยง

impl<'a, T> UnsafeFutureObj<'a, T> for Box<dyn Future<Output = T> + 'a>
where T: 'a,

ยง

fn into_raw(self) -> *mut dyn Future<Output = T> + 'a

Convert an owned instance into a (conceptually owned) fat pointer. Read more
ยง

unsafe fn drop(ptr: *mut dyn Future<Output = T> + 'a)

Drops the future represented by the given fat pointer. Read more
ยง

impl<'a, T> UnsafeFutureObj<'a, T> for Box<dyn Future<Output = T> + Send + 'a>
where T: 'a,

ยง

fn into_raw(self) -> *mut dyn Future<Output = T> + 'a

Convert an owned instance into a (conceptually owned) fat pointer. Read more
ยง

unsafe fn drop(ptr: *mut dyn Future<Output = T> + 'a)

Drops the future represented by the given fat pointer. Read more
ยง

impl<'a, T, F> UnsafeFutureObj<'a, T> for Pin<Box<F>>
where F: Future<Output = T> + 'a,

ยง

fn into_raw(self) -> *mut dyn Future<Output = T> + 'a

Convert an owned instance into a (conceptually owned) fat pointer. Read more
ยง

unsafe fn drop(ptr: *mut dyn Future<Output = T> + 'a)

Drops the future represented by the given fat pointer. Read more
ยง

impl<'a, T> UnsafeFutureObj<'a, T> for Pin<Box<dyn Future<Output = T> + 'a>>
where T: 'a,

ยง

fn into_raw(self) -> *mut dyn Future<Output = T> + 'a

Convert an owned instance into a (conceptually owned) fat pointer. Read more
ยง

unsafe fn drop(ptr: *mut dyn Future<Output = T> + 'a)

Drops the future represented by the given fat pointer. Read more
ยง

impl<'a, T> UnsafeFutureObj<'a, T> for Pin<Box<dyn Future<Output = T> + Send + 'a>>
where T: 'a,

ยง

fn into_raw(self) -> *mut dyn Future<Output = T> + 'a

Convert an owned instance into a (conceptually owned) fat pointer. Read more
ยง

unsafe fn drop(ptr: *mut dyn Future<Output = T> + 'a)

Drops the future represented by the given fat pointer. Read more
ยง

impl<T> Value for Box<T>
where T: Value + ?Sized,

ยง

fn record(&self, key: &Field, visitor: &mut dyn Visit)

Visits this value with the given Visitor.
1.0.0 ยท Sourceยง

impl<W> Write for Box<W>
where W: Write + ?Sized,

Sourceยง

fn write(&mut self, buf: &[u8]) -> Result<usize, Error>

Writes a buffer into this writer, returning how many bytes were written. Read more
Sourceยง

fn write_vectored(&mut self, bufs: &[IoSlice<'_>]) -> Result<usize, Error>

Like write, except that it writes from a slice of buffers. Read more
Sourceยง

fn is_write_vectored(&self) -> bool

๐Ÿ”ฌThis is a nightly-only experimental API. (can_vector)
Determines if this Writer has an efficient write_vectored implementation. Read more
Sourceยง

fn flush(&mut self) -> Result<(), Error>

Flushes this output stream, ensuring that all intermediately buffered contents reach their destination. Read more
Sourceยง

fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>

Attempts to write an entire buffer into this writer. Read more
Sourceยง

fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>

๐Ÿ”ฌThis is a nightly-only experimental API. (write_all_vectored)
Attempts to write multiple buffers into this writer. Read more
Sourceยง

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

Writes a formatted string into this writer, returning any error encountered. Read more
1.0.0 ยท Sourceยง

fn by_ref(&mut self) -> &mut Self
where Self: Sized,

Creates a โ€œby referenceโ€ adapter for this instance of Write. Read more
ยง

impl WriteHalf for Box<dyn WriteHalf>

ยง

fn send_message<'life0, 'life1, 'async_trait>( &'life0 mut self, msg: &'life1 Message, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Box<dyn WriteHalf>: 'async_trait,

Send a message on the socket. Read more
ยง

fn sendmsg<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 mut self, buffer: &'life1 [u8], fds: &'life2 [BorrowedFd<'life3>], ) -> Pin<Box<dyn Future<Output = Result<usize, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, Box<dyn WriteHalf>: 'async_trait,

Attempt to send a message on the socket Read more
ยง

fn close<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Box<dyn WriteHalf>: 'async_trait,

Close the socket. Read more
ยง

fn can_pass_unix_fd(&self) -> bool

Whether passing file descriptors is supported. Read more
ยง

fn peer_credentials<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<ConnectionCredentials, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Box<dyn WriteHalf>: 'async_trait,

The peer credentials.
ยง

impl WriteHalf for Box<dyn WriteHalf>

ยง

fn send_message<'life0, 'life1, 'async_trait>( &'life0 mut self, msg: &'life1 Message, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Box<dyn WriteHalf>: 'async_trait,

Send a message on the socket. Read more
ยง

fn send_messages<'life0, 'life1, 'async_trait>( &'life0 mut self, msgs: &'life1 [Message], ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Box<dyn WriteHalf>: 'async_trait,

Send several messages on the socket, in order. Read more
ยง

fn sendmsg<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 mut self, buffer: &'life1 [u8], fds: &'life2 [BorrowedFd<'life3>], ) -> Pin<Box<dyn Future<Output = Result<usize, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, Box<dyn WriteHalf>: 'async_trait,

Attempt to send a message on the socket Read more
ยง

fn flush<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Box<dyn WriteHalf>: 'async_trait,

Flush whatever the socket holds on to of the bytes sendmsg was given. Read more
ยง

fn close<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Box<dyn WriteHalf>: 'async_trait,

Close the socket. Read more
ยง

fn can_pass_unix_fd(&self) -> bool

Whether passing file descriptors is supported. Read more
ยง

fn peer_credentials<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<ConnectionCredentials, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Box<dyn WriteHalf>: 'async_trait,

The peer credentials.
Sourceยง

impl<T, U, A> CoerceUnsized<Box<U, A>> for Box<T, A>
where T: Unsize<U> + ?Sized, A: Allocator, U: ?Sized,

Sourceยง

impl<T, A> DerefPure for Box<T, A>
where A: Allocator, T: ?Sized,

Sourceยง

impl<T, U> DispatchFromDyn<Box<U>> for Box<T>
where T: Unsize<U> + ?Sized, U: ?Sized,

1.0.0 ยท Sourceยง

impl<T, A> Eq for Box<T, A>
where T: Eq + ?Sized, A: Allocator,

ยง

impl<T> FromStream<T> for Box<[T]>

1.26.0 ยท Sourceยง

impl<I, A> FusedIterator for Box<I, A>
where I: FusedIterator + ?Sized, A: Allocator,

ยง

impl<T> IoSafe for Box<T>
where T: IoSafe + ?Sized,

1.80.0 ยท Sourceยง

impl<'a, I, A> !Iterator for &'a Box<[I], A>
where A: Allocator,

This implementation is required to make sure that the &Box<[I]>: IntoIterator implementation doesnโ€™t overlap with IntoIterator for T where T: Iterator blanket.

1.80.0 ยท Sourceยง

impl<'a, I, A> !Iterator for &'a mut Box<[I], A>
where A: Allocator,

This implementation is required to make sure that the &mut Box<[I]>: IntoIterator implementation doesnโ€™t overlap with IntoIterator for T where T: Iterator blanket.

1.80.0 ยท Sourceยง

impl<I, A> !Iterator for Box<[I], A>
where A: Allocator,

This implementation is required to make sure that the Box<[I]>: IntoIterator implementation doesnโ€™t overlap with IntoIterator for T where T: Iterator blanket.

Sourceยง

impl<T, A> PinCoerceUnsized for Box<T, A>
where A: Allocator, T: ?Sized,

1.33.0 ยท Sourceยง

impl<T, A> Unpin for Box<T, A>
where A: Allocator, T: ?Sized,

ยง

impl<T> ZeroableInOption for Box<T>
where T: ?Sized,

Available on crate feature extern_crate_alloc only.

Auto Trait Implementationsยง

ยง

impl<T, A> Freeze for Box<T, A>
where A: Freeze, T: ?Sized,

ยง

impl<T, A> RefUnwindSafe for Box<T, A>

ยง

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

ยง

impl<T, A> Sync for Box<T, A>
where A: Sync, T: Sync + ?Sized,

ยง

impl<T, A> UnsafeUnpin for Box<T, A>
where A: UnsafeUnpin, T: ?Sized,

ยง

impl<T, A> UnwindSafe for Box<T, A>
where A: UnwindSafe, 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>,

๐Ÿ‘ŽDeprecated since 0.7.7:

replaced by palette::chromatic_adaptation::AdaptIntoUnclamped

Convert the source color to the destination color using the specified method.
Sourceยง

fn adapt_into(self) -> D

๐Ÿ‘ŽDeprecated since 0.7.7:

replaced by palette::chromatic_adaptation::AdaptIntoUnclamped

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

impl<T> HasRawDisplayHandle for T
where T: HasDisplayHandle + ?Sized,

ยง

fn raw_display_handle(&self) -> Result<RawDisplayHandle, HandleError>

๐Ÿ‘ŽDeprecated:

Use HasDisplayHandle instead

ยง

impl<T> HasRawWindowHandle for T
where T: HasWindowHandle + ?Sized,

ยง

fn raw_window_handle(&self) -> Result<RawWindowHandle, HandleError>

๐Ÿ‘ŽDeprecated:

Use HasWindowHandle instead

ยง

impl<R> TryRngCore for R
where R: TryRng,

ยง

type Error = <R as TryRng>::Error

๐Ÿ‘ŽDeprecated since 0.10.0:

use TryRng instead

Error type.
ยง

impl<T, A, P> Access<T> for P
where A: Access<T> + ?Sized, P: Deref<Target = A>,

ยง

type Guard = <A as Access<T>>::Guard

A guard object containing the value and keeping it alive. Read more
ยง

fn load(&self) -> <P as Access<T>>::Guard

The loading method. Read more
Sourceยง

impl<T, C> AdaptIntoUnclamped<T> for C
where T: AdaptFromUnclamped<C>,

Sourceยง

type Scalar = <T as AdaptFromUnclamped<C>>::Scalar

The number type thatโ€™s used as the colorโ€™s components.
Sourceยง

fn adapt_into_unclamped_with<M>(self) -> T

Adapt a color of type Self into a color of type T, using the custom matrix M. Read more
Sourceยง

fn adapt_into_unclamped(self) -> T
where Bradford: LmsToXyz<Self::Scalar> + XyzToLms<Self::Scalar>,

Adapt a color of type Self into a color of type T, using the Bradford matrix. Read more
ยง

impl<T> Also for T

ยง

fn also<F>(self, block: F) -> Self
where F: FnOnce(&mut Self),

Apply a function to this value and return the (possibly) modified value.
Sourceยง

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

Sourceยง

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
ยง

impl<T> AnyEq for T
where T: Any + PartialEq,

ยง

fn equals(&self, other: &(dyn Any + 'static)) -> bool

ยง

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

ยง

impl<T, Res> Apply<Res> for T
where T: ?Sized,

ยง

fn apply<F>(self, f: F) -> Res
where F: FnOnce(Self) -> Res, Self: Sized,

Apply a function which takes the parameter by value.
ยง

fn apply_ref<F>(&self, f: F) -> Res
where F: FnOnce(&Self) -> Res,

Apply a function which takes the parameter by reference.
ยง

fn apply_mut<F>(&mut self, f: F) -> Res
where F: FnOnce(&mut Self) -> Res,

Apply a function which takes the parameter by mutable reference.
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<T> AsSource for T
where T: AsFd,

ยง

fn source(&self) -> BorrowedFd<'_>

Returns the borrowed file descriptor.
ยง

impl<R> AsyncBufReadExt for R
where R: AsyncBufRead + ?Sized,

ยง

fn fill_buf(&mut self) -> FillBuf<'_, Self> โ“˜
where Self: Unpin,

Returns the contents of the internal buffer, filling it with more data if empty. Read more
ยง

fn consume(&mut self, amt: usize)
where Self: Unpin,

Consumes amt buffered bytes. Read more
ยง

fn read_until<'a>( &'a mut self, byte: u8, buf: &'a mut Vec<u8>, ) -> ReadUntilFuture<'a, Self> โ“˜
where Self: Unpin,

Reads all bytes and appends them into buf until the delimiter byte or EOF is found. Read more
ยง

fn read_line<'a>(&'a mut self, buf: &'a mut String) -> ReadLineFuture<'a, Self> โ“˜
where Self: Unpin,

Reads all bytes and appends them into buf until a newline (the 0xA byte) or EOF is found. Read more
ยง

fn lines(self) -> Lines<Self>
where Self: Sized,

Returns a stream over the lines of this byte stream. Read more
ยง

fn split(self, byte: u8) -> Split<Self>
where Self: Sized,

Returns a stream over the contents of this reader split on the specified byte. Read more
ยง

impl<R> AsyncBufReadExt for R
where R: AsyncBufRead + ?Sized,

ยง

fn read_until<'a>( &'a mut self, byte: u8, buf: &'a mut Vec<u8>, ) -> ReadUntil<'a, Self>
where Self: Unpin,

Reads all bytes into buf until the delimiter byte or EOF is reached. Read more
ยง

fn read_line<'a>(&'a mut self, buf: &'a mut String) -> ReadLine<'a, Self>
where Self: Unpin,

Reads all bytes until a newline (the 0xA byte) is reached, and append them to the provided buffer. Read more
ยง

fn split(self, byte: u8) -> Split<Self>
where Self: Sized + Unpin,

Returns a stream of the contents of this reader split on the byte byte. Read more
ยง

fn fill_buf(&mut self) -> FillBuf<'_, Self>
where Self: Unpin,

Returns the contents of the internal buffer, filling it with more data from the inner reader if it is empty. Read more
ยง

fn consume(&mut self, amt: usize)
where Self: Unpin,

Tells this buffer that amt bytes have been consumed from the buffer, so they should no longer be returned in calls to read. Read more
ยง

fn lines(self) -> Lines<Self>
where Self: Sized,

Returns a stream over the lines of this reader. This method is the async equivalent to BufRead::lines. Read more
ยง

impl<R> AsyncBufReadExt for R
where R: AsyncBufRead + ?Sized,

ยง

fn fill_buf(&mut self) -> FillBuf<'_, Self> โ“˜
where Self: Unpin,

Creates a future which will wait for a non-empty buffer to be available from this I/O object or EOF to be reached. Read more
ยง

fn consume_unpin(&mut self, amt: usize)
where Self: Unpin,

A convenience for calling AsyncBufRead::consume on Unpin IO types. Read more
ยง

fn read_until<'a>( &'a mut self, byte: u8, buf: &'a mut Vec<u8>, ) -> ReadUntil<'a, Self> โ“˜
where Self: Unpin,

Creates a future which will read all the bytes associated with this I/O object into buf until the delimiter byte or EOF is reached. This method is the async equivalent to BufRead::read_until. Read more
ยง

fn read_line<'a>(&'a mut self, buf: &'a mut String) -> ReadLine<'a, Self> โ“˜
where Self: Unpin,

Creates a future which will read all the bytes associated with this I/O object into buf until a newline (the 0xA byte) or EOF is reached, This method is the async equivalent to BufRead::read_line. Read more
ยง

fn lines(self) -> Lines<Self>
where Self: Sized,

Returns a stream over the lines of this reader. This method is the async equivalent to BufRead::lines. Read more
ยง

impl<R> AsyncReadExt for R
where R: AsyncRead + ?Sized,

ยง

fn read<'a>(&'a mut self, buf: &'a mut [u8]) -> ReadFuture<'a, Self> โ“˜
where Self: Unpin,

Reads some bytes from the byte stream. Read more
ยง

fn read_vectored<'a>( &'a mut self, bufs: &'a mut [IoSliceMut<'a>], ) -> ReadVectoredFuture<'a, Self> โ“˜
where Self: Unpin,

Like [read()][AsyncReadExt::read()], except it reads into a slice of buffers. Read more
ยง

fn read_to_end<'a>( &'a mut self, buf: &'a mut Vec<u8>, ) -> ReadToEndFuture<'a, Self> โ“˜
where Self: Unpin,

Reads the entire contents and appends them to a Vec. Read more
ยง

fn read_to_string<'a>( &'a mut self, buf: &'a mut String, ) -> ReadToStringFuture<'a, Self> โ“˜
where Self: Unpin,

Reads the entire contents and appends them to a String. Read more
ยง

fn read_exact<'a>(&'a mut self, buf: &'a mut [u8]) -> ReadExactFuture<'a, Self> โ“˜
where Self: Unpin,

Reads the exact number of bytes required to fill buf. Read more
ยง

fn take(self, limit: u64) -> Take<Self>
where Self: Sized,

Creates an adapter which will read at most limit bytes from it. Read more
ยง

fn bytes(self) -> Bytes<Self>
where Self: Sized,

Converts this AsyncRead into a Stream of bytes. Read more
ยง

fn chain<R>(self, next: R) -> Chain<Self, R>
where R: AsyncRead, Self: Sized,

Creates an adapter which will chain this stream with another. Read more
ยง

fn boxed_reader<'a>(self) -> Pin<Box<dyn AsyncRead + Send + 'a>>
where Self: Sized + Send + 'a,

Available on crate feature alloc only.
Boxes the reader and changes its type to dyn AsyncRead + Send + 'a. Read more
ยง

impl<R> AsyncReadExt for R
where R: AsyncRead + ?Sized,

ยง

fn chain<R>(self, next: R) -> Chain<Self, R>
where Self: Sized, R: AsyncRead,

Creates a new AsyncRead instance that chains this stream with next. Read more
ยง

fn read<'a>(&'a mut self, buf: &'a mut [u8]) -> Read<'a, Self>
where Self: Unpin,

Pulls some bytes from this source into the specified buffer, returning how many bytes were read. Read more
ยง

fn read_buf<'a, B>(&'a mut self, buf: &'a mut B) -> ReadBuf<'a, Self, B>
where Self: Unpin, B: BufMut + ?Sized,

Pulls some bytes from this source into the specified buffer, advancing the bufferโ€™s internal cursor. Read more
ยง

fn read_exact<'a>(&'a mut self, buf: &'a mut [u8]) -> ReadExact<'a, Self>
where Self: Unpin,

Reads the exact number of bytes required to fill buf. Read more
ยง

fn read_u8(&mut self) -> ReadU8<&mut Self>
where Self: Unpin,

Reads an unsigned 8 bit integer from the underlying reader. Read more
ยง

fn read_i8(&mut self) -> ReadI8<&mut Self>
where Self: Unpin,

Reads a signed 8 bit integer from the underlying reader. Read more
ยง

fn read_u16(&mut self) -> ReadU16<&mut Self>
where Self: Unpin,

Reads an unsigned 16-bit integer in big-endian order from the underlying reader. Read more
ยง

fn read_i16(&mut self) -> ReadI16<&mut Self>
where Self: Unpin,

Reads a signed 16-bit integer in big-endian order from the underlying reader. Read more
ยง

fn read_u32(&mut self) -> ReadU32<&mut Self>
where Self: Unpin,

Reads an unsigned 32-bit integer in big-endian order from the underlying reader. Read more
ยง

fn read_i32(&mut self) -> ReadI32<&mut Self>
where Self: Unpin,

Reads a signed 32-bit integer in big-endian order from the underlying reader. Read more
ยง

fn read_u64(&mut self) -> ReadU64<&mut Self>
where Self: Unpin,

Reads an unsigned 64-bit integer in big-endian order from the underlying reader. Read more
ยง

fn read_i64(&mut self) -> ReadI64<&mut Self>
where Self: Unpin,

Reads an signed 64-bit integer in big-endian order from the underlying reader. Read more
ยง

fn read_u128(&mut self) -> ReadU128<&mut Self>
where Self: Unpin,

Reads an unsigned 128-bit integer in big-endian order from the underlying reader. Read more
ยง

fn read_i128(&mut self) -> ReadI128<&mut Self>
where Self: Unpin,

Reads an signed 128-bit integer in big-endian order from the underlying reader. Read more
ยง

fn read_f32(&mut self) -> ReadF32<&mut Self>
where Self: Unpin,

Reads an 32-bit floating point type in big-endian order from the underlying reader. Read more
ยง

fn read_f64(&mut self) -> ReadF64<&mut Self>
where Self: Unpin,

Reads an 64-bit floating point type in big-endian order from the underlying reader. Read more
ยง

fn read_u16_le(&mut self) -> ReadU16Le<&mut Self>
where Self: Unpin,

Reads an unsigned 16-bit integer in little-endian order from the underlying reader. Read more
ยง

fn read_i16_le(&mut self) -> ReadI16Le<&mut Self>
where Self: Unpin,

Reads a signed 16-bit integer in little-endian order from the underlying reader. Read more
ยง

fn read_u32_le(&mut self) -> ReadU32Le<&mut Self>
where Self: Unpin,

Reads an unsigned 32-bit integer in little-endian order from the underlying reader. Read more
ยง

fn read_i32_le(&mut self) -> ReadI32Le<&mut Self>
where Self: Unpin,

Reads a signed 32-bit integer in little-endian order from the underlying reader. Read more
ยง

fn read_u64_le(&mut self) -> ReadU64Le<&mut Self>
where Self: Unpin,

Reads an unsigned 64-bit integer in little-endian order from the underlying reader. Read more
ยง

fn read_i64_le(&mut self) -> ReadI64Le<&mut Self>
where Self: Unpin,

Reads an signed 64-bit integer in little-endian order from the underlying reader. Read more
ยง

fn read_u128_le(&mut self) -> ReadU128Le<&mut Self>
where Self: Unpin,

Reads an unsigned 128-bit integer in little-endian order from the underlying reader. Read more
ยง

fn read_i128_le(&mut self) -> ReadI128Le<&mut Self>
where Self: Unpin,

Reads an signed 128-bit integer in little-endian order from the underlying reader. Read more
ยง

fn read_f32_le(&mut self) -> ReadF32Le<&mut Self>
where Self: Unpin,

Reads an 32-bit floating point type in little-endian order from the underlying reader. Read more
ยง

fn read_f64_le(&mut self) -> ReadF64Le<&mut Self>
where Self: Unpin,

Reads an 64-bit floating point type in little-endian order from the underlying reader. Read more
ยง

fn read_to_end<'a>(&'a mut self, buf: &'a mut Vec<u8>) -> ReadToEnd<'a, Self>
where Self: Unpin,

Reads all bytes until EOF in this source, placing them into buf. Read more
ยง

fn read_to_string<'a>( &'a mut self, dst: &'a mut String, ) -> ReadToString<'a, Self>
where Self: Unpin,

Reads all bytes until EOF in this source, appending them to buf. Read more
ยง

fn take(self, limit: u64) -> Take<Self>
where Self: Sized,

Creates an adaptor which reads at most limit bytes from it. Read more
ยง

impl<R> AsyncReadExt for R
where R: AsyncRead + ?Sized,

ยง

fn chain<R>(self, next: R) -> Chain<Self, R>
where Self: Sized, R: AsyncRead,

Creates an adaptor which will chain this stream with another. Read more
ยง

fn read<'a>(&'a mut self, buf: &'a mut [u8]) -> Read<'a, Self> โ“˜
where Self: Unpin,

Tries to read some bytes directly into the given buf in asynchronous manner, returning a future type. Read more
ยง

fn read_vectored<'a>( &'a mut self, bufs: &'a mut [IoSliceMut<'a>], ) -> ReadVectored<'a, Self> โ“˜
where Self: Unpin,

Creates a future which will read from the AsyncRead into bufs using vectored IO operations. Read more
ยง

fn read_exact<'a>(&'a mut self, buf: &'a mut [u8]) -> ReadExact<'a, Self> โ“˜
where Self: Unpin,

Creates a future which will read exactly enough bytes to fill buf, returning an error if end of file (EOF) is hit sooner. Read more
ยง

fn read_to_end<'a>(&'a mut self, buf: &'a mut Vec<u8>) -> ReadToEnd<'a, Self> โ“˜
where Self: Unpin,

Creates a future which will read all the bytes from this AsyncRead. Read more
ยง

fn read_to_string<'a>( &'a mut self, buf: &'a mut String, ) -> ReadToString<'a, Self> โ“˜
where Self: Unpin,

Creates a future which will read all the bytes from this AsyncRead. Read more
ยง

fn split(self) -> (ReadHalf<Self>, WriteHalf<Self>)
where Self: Sized + AsyncWrite,

Helper method for splitting this read/write object into two halves. Read more
ยง

fn take(self, limit: u64) -> Take<Self>
where Self: Sized,

Creates an AsyncRead adapter which will read at most limit bytes from the underlying reader. Read more
ยง

impl<S> AsyncSeekExt for S
where S: AsyncSeek + ?Sized,

ยง

fn seek(&mut self, pos: SeekFrom) -> SeekFuture<'_, Self> โ“˜
where Self: Unpin,

Seeks to a new position in a byte stream. Read more
ยง

impl<S> AsyncSeekExt for S
where S: AsyncSeek + ?Sized,

ยง

fn seek(&mut self, pos: SeekFrom) -> Seek<'_, Self>
where Self: Unpin,

Creates a future which will seek an IO object, and then yield the new position in the object and the object itself. Read more
ยง

fn rewind(&mut self) -> Seek<'_, Self>
where Self: Unpin,

Creates a future which will rewind to the beginning of the stream. Read more
ยง

fn stream_position(&mut self) -> Seek<'_, Self>
where Self: Unpin,

Creates a future which will return the current seek position from the start of the stream. Read more
ยง

impl<S> AsyncSeekExt for S
where S: AsyncSeek + ?Sized,

ยง

fn seek(&mut self, pos: SeekFrom) -> Seek<'_, Self> โ“˜
where Self: Unpin,

Creates a future which will seek an IO object, and then yield the new position in the object and the object itself. Read more
ยง

fn stream_position(&mut self) -> Seek<'_, Self> โ“˜
where Self: Unpin,

Creates a future which will return the current seek position from the start of the stream. Read more
ยง

impl<W> AsyncWriteExt for W
where W: AsyncWrite + ?Sized,

ยง

fn write<'a>(&'a mut self, buf: &'a [u8]) -> WriteFuture<'a, Self> โ“˜
where Self: Unpin,

Writes some bytes into the byte stream. Read more
ยง

fn write_vectored<'a>( &'a mut self, bufs: &'a [IoSlice<'a>], ) -> WriteVectoredFuture<'a, Self> โ“˜
where Self: Unpin,

Like [write()][AsyncWriteExt::write()], except that it writes a slice of buffers. Read more
ยง

fn write_all<'a>(&'a mut self, buf: &'a [u8]) -> WriteAllFuture<'a, Self> โ“˜
where Self: Unpin,

Writes an entire buffer into the byte stream. Read more
ยง

fn flush(&mut self) -> FlushFuture<'_, Self> โ“˜
where Self: Unpin,

Flushes the stream to ensure that all buffered contents reach their destination. Read more
ยง

fn close(&mut self) -> CloseFuture<'_, Self> โ“˜
where Self: Unpin,

Closes the writer. Read more
ยง

fn boxed_writer<'a>(self) -> Pin<Box<dyn AsyncWrite + Send + 'a>>
where Self: Sized + Send + 'a,

Available on crate feature alloc only.
Boxes the writer and changes its type to dyn AsyncWrite + Send + 'a. Read more
ยง

impl<W> AsyncWriteExt for W
where W: AsyncWrite + ?Sized,

ยง

fn write<'a>(&'a mut self, src: &'a [u8]) -> Write<'a, Self>
where Self: Unpin,

Writes a buffer into this writer, returning how many bytes were written. Read more
ยง

fn write_vectored<'a, 'b>( &'a mut self, bufs: &'a [IoSlice<'b>], ) -> WriteVectored<'a, 'b, Self>
where Self: Unpin,

Like write, except that it writes from a slice of buffers. Read more
ยง

fn write_buf<'a, B>(&'a mut self, src: &'a mut B) -> WriteBuf<'a, Self, B>
where Self: Sized + Unpin, B: Buf,

Writes a buffer into this writer, advancing the bufferโ€™s internal cursor. Read more
ยง

fn write_all_buf<'a, B>( &'a mut self, src: &'a mut B, ) -> WriteAllBuf<'a, Self, B>
where Self: Sized + Unpin, B: Buf,

Attempts to write an entire buffer into this writer. Read more
ยง

fn write_all<'a>(&'a mut self, src: &'a [u8]) -> WriteAll<'a, Self>
where Self: Unpin,

Attempts to write an entire buffer into this writer. Read more
ยง

fn write_u8(&mut self, n: u8) -> WriteU8<&mut Self>
where Self: Unpin,

Writes an unsigned 8-bit integer to the underlying writer. Read more
ยง

fn write_i8(&mut self, n: i8) -> WriteI8<&mut Self>
where Self: Unpin,

Writes a signed 8-bit integer to the underlying writer. Read more
ยง

fn write_u16(&mut self, n: u16) -> WriteU16<&mut Self>
where Self: Unpin,

Writes an unsigned 16-bit integer in big-endian order to the underlying writer. Read more
ยง

fn write_i16(&mut self, n: i16) -> WriteI16<&mut Self>
where Self: Unpin,

Writes a signed 16-bit integer in big-endian order to the underlying writer. Read more
ยง

fn write_u32(&mut self, n: u32) -> WriteU32<&mut Self>
where Self: Unpin,

Writes an unsigned 32-bit integer in big-endian order to the underlying writer. Read more
ยง

fn write_i32(&mut self, n: i32) -> WriteI32<&mut Self>
where Self: Unpin,

Writes a signed 32-bit integer in big-endian order to the underlying writer. Read more
ยง

fn write_u64(&mut self, n: u64) -> WriteU64<&mut Self>
where Self: Unpin,

Writes an unsigned 64-bit integer in big-endian order to the underlying writer. Read more
ยง

fn write_i64(&mut self, n: i64) -> WriteI64<&mut Self>
where Self: Unpin,

Writes an signed 64-bit integer in big-endian order to the underlying writer. Read more
ยง

fn write_u128(&mut self, n: u128) -> WriteU128<&mut Self>
where Self: Unpin,

Writes an unsigned 128-bit integer in big-endian order to the underlying writer. Read more
ยง

fn write_i128(&mut self, n: i128) -> WriteI128<&mut Self>
where Self: Unpin,

Writes an signed 128-bit integer in big-endian order to the underlying writer. Read more
ยง

fn write_f32(&mut self, n: f32) -> WriteF32<&mut Self>
where Self: Unpin,

Writes an 32-bit floating point type in big-endian order to the underlying writer. Read more
ยง

fn write_f64(&mut self, n: f64) -> WriteF64<&mut Self>
where Self: Unpin,

Writes an 64-bit floating point type in big-endian order to the underlying writer. Read more
ยง

fn write_u16_le(&mut self, n: u16) -> WriteU16Le<&mut Self>
where Self: Unpin,

Writes an unsigned 16-bit integer in little-endian order to the underlying writer. Read more
ยง

fn write_i16_le(&mut self, n: i16) -> WriteI16Le<&mut Self>
where Self: Unpin,

Writes a signed 16-bit integer in little-endian order to the underlying writer. Read more
ยง

fn write_u32_le(&mut self, n: u32) -> WriteU32Le<&mut Self>
where Self: Unpin,

Writes an unsigned 32-bit integer in little-endian order to the underlying writer. Read more
ยง

fn write_i32_le(&mut self, n: i32) -> WriteI32Le<&mut Self>
where Self: Unpin,

Writes a signed 32-bit integer in little-endian order to the underlying writer. Read more
ยง

fn write_u64_le(&mut self, n: u64) -> WriteU64Le<&mut Self>
where Self: Unpin,

Writes an unsigned 64-bit integer in little-endian order to the underlying writer. Read more
ยง

fn write_i64_le(&mut self, n: i64) -> WriteI64Le<&mut Self>
where Self: Unpin,

Writes an signed 64-bit integer in little-endian order to the underlying writer. Read more
ยง

fn write_u128_le(&mut self, n: u128) -> WriteU128Le<&mut Self>
where Self: Unpin,

Writes an unsigned 128-bit integer in little-endian order to the underlying writer. Read more
ยง

fn write_i128_le(&mut self, n: i128) -> WriteI128Le<&mut Self>
where Self: Unpin,

Writes an signed 128-bit integer in little-endian order to the underlying writer. Read more
ยง

fn write_f32_le(&mut self, n: f32) -> WriteF32Le<&mut Self>
where Self: Unpin,

Writes an 32-bit floating point type in little-endian order to the underlying writer. Read more
ยง

fn write_f64_le(&mut self, n: f64) -> WriteF64Le<&mut Self>
where Self: Unpin,

Writes an 64-bit floating point type in little-endian order to the underlying writer. Read more
ยง

fn flush(&mut self) -> Flush<'_, Self>
where Self: Unpin,

Flushes this output stream, ensuring that all intermediately buffered contents reach their destination. Read more
ยง

fn shutdown(&mut self) -> Shutdown<'_, Self>
where Self: Unpin,

Shuts down the output stream, ensuring that the value can be dropped cleanly. Read more
ยง

impl<W> AsyncWriteExt for W
where W: AsyncWrite + ?Sized,

ยง

fn flush(&mut self) -> Flush<'_, Self> โ“˜
where Self: Unpin,

Creates a future which will entirely flush this AsyncWrite. Read more
ยง

fn close(&mut self) -> Close<'_, Self> โ“˜
where Self: Unpin,

Creates a future which will entirely close this AsyncWrite.
ยง

fn write<'a>(&'a mut self, buf: &'a [u8]) -> Write<'a, Self> โ“˜
where Self: Unpin,

Creates a future which will write bytes from buf into the object. Read more
ยง

fn write_vectored<'a>( &'a mut self, bufs: &'a [IoSlice<'a>], ) -> WriteVectored<'a, Self> โ“˜
where Self: Unpin,

Creates a future which will write bytes from bufs into the object using vectored IO operations. Read more
ยง

fn write_all<'a>(&'a mut self, buf: &'a [u8]) -> WriteAll<'a, Self> โ“˜
where Self: Unpin,

Write data into this object. Read more
ยง

fn into_sink<Item>(self) -> IntoSink<Self, Item>
where Item: AsRef<[u8]>, Self: Sized,

Available on crate feature sink only.
Allow using an AsyncWrite as a Sink<Item: AsRef<[u8]>>. 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.
ยง

impl<T, C, State, Message> BootFn<State, Message> for T
where T: Fn() -> C, C: IntoBoot<State, Message>,

ยง

fn boot(&self) -> (State, Task<Message>)

Initializes the Application state.
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<B> BufReadExt for B
where B: BufRead,

ยง

fn byte_lines(self) -> ByteLines<Self>
where Self: Sized,

Returns an iterator over the lines of this reader, where each line is represented as a byte string. Read more
ยง

fn byte_records(self, terminator: u8) -> ByteRecords<Self>
where Self: Sized,

Returns an iterator over byte-terminated records of this reader, where each record is represented as a byte string. Read more
ยง

fn for_byte_line<F>(&mut self, for_each_line: F) -> Result<(), Error>
where Self: Sized, F: FnMut(&[u8]) -> Result<bool, Error>,

Executes the given closure on each line in the underlying reader. Read more
ยง

fn for_byte_record<F>( &mut self, terminator: u8, for_each_record: F, ) -> Result<(), Error>
where Self: Sized, F: FnMut(&[u8]) -> Result<bool, Error>,

Executes the given closure on each byte-terminated record in the underlying reader. Read more
ยง

fn for_byte_line_with_terminator<F>( &mut self, for_each_line: F, ) -> Result<(), Error>
where Self: Sized, F: FnMut(&[u8]) -> Result<bool, Error>,

Executes the given closure on each line in the underlying reader. Read more
ยง

fn for_byte_record_with_terminator<F>( &mut self, terminator: u8, for_each_record: F, ) -> Result<(), Error>
where Self: Sized, F: FnMut(&[u8]) -> Result<bool, Error>,

Executes the given closure on each byte-terminated record in the underlying reader. Read more
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.
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.
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> ConnectionExt for C
where C: ConnectionExt + ?Sized,

ยง

fn change_property8<A, B>( &self, mode: PropMode, window: u32, property: A, type_: B, data: &[u8], ) -> Result<VoidCookie<'_, Self>, ConnectionError>
where A: Into<u32>, B: Into<u32>,

Change a property on a window with format 8.
ยง

fn change_property16<A, B>( &self, mode: PropMode, window: u32, property: A, type_: B, data: &[u16], ) -> Result<VoidCookie<'_, Self>, ConnectionError>
where A: Into<u32>, B: Into<u32>,

Change a property on a window with format 16.
ยง

fn change_property32<A, B>( &self, mode: PropMode, window: u32, property: A, type_: B, data: &[u32], ) -> Result<VoidCookie<'_, Self>, ConnectionError>
where A: Into<u32>, B: Into<u32>,

Change a property on a window with format 32.
ยง

fn sync(&self) -> Result<(), ReplyError>

Synchronise with the X11 server. Read more
ยง

impl<C> ConnectionExt for C
where C: RequestConnection + ?Sized,

ยง

fn create_window<'c, 'input>( &'c self, depth: u8, wid: u32, parent: u32, x: i16, y: i16, width: u16, height: u16, border_width: u16, class: WindowClass, visual: u32, value_list: &'input CreateWindowAux, ) -> Result<VoidCookie<'c, Self>, ConnectionError>

Creates a window. Read more
ยง

fn change_window_attributes<'c, 'input>( &'c self, window: u32, value_list: &'input ChangeWindowAttributesAux, ) -> Result<VoidCookie<'c, Self>, ConnectionError>

change window attributes. Read more
ยง

fn get_window_attributes( &self, window: u32, ) -> Result<Cookie<'_, Self, GetWindowAttributesReply>, ConnectionError>

Gets window attributes. Read more
ยง

fn destroy_window( &self, window: u32, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

Destroys a window. Read more
ยง

fn destroy_subwindows( &self, window: u32, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn change_save_set( &self, mode: SetMode, window: u32, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

Changes a clientโ€™s save set. Read more
ยง

fn reparent_window( &self, window: u32, parent: u32, x: i16, y: i16, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

Reparents a window. Read more
ยง

fn map_window( &self, window: u32, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

Makes a window visible. Read more
ยง

fn map_subwindows( &self, window: u32, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn unmap_window( &self, window: u32, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

Makes a window invisible. Read more
ยง

fn unmap_subwindows( &self, window: u32, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn configure_window<'c, 'input>( &'c self, window: u32, value_list: &'input ConfigureWindowAux, ) -> Result<VoidCookie<'c, Self>, ConnectionError>

Configures window attributes. Read more
ยง

fn circulate_window( &self, direction: Circulate, window: u32, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

Change window stacking order. Read more
ยง

fn get_geometry( &self, drawable: u32, ) -> Result<Cookie<'_, Self, GetGeometryReply>, ConnectionError>

Get current window geometry. Read more
ยง

fn query_tree( &self, window: u32, ) -> Result<Cookie<'_, Self, QueryTreeReply>, ConnectionError>

query the window tree. Read more
ยง

fn intern_atom<'c, 'input>( &'c self, only_if_exists: bool, name: &'input [u8], ) -> Result<Cookie<'c, Self, InternAtomReply>, ConnectionError>

Get atom identifier by name. Read more
ยง

fn get_atom_name( &self, atom: u32, ) -> Result<Cookie<'_, Self, GetAtomNameReply>, ConnectionError>

ยง

fn change_property<'c, 'input, A, B>( &'c self, mode: PropMode, window: u32, property: A, type_: B, format: u8, data_len: u32, data: &'input [u8], ) -> Result<VoidCookie<'c, Self>, ConnectionError>
where A: Into<u32>, B: Into<u32>,

Changes a window property. Read more
ยง

fn delete_property( &self, window: u32, property: u32, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn get_property<A, B>( &self, delete: bool, window: u32, property: A, type_: B, long_offset: u32, long_length: u32, ) -> Result<Cookie<'_, Self, GetPropertyReply>, ConnectionError>
where A: Into<u32>, B: Into<u32>,

Gets a window property. Read more
ยง

fn list_properties( &self, window: u32, ) -> Result<Cookie<'_, Self, ListPropertiesReply>, ConnectionError>

ยง

fn set_selection_owner<A, B>( &self, owner: A, selection: u32, time: B, ) -> Result<VoidCookie<'_, Self>, ConnectionError>
where A: Into<u32>, B: Into<u32>,

Sets the owner of a selection. Read more
ยง

fn get_selection_owner( &self, selection: u32, ) -> Result<Cookie<'_, Self, GetSelectionOwnerReply>, ConnectionError>

Gets the owner of a selection. Read more
ยง

fn convert_selection<A, B>( &self, requestor: u32, selection: u32, target: u32, property: A, time: B, ) -> Result<VoidCookie<'_, Self>, ConnectionError>
where A: Into<u32>, B: Into<u32>,

ยง

fn send_event<A, B>( &self, propagate: bool, destination: A, event_mask: EventMask, event: B, ) -> Result<VoidCookie<'_, Self>, ConnectionError>
where A: Into<u32>, B: Into<[u8; 32]>,

send an event. Read more
ยง

fn grab_pointer<A, B, C>( &self, owner_events: bool, grab_window: u32, event_mask: EventMask, pointer_mode: GrabMode, keyboard_mode: GrabMode, confine_to: A, cursor: B, time: C, ) -> Result<Cookie<'_, Self, GrabPointerReply>, ConnectionError>
where A: Into<u32>, B: Into<u32>, C: Into<u32>,

Grab the pointer. Read more
ยง

fn ungrab_pointer<A>( &self, time: A, ) -> Result<VoidCookie<'_, Self>, ConnectionError>
where A: Into<u32>,

release the pointer. Read more
ยง

fn grab_button<A, B>( &self, owner_events: bool, grab_window: u32, event_mask: EventMask, pointer_mode: GrabMode, keyboard_mode: GrabMode, confine_to: A, cursor: B, button: ButtonIndex, modifiers: ModMask, ) -> Result<VoidCookie<'_, Self>, ConnectionError>
where A: Into<u32>, B: Into<u32>,

Grab pointer button(s). Read more
ยง

fn ungrab_button( &self, button: ButtonIndex, grab_window: u32, modifiers: ModMask, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn change_active_pointer_grab<A, B>( &self, cursor: A, time: B, event_mask: EventMask, ) -> Result<VoidCookie<'_, Self>, ConnectionError>
where A: Into<u32>, B: Into<u32>,

ยง

fn grab_keyboard<A>( &self, owner_events: bool, grab_window: u32, time: A, pointer_mode: GrabMode, keyboard_mode: GrabMode, ) -> Result<Cookie<'_, Self, GrabKeyboardReply>, ConnectionError>
where A: Into<u32>,

Grab the keyboard. Read more
ยง

fn ungrab_keyboard<A>( &self, time: A, ) -> Result<VoidCookie<'_, Self>, ConnectionError>
where A: Into<u32>,

ยง

fn grab_key<A>( &self, owner_events: bool, grab_window: u32, modifiers: ModMask, key: A, pointer_mode: GrabMode, keyboard_mode: GrabMode, ) -> Result<VoidCookie<'_, Self>, ConnectionError>
where A: Into<u8>,

Grab keyboard key(s). Read more
ยง

fn ungrab_key<A>( &self, key: A, grab_window: u32, modifiers: ModMask, ) -> Result<VoidCookie<'_, Self>, ConnectionError>
where A: Into<u8>,

release a key combination. Read more
ยง

fn allow_events<A>( &self, mode: Allow, time: A, ) -> Result<VoidCookie<'_, Self>, ConnectionError>
where A: Into<u32>,

release queued events. Read more
ยง

fn grab_server(&self) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn ungrab_server(&self) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn query_pointer( &self, window: u32, ) -> Result<Cookie<'_, Self, QueryPointerReply>, ConnectionError>

get pointer coordinates. Read more
ยง

fn get_motion_events<A, B>( &self, window: u32, start: A, stop: B, ) -> Result<Cookie<'_, Self, GetMotionEventsReply>, ConnectionError>
where A: Into<u32>, B: Into<u32>,

ยง

fn translate_coordinates( &self, src_window: u32, dst_window: u32, src_x: i16, src_y: i16, ) -> Result<Cookie<'_, Self, TranslateCoordinatesReply>, ConnectionError>

ยง

fn warp_pointer<A, B>( &self, src_window: A, dst_window: B, src_x: i16, src_y: i16, src_width: u16, src_height: u16, dst_x: i16, dst_y: i16, ) -> Result<VoidCookie<'_, Self>, ConnectionError>
where A: Into<u32>, B: Into<u32>,

move mouse pointer. Read more
ยง

fn set_input_focus<A, B>( &self, revert_to: InputFocus, focus: A, time: B, ) -> Result<VoidCookie<'_, Self>, ConnectionError>
where A: Into<u32>, B: Into<u32>,

Sets input focus. Read more
ยง

fn get_input_focus( &self, ) -> Result<Cookie<'_, Self, GetInputFocusReply>, ConnectionError>

ยง

fn query_keymap( &self, ) -> Result<Cookie<'_, Self, QueryKeymapReply>, ConnectionError>

ยง

fn open_font<'c, 'input>( &'c self, fid: u32, name: &'input [u8], ) -> Result<VoidCookie<'c, Self>, ConnectionError>

opens a font. Read more
ยง

fn close_font(&self, font: u32) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn query_font( &self, font: u32, ) -> Result<Cookie<'_, Self, QueryFontReply>, ConnectionError>

query font metrics. Read more
ยง

fn query_text_extents<'c, 'input>( &'c self, font: u32, string: &'input [Char2b], ) -> Result<Cookie<'c, Self, QueryTextExtentsReply>, ConnectionError>

get text extents. Read more
ยง

fn list_fonts<'c, 'input>( &'c self, max_names: u16, pattern: &'input [u8], ) -> Result<Cookie<'c, Self, ListFontsReply>, ConnectionError>

get matching font names. Read more
ยง

fn list_fonts_with_info<'c, 'input>( &'c self, max_names: u16, pattern: &'input [u8], ) -> Result<ListFontsWithInfoCookie<'c, Self>, ConnectionError>

get matching font names and information. Read more
ยง

fn set_font_path<'c, 'input>( &'c self, font: &'input [Str], ) -> Result<VoidCookie<'c, Self>, ConnectionError>

ยง

fn get_font_path( &self, ) -> Result<Cookie<'_, Self, GetFontPathReply>, ConnectionError>

ยง

fn create_pixmap( &self, depth: u8, pid: u32, drawable: u32, width: u16, height: u16, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

Creates a pixmap. Read more
ยง

fn free_pixmap( &self, pixmap: u32, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

Destroys a pixmap. Read more
ยง

fn create_gc<'c, 'input>( &'c self, cid: u32, drawable: u32, value_list: &'input CreateGCAux, ) -> Result<VoidCookie<'c, Self>, ConnectionError>

Creates a graphics context. Read more
ยง

fn change_gc<'c, 'input>( &'c self, gc: u32, value_list: &'input ChangeGCAux, ) -> Result<VoidCookie<'c, Self>, ConnectionError>

change graphics context components. Read more
ยง

fn copy_gc( &self, src_gc: u32, dst_gc: u32, value_mask: GC, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn set_dashes<'c, 'input>( &'c self, gc: u32, dash_offset: u16, dashes: &'input [u8], ) -> Result<VoidCookie<'c, Self>, ConnectionError>

ยง

fn set_clip_rectangles<'c, 'input>( &'c self, ordering: ClipOrdering, gc: u32, clip_x_origin: i16, clip_y_origin: i16, rectangles: &'input [Rectangle], ) -> Result<VoidCookie<'c, Self>, ConnectionError>

ยง

fn free_gc(&self, gc: u32) -> Result<VoidCookie<'_, Self>, ConnectionError>

Destroys a graphics context. Read more
ยง

fn clear_area( &self, exposures: bool, window: u32, x: i16, y: i16, width: u16, height: u16, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn copy_area( &self, src_drawable: u32, dst_drawable: u32, gc: u32, src_x: i16, src_y: i16, dst_x: i16, dst_y: i16, width: u16, height: u16, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

copy areas. Read more
ยง

fn copy_plane( &self, src_drawable: u32, dst_drawable: u32, gc: u32, src_x: i16, src_y: i16, dst_x: i16, dst_y: i16, width: u16, height: u16, bit_plane: u32, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn poly_point<'c, 'input>( &'c self, coordinate_mode: CoordMode, drawable: u32, gc: u32, points: &'input [Point], ) -> Result<VoidCookie<'c, Self>, ConnectionError>

ยง

fn poly_line<'c, 'input>( &'c self, coordinate_mode: CoordMode, drawable: u32, gc: u32, points: &'input [Point], ) -> Result<VoidCookie<'c, Self>, ConnectionError>

draw lines. Read more
ยง

fn poly_segment<'c, 'input>( &'c self, drawable: u32, gc: u32, segments: &'input [Segment], ) -> Result<VoidCookie<'c, Self>, ConnectionError>

draw lines. Read more
ยง

fn poly_rectangle<'c, 'input>( &'c self, drawable: u32, gc: u32, rectangles: &'input [Rectangle], ) -> Result<VoidCookie<'c, Self>, ConnectionError>

ยง

fn poly_arc<'c, 'input>( &'c self, drawable: u32, gc: u32, arcs: &'input [Arc], ) -> Result<VoidCookie<'c, Self>, ConnectionError>

ยง

fn fill_poly<'c, 'input>( &'c self, drawable: u32, gc: u32, shape: PolyShape, coordinate_mode: CoordMode, points: &'input [Point], ) -> Result<VoidCookie<'c, Self>, ConnectionError>

ยง

fn poly_fill_rectangle<'c, 'input>( &'c self, drawable: u32, gc: u32, rectangles: &'input [Rectangle], ) -> Result<VoidCookie<'c, Self>, ConnectionError>

Fills rectangles. Read more
ยง

fn poly_fill_arc<'c, 'input>( &'c self, drawable: u32, gc: u32, arcs: &'input [Arc], ) -> Result<VoidCookie<'c, Self>, ConnectionError>

ยง

fn put_image<'c, 'input>( &'c self, format: ImageFormat, drawable: u32, gc: u32, width: u16, height: u16, dst_x: i16, dst_y: i16, left_pad: u8, depth: u8, data: &'input [u8], ) -> Result<VoidCookie<'c, Self>, ConnectionError>

ยง

fn get_image( &self, format: ImageFormat, drawable: u32, x: i16, y: i16, width: u16, height: u16, plane_mask: u32, ) -> Result<Cookie<'_, Self, GetImageReply>, ConnectionError>

ยง

fn poly_text8<'c, 'input>( &'c self, drawable: u32, gc: u32, x: i16, y: i16, items: &'input [u8], ) -> Result<VoidCookie<'c, Self>, ConnectionError>

ยง

fn poly_text16<'c, 'input>( &'c self, drawable: u32, gc: u32, x: i16, y: i16, items: &'input [u8], ) -> Result<VoidCookie<'c, Self>, ConnectionError>

ยง

fn image_text8<'c, 'input>( &'c self, drawable: u32, gc: u32, x: i16, y: i16, string: &'input [u8], ) -> Result<VoidCookie<'c, Self>, ConnectionError>

Draws text. Read more
ยง

fn image_text16<'c, 'input>( &'c self, drawable: u32, gc: u32, x: i16, y: i16, string: &'input [Char2b], ) -> Result<VoidCookie<'c, Self>, ConnectionError>

Draws text. Read more
ยง

fn create_colormap( &self, alloc: ColormapAlloc, mid: u32, window: u32, visual: u32, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn free_colormap( &self, cmap: u32, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn copy_colormap_and_free( &self, mid: u32, src_cmap: u32, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn install_colormap( &self, cmap: u32, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn uninstall_colormap( &self, cmap: u32, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn list_installed_colormaps( &self, window: u32, ) -> Result<Cookie<'_, Self, ListInstalledColormapsReply>, ConnectionError>

ยง

fn alloc_color( &self, cmap: u32, red: u16, green: u16, blue: u16, ) -> Result<Cookie<'_, Self, AllocColorReply>, ConnectionError>

Allocate a color. Read more
ยง

fn alloc_named_color<'c, 'input>( &'c self, cmap: u32, name: &'input [u8], ) -> Result<Cookie<'c, Self, AllocNamedColorReply>, ConnectionError>

ยง

fn alloc_color_cells( &self, contiguous: bool, cmap: u32, colors: u16, planes: u16, ) -> Result<Cookie<'_, Self, AllocColorCellsReply>, ConnectionError>

ยง

fn alloc_color_planes( &self, contiguous: bool, cmap: u32, colors: u16, reds: u16, greens: u16, blues: u16, ) -> Result<Cookie<'_, Self, AllocColorPlanesReply>, ConnectionError>

ยง

fn free_colors<'c, 'input>( &'c self, cmap: u32, plane_mask: u32, pixels: &'input [u32], ) -> Result<VoidCookie<'c, Self>, ConnectionError>

ยง

fn store_colors<'c, 'input>( &'c self, cmap: u32, items: &'input [Coloritem], ) -> Result<VoidCookie<'c, Self>, ConnectionError>

ยง

fn store_named_color<'c, 'input>( &'c self, flags: ColorFlag, cmap: u32, pixel: u32, name: &'input [u8], ) -> Result<VoidCookie<'c, Self>, ConnectionError>

ยง

fn query_colors<'c, 'input>( &'c self, cmap: u32, pixels: &'input [u32], ) -> Result<Cookie<'c, Self, QueryColorsReply>, ConnectionError>

ยง

fn lookup_color<'c, 'input>( &'c self, cmap: u32, name: &'input [u8], ) -> Result<Cookie<'c, Self, LookupColorReply>, ConnectionError>

ยง

fn create_cursor<A>( &self, cid: u32, source: u32, mask: A, fore_red: u16, fore_green: u16, fore_blue: u16, back_red: u16, back_green: u16, back_blue: u16, x: u16, y: u16, ) -> Result<VoidCookie<'_, Self>, ConnectionError>
where A: Into<u32>,

ยง

fn create_glyph_cursor<A>( &self, cid: u32, source_font: u32, mask_font: A, source_char: u16, mask_char: u16, fore_red: u16, fore_green: u16, fore_blue: u16, back_red: u16, back_green: u16, back_blue: u16, ) -> Result<VoidCookie<'_, Self>, ConnectionError>
where A: Into<u32>,

create cursor. Read more
ยง

fn free_cursor( &self, cursor: u32, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

Deletes a cursor. Read more
ยง

fn recolor_cursor( &self, cursor: u32, fore_red: u16, fore_green: u16, fore_blue: u16, back_red: u16, back_green: u16, back_blue: u16, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn query_best_size( &self, class: QueryShapeOf, drawable: u32, width: u16, height: u16, ) -> Result<Cookie<'_, Self, QueryBestSizeReply>, ConnectionError>

ยง

fn query_extension<'c, 'input>( &'c self, name: &'input [u8], ) -> Result<Cookie<'c, Self, QueryExtensionReply>, ConnectionError>

check if extension is present. Read more
ยง

fn list_extensions( &self, ) -> Result<Cookie<'_, Self, ListExtensionsReply>, ConnectionError>

ยง

fn change_keyboard_mapping<'c, 'input>( &'c self, keycode_count: u8, first_keycode: u8, keysyms_per_keycode: u8, keysyms: &'input [u32], ) -> Result<VoidCookie<'c, Self>, ConnectionError>

ยง

fn get_keyboard_mapping( &self, first_keycode: u8, count: u8, ) -> Result<Cookie<'_, Self, GetKeyboardMappingReply>, ConnectionError>

ยง

fn change_keyboard_control<'c, 'input>( &'c self, value_list: &'input ChangeKeyboardControlAux, ) -> Result<VoidCookie<'c, Self>, ConnectionError>

ยง

fn get_keyboard_control( &self, ) -> Result<Cookie<'_, Self, GetKeyboardControlReply>, ConnectionError>

ยง

fn bell(&self, percent: i8) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn change_pointer_control( &self, acceleration_numerator: i16, acceleration_denominator: i16, threshold: i16, do_acceleration: bool, do_threshold: bool, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn get_pointer_control( &self, ) -> Result<Cookie<'_, Self, GetPointerControlReply>, ConnectionError>

ยง

fn set_screen_saver( &self, timeout: i16, interval: i16, prefer_blanking: Blanking, allow_exposures: Exposures, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn get_screen_saver( &self, ) -> Result<Cookie<'_, Self, GetScreenSaverReply>, ConnectionError>

ยง

fn change_hosts<'c, 'input>( &'c self, mode: HostMode, family: Family, address: &'input [u8], ) -> Result<VoidCookie<'c, Self>, ConnectionError>

ยง

fn list_hosts( &self, ) -> Result<Cookie<'_, Self, ListHostsReply>, ConnectionError>

ยง

fn set_access_control( &self, mode: AccessControl, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn set_close_down_mode( &self, mode: CloseDown, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn kill_client<A>( &self, resource: A, ) -> Result<VoidCookie<'_, Self>, ConnectionError>
where A: Into<u32>,

kills a client. Read more
ยง

fn rotate_properties<'c, 'input>( &'c self, window: u32, delta: i16, atoms: &'input [u32], ) -> Result<VoidCookie<'c, Self>, ConnectionError>

ยง

fn force_screen_saver( &self, mode: ScreenSaver, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn set_pointer_mapping<'c, 'input>( &'c self, map: &'input [u8], ) -> Result<Cookie<'c, Self, SetPointerMappingReply>, ConnectionError>

ยง

fn get_pointer_mapping( &self, ) -> Result<Cookie<'_, Self, GetPointerMappingReply>, ConnectionError>

ยง

fn set_modifier_mapping<'c, 'input>( &'c self, keycodes: &'input [u8], ) -> Result<Cookie<'c, Self, SetModifierMappingReply>, ConnectionError>

ยง

fn get_modifier_mapping( &self, ) -> Result<Cookie<'_, Self, GetModifierMappingReply>, ConnectionError>

ยง

fn no_operation(&self) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

impl<C> ConnectionExt for C
where C: RequestConnection + ?Sized,

ยง

fn xc_misc_get_version( &self, client_major_version: u16, client_minor_version: u16, ) -> Result<Cookie<'_, Self, GetVersionReply>, ConnectionError>

ยง

fn xc_misc_get_xid_range( &self, ) -> Result<Cookie<'_, Self, GetXIDRangeReply>, ConnectionError>

ยง

fn xc_misc_get_xid_list( &self, count: u32, ) -> Result<Cookie<'_, Self, GetXIDListReply>, ConnectionError>

ยง

impl<C> ConnectionExt for C
where C: RequestConnection + ?Sized,

ยง

fn xfixes_query_version( &self, client_major_version: u32, client_minor_version: u32, ) -> Result<Cookie<'_, Self, QueryVersionReply>, ConnectionError>

ยง

fn xfixes_change_save_set( &self, mode: SaveSetMode, target: SaveSetTarget, map: SaveSetMapping, window: u32, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn xfixes_select_selection_input( &self, window: u32, selection: u32, event_mask: SelectionEventMask, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn xfixes_select_cursor_input( &self, window: u32, event_mask: CursorNotifyMask, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn xfixes_get_cursor_image( &self, ) -> Result<Cookie<'_, Self, GetCursorImageReply>, ConnectionError>

ยง

fn xfixes_create_region<'c, 'input>( &'c self, region: u32, rectangles: &'input [Rectangle], ) -> Result<VoidCookie<'c, Self>, ConnectionError>

ยง

fn xfixes_create_region_from_bitmap( &self, region: u32, bitmap: u32, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn xfixes_create_region_from_window( &self, region: u32, window: u32, kind: SK, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn xfixes_create_region_from_gc( &self, region: u32, gc: u32, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn xfixes_create_region_from_picture( &self, region: u32, picture: u32, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn xfixes_destroy_region( &self, region: u32, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn xfixes_set_region<'c, 'input>( &'c self, region: u32, rectangles: &'input [Rectangle], ) -> Result<VoidCookie<'c, Self>, ConnectionError>

ยง

fn xfixes_copy_region( &self, source: u32, destination: u32, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn xfixes_union_region( &self, source1: u32, source2: u32, destination: u32, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn xfixes_intersect_region( &self, source1: u32, source2: u32, destination: u32, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn xfixes_subtract_region( &self, source1: u32, source2: u32, destination: u32, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn xfixes_invert_region( &self, source: u32, bounds: Rectangle, destination: u32, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn xfixes_translate_region( &self, region: u32, dx: i16, dy: i16, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn xfixes_region_extents( &self, source: u32, destination: u32, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn xfixes_fetch_region( &self, region: u32, ) -> Result<Cookie<'_, Self, FetchRegionReply>, ConnectionError>

ยง

fn xfixes_set_gc_clip_region<A>( &self, gc: u32, region: A, x_origin: i16, y_origin: i16, ) -> Result<VoidCookie<'_, Self>, ConnectionError>
where A: Into<u32>,

ยง

fn xfixes_set_window_shape_region<A>( &self, dest: u32, dest_kind: SK, x_offset: i16, y_offset: i16, region: A, ) -> Result<VoidCookie<'_, Self>, ConnectionError>
where A: Into<u32>,

ยง

fn xfixes_set_picture_clip_region<A>( &self, picture: u32, region: A, x_origin: i16, y_origin: i16, ) -> Result<VoidCookie<'_, Self>, ConnectionError>
where A: Into<u32>,

ยง

fn xfixes_set_cursor_name<'c, 'input>( &'c self, cursor: u32, name: &'input [u8], ) -> Result<VoidCookie<'c, Self>, ConnectionError>

ยง

fn xfixes_get_cursor_name( &self, cursor: u32, ) -> Result<Cookie<'_, Self, GetCursorNameReply>, ConnectionError>

ยง

fn xfixes_get_cursor_image_and_name( &self, ) -> Result<Cookie<'_, Self, GetCursorImageAndNameReply>, ConnectionError>

ยง

fn xfixes_change_cursor( &self, source: u32, destination: u32, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn xfixes_change_cursor_by_name<'c, 'input>( &'c self, src: u32, name: &'input [u8], ) -> Result<VoidCookie<'c, Self>, ConnectionError>

ยง

fn xfixes_expand_region( &self, source: u32, destination: u32, left: u16, right: u16, top: u16, bottom: u16, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn xfixes_hide_cursor( &self, window: u32, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn xfixes_show_cursor( &self, window: u32, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn xfixes_create_pointer_barrier<'c, 'input>( &'c self, barrier: u32, window: u32, x1: u16, y1: u16, x2: u16, y2: u16, directions: BarrierDirections, devices: &'input [u16], ) -> Result<VoidCookie<'c, Self>, ConnectionError>

ยง

fn xfixes_delete_pointer_barrier( &self, barrier: u32, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn xfixes_set_client_disconnect_mode( &self, disconnect_mode: ClientDisconnectFlags, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

Sets the disconnect mode for the client.. Read more
ยง

fn xfixes_get_client_disconnect_mode( &self, ) -> Result<Cookie<'_, Self, GetClientDisconnectModeReply>, ConnectionError>

ยง

impl<C> ConnectionExt for C
where C: RequestConnection + ?Sized,

ยง

fn xinput_get_extension_version<'c, 'input>( &'c self, name: &'input [u8], ) -> Result<Cookie<'c, Self, GetExtensionVersionReply>, ConnectionError>

ยง

fn xinput_list_input_devices( &self, ) -> Result<Cookie<'_, Self, ListInputDevicesReply>, ConnectionError>

ยง

fn xinput_open_device( &self, device_id: u8, ) -> Result<Cookie<'_, Self, OpenDeviceReply>, ConnectionError>

ยง

fn xinput_close_device( &self, device_id: u8, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn xinput_set_device_mode( &self, device_id: u8, mode: ValuatorMode, ) -> Result<Cookie<'_, Self, SetDeviceModeReply>, ConnectionError>

ยง

fn xinput_select_extension_event<'c, 'input>( &'c self, window: u32, classes: &'input [u32], ) -> Result<VoidCookie<'c, Self>, ConnectionError>

ยง

fn xinput_get_selected_extension_events( &self, window: u32, ) -> Result<Cookie<'_, Self, GetSelectedExtensionEventsReply>, ConnectionError>

ยง

fn xinput_change_device_dont_propagate_list<'c, 'input>( &'c self, window: u32, mode: PropagateMode, classes: &'input [u32], ) -> Result<VoidCookie<'c, Self>, ConnectionError>

ยง

fn xinput_get_device_dont_propagate_list( &self, window: u32, ) -> Result<Cookie<'_, Self, GetDeviceDontPropagateListReply>, ConnectionError>

ยง

fn xinput_get_device_motion_events<A>( &self, start: u32, stop: A, device_id: u8, ) -> Result<Cookie<'_, Self, GetDeviceMotionEventsReply>, ConnectionError>
where A: Into<u32>,

ยง

fn xinput_change_keyboard_device( &self, device_id: u8, ) -> Result<Cookie<'_, Self, ChangeKeyboardDeviceReply>, ConnectionError>

ยง

fn xinput_change_pointer_device( &self, x_axis: u8, y_axis: u8, device_id: u8, ) -> Result<Cookie<'_, Self, ChangePointerDeviceReply>, ConnectionError>

ยง

fn xinput_grab_device<'c, 'input, A>( &'c self, grab_window: u32, time: A, this_device_mode: GrabMode, other_device_mode: GrabMode, owner_events: bool, device_id: u8, classes: &'input [u32], ) -> Result<Cookie<'c, Self, GrabDeviceReply>, ConnectionError>
where A: Into<u32>,

ยง

fn xinput_ungrab_device<A>( &self, time: A, device_id: u8, ) -> Result<VoidCookie<'_, Self>, ConnectionError>
where A: Into<u32>,

ยง

fn xinput_grab_device_key<'c, 'input, A, B>( &'c self, grab_window: u32, modifiers: ModMask, modifier_device: A, grabbed_device: u8, key: B, this_device_mode: GrabMode, other_device_mode: GrabMode, owner_events: bool, classes: &'input [u32], ) -> Result<VoidCookie<'c, Self>, ConnectionError>
where A: Into<u8>, B: Into<u8>,

ยง

fn xinput_ungrab_device_key<A, B>( &self, grab_window: u32, modifiers: ModMask, modifier_device: A, key: B, grabbed_device: u8, ) -> Result<VoidCookie<'_, Self>, ConnectionError>
where A: Into<u8>, B: Into<u8>,

ยง

fn xinput_grab_device_button<'c, 'input, A, B>( &'c self, grab_window: u32, grabbed_device: u8, modifier_device: A, modifiers: ModMask, this_device_mode: GrabMode, other_device_mode: GrabMode, button: B, owner_events: bool, classes: &'input [u32], ) -> Result<VoidCookie<'c, Self>, ConnectionError>
where A: Into<u8>, B: Into<u8>,

ยง

fn xinput_ungrab_device_button<A, B>( &self, grab_window: u32, modifiers: ModMask, modifier_device: A, button: B, grabbed_device: u8, ) -> Result<VoidCookie<'_, Self>, ConnectionError>
where A: Into<u8>, B: Into<u8>,

ยง

fn xinput_allow_device_events<A>( &self, time: A, mode: DeviceInputMode, device_id: u8, ) -> Result<VoidCookie<'_, Self>, ConnectionError>
where A: Into<u32>,

ยง

fn xinput_get_device_focus( &self, device_id: u8, ) -> Result<Cookie<'_, Self, GetDeviceFocusReply>, ConnectionError>

ยง

fn xinput_set_device_focus<A, B>( &self, focus: A, time: B, revert_to: InputFocus, device_id: u8, ) -> Result<VoidCookie<'_, Self>, ConnectionError>
where A: Into<u32>, B: Into<u32>,

ยง

fn xinput_get_feedback_control( &self, device_id: u8, ) -> Result<Cookie<'_, Self, GetFeedbackControlReply>, ConnectionError>

ยง

fn xinput_change_feedback_control( &self, mask: ChangeFeedbackControlMask, device_id: u8, feedback_id: u8, feedback: FeedbackCtl, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn xinput_get_device_key_mapping( &self, device_id: u8, first_keycode: u8, count: u8, ) -> Result<Cookie<'_, Self, GetDeviceKeyMappingReply>, ConnectionError>

ยง

fn xinput_change_device_key_mapping<'c, 'input>( &'c self, device_id: u8, first_keycode: u8, keysyms_per_keycode: u8, keycode_count: u8, keysyms: &'input [u32], ) -> Result<VoidCookie<'c, Self>, ConnectionError>

ยง

fn xinput_get_device_modifier_mapping( &self, device_id: u8, ) -> Result<Cookie<'_, Self, GetDeviceModifierMappingReply>, ConnectionError>

ยง

fn xinput_set_device_modifier_mapping<'c, 'input>( &'c self, device_id: u8, keymaps: &'input [u8], ) -> Result<Cookie<'c, Self, SetDeviceModifierMappingReply>, ConnectionError>

ยง

fn xinput_get_device_button_mapping( &self, device_id: u8, ) -> Result<Cookie<'_, Self, GetDeviceButtonMappingReply>, ConnectionError>

ยง

fn xinput_set_device_button_mapping<'c, 'input>( &'c self, device_id: u8, map: &'input [u8], ) -> Result<Cookie<'c, Self, SetDeviceButtonMappingReply>, ConnectionError>

ยง

fn xinput_query_device_state( &self, device_id: u8, ) -> Result<Cookie<'_, Self, QueryDeviceStateReply>, ConnectionError>

ยง

fn xinput_device_bell( &self, device_id: u8, feedback_id: u8, feedback_class: u8, percent: i8, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn xinput_set_device_valuators<'c, 'input>( &'c self, device_id: u8, first_valuator: u8, valuators: &'input [i32], ) -> Result<Cookie<'c, Self, SetDeviceValuatorsReply>, ConnectionError>

ยง

fn xinput_get_device_control( &self, control_id: DeviceControl, device_id: u8, ) -> Result<Cookie<'_, Self, GetDeviceControlReply>, ConnectionError>

ยง

fn xinput_change_device_control( &self, control_id: DeviceControl, device_id: u8, control: DeviceCtl, ) -> Result<Cookie<'_, Self, ChangeDeviceControlReply>, ConnectionError>

ยง

fn xinput_list_device_properties( &self, device_id: u8, ) -> Result<Cookie<'_, Self, ListDevicePropertiesReply>, ConnectionError>

ยง

fn xinput_change_device_property<'c, 'input>( &'c self, property: u32, type_: u32, device_id: u8, mode: PropMode, num_items: u32, items: &'input ChangeDevicePropertyAux, ) -> Result<VoidCookie<'c, Self>, ConnectionError>

ยง

fn xinput_delete_device_property( &self, property: u32, device_id: u8, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn xinput_get_device_property( &self, property: u32, type_: u32, offset: u32, len: u32, device_id: u8, delete: bool, ) -> Result<Cookie<'_, Self, GetDevicePropertyReply>, ConnectionError>

ยง

fn xinput_xi_query_pointer<A>( &self, window: u32, deviceid: A, ) -> Result<Cookie<'_, Self, XIQueryPointerReply>, ConnectionError>
where A: Into<u16>,

ยง

fn xinput_xi_warp_pointer<A>( &self, src_win: u32, dst_win: u32, src_x: i32, src_y: i32, src_width: u16, src_height: u16, dst_x: i32, dst_y: i32, deviceid: A, ) -> Result<VoidCookie<'_, Self>, ConnectionError>
where A: Into<u16>,

ยง

fn xinput_xi_change_cursor<A>( &self, window: u32, cursor: u32, deviceid: A, ) -> Result<VoidCookie<'_, Self>, ConnectionError>
where A: Into<u16>,

ยง

fn xinput_xi_change_hierarchy<'c, 'input>( &'c self, changes: &'input [HierarchyChange], ) -> Result<VoidCookie<'c, Self>, ConnectionError>

ยง

fn xinput_xi_set_client_pointer<A>( &self, window: u32, deviceid: A, ) -> Result<VoidCookie<'_, Self>, ConnectionError>
where A: Into<u16>,

ยง

fn xinput_xi_get_client_pointer( &self, window: u32, ) -> Result<Cookie<'_, Self, XIGetClientPointerReply>, ConnectionError>

ยง

fn xinput_xi_select_events<'c, 'input>( &'c self, window: u32, masks: &'input [EventMask], ) -> Result<VoidCookie<'c, Self>, ConnectionError>

ยง

fn xinput_xi_query_version( &self, major_version: u16, minor_version: u16, ) -> Result<Cookie<'_, Self, XIQueryVersionReply>, ConnectionError>

ยง

fn xinput_xi_query_device<A>( &self, deviceid: A, ) -> Result<Cookie<'_, Self, XIQueryDeviceReply>, ConnectionError>
where A: Into<u16>,

ยง

fn xinput_xi_set_focus<A, B>( &self, window: u32, time: A, deviceid: B, ) -> Result<VoidCookie<'_, Self>, ConnectionError>
where A: Into<u32>, B: Into<u16>,

ยง

fn xinput_xi_get_focus<A>( &self, deviceid: A, ) -> Result<Cookie<'_, Self, XIGetFocusReply>, ConnectionError>
where A: Into<u16>,

ยง

fn xinput_xi_grab_device<'c, 'input, A, B>( &'c self, window: u32, time: A, cursor: u32, deviceid: B, mode: GrabMode, paired_device_mode: GrabMode, owner_events: GrabOwner, mask: &'input [u32], ) -> Result<Cookie<'c, Self, XIGrabDeviceReply>, ConnectionError>
where A: Into<u32>, B: Into<u16>,

ยง

fn xinput_xi_ungrab_device<A, B>( &self, time: A, deviceid: B, ) -> Result<VoidCookie<'_, Self>, ConnectionError>
where A: Into<u32>, B: Into<u16>,

ยง

fn xinput_xi_allow_events<A, B>( &self, time: A, deviceid: B, event_mode: EventMode, touchid: u32, grab_window: u32, ) -> Result<VoidCookie<'_, Self>, ConnectionError>
where A: Into<u32>, B: Into<u16>,

ยง

fn xinput_xi_passive_grab_device<'c, 'input, A, B>( &'c self, time: A, grab_window: u32, cursor: u32, detail: u32, deviceid: B, grab_type: GrabType, grab_mode: GrabMode22, paired_device_mode: GrabMode, owner_events: GrabOwner, mask: &'input [u32], modifiers: &'input [u32], ) -> Result<Cookie<'c, Self, XIPassiveGrabDeviceReply>, ConnectionError>
where A: Into<u32>, B: Into<u16>,

ยง

fn xinput_xi_passive_ungrab_device<'c, 'input, A>( &'c self, grab_window: u32, detail: u32, deviceid: A, grab_type: GrabType, modifiers: &'input [u32], ) -> Result<VoidCookie<'c, Self>, ConnectionError>
where A: Into<u16>,

ยง

fn xinput_xi_list_properties<A>( &self, deviceid: A, ) -> Result<Cookie<'_, Self, XIListPropertiesReply>, ConnectionError>
where A: Into<u16>,

ยง

fn xinput_xi_change_property<'c, 'input, A>( &'c self, deviceid: A, mode: PropMode, property: u32, type_: u32, num_items: u32, items: &'input XIChangePropertyAux, ) -> Result<VoidCookie<'c, Self>, ConnectionError>
where A: Into<u16>,

ยง

fn xinput_xi_delete_property<A>( &self, deviceid: A, property: u32, ) -> Result<VoidCookie<'_, Self>, ConnectionError>
where A: Into<u16>,

ยง

fn xinput_xi_get_property<A>( &self, deviceid: A, delete: bool, property: u32, type_: u32, offset: u32, len: u32, ) -> Result<Cookie<'_, Self, XIGetPropertyReply>, ConnectionError>
where A: Into<u16>,

ยง

fn xinput_xi_get_selected_events( &self, window: u32, ) -> Result<Cookie<'_, Self, XIGetSelectedEventsReply>, ConnectionError>

ยง

fn xinput_xi_barrier_release_pointer<'c, 'input>( &'c self, barriers: &'input [BarrierReleasePointerInfo], ) -> Result<VoidCookie<'c, Self>, ConnectionError>

ยง

fn xinput_send_extension_event<'c, 'input>( &'c self, destination: u32, device_id: u8, propagate: bool, events: &'input [EventForSend], classes: &'input [u32], ) -> Result<VoidCookie<'c, Self>, ConnectionError>

ยง

impl<C> ConnectionExt for C
where C: RequestConnection + ?Sized,

ยง

fn xkb_use_extension( &self, wanted_major: u16, wanted_minor: u16, ) -> Result<Cookie<'_, Self, UseExtensionReply>, ConnectionError>

ยง

fn xkb_select_events<'c, 'input>( &'c self, device_spec: u16, clear: EventType, select_all: EventType, affect_map: MapPart, map: MapPart, details: &'input SelectEventsAux, ) -> Result<VoidCookie<'c, Self>, ConnectionError>

ยง

fn xkb_bell( &self, device_spec: u16, bell_class: u16, bell_id: u16, percent: i8, force_sound: bool, event_only: bool, pitch: i16, duration: i16, name: u32, window: u32, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn xkb_get_state( &self, device_spec: u16, ) -> Result<Cookie<'_, Self, GetStateReply>, ConnectionError>

ยง

fn xkb_latch_lock_state( &self, device_spec: u16, affect_mod_locks: ModMask, mod_locks: ModMask, lock_group: bool, group_lock: Group, affect_mod_latches: ModMask, latch_group: bool, group_latch: u16, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn xkb_get_controls( &self, device_spec: u16, ) -> Result<Cookie<'_, Self, GetControlsReply>, ConnectionError>

ยง

fn xkb_set_controls<'c, 'input>( &'c self, device_spec: u16, affect_internal_real_mods: ModMask, internal_real_mods: ModMask, affect_ignore_lock_real_mods: ModMask, ignore_lock_real_mods: ModMask, affect_internal_virtual_mods: VMod, internal_virtual_mods: VMod, affect_ignore_lock_virtual_mods: VMod, ignore_lock_virtual_mods: VMod, mouse_keys_dflt_btn: u8, groups_wrap: u8, access_x_options: AXOption, affect_enabled_controls: BoolCtrl, enabled_controls: BoolCtrl, change_controls: Control, repeat_delay: u16, repeat_interval: u16, slow_keys_delay: u16, debounce_delay: u16, mouse_keys_delay: u16, mouse_keys_interval: u16, mouse_keys_time_to_max: u16, mouse_keys_max_speed: u16, mouse_keys_curve: i16, access_x_timeout: u16, access_x_timeout_mask: BoolCtrl, access_x_timeout_values: BoolCtrl, access_x_timeout_options_mask: AXOption, access_x_timeout_options_values: AXOption, per_key_repeat: &'input [u8; 32], ) -> Result<VoidCookie<'c, Self>, ConnectionError>

ยง

fn xkb_get_map( &self, device_spec: u16, full: MapPart, partial: MapPart, first_type: u8, n_types: u8, first_key_sym: u8, n_key_syms: u8, first_key_action: u8, n_key_actions: u8, first_key_behavior: u8, n_key_behaviors: u8, virtual_mods: VMod, first_key_explicit: u8, n_key_explicit: u8, first_mod_map_key: u8, n_mod_map_keys: u8, first_v_mod_map_key: u8, n_v_mod_map_keys: u8, ) -> Result<Cookie<'_, Self, GetMapReply>, ConnectionError>

ยง

fn xkb_set_map<'c, 'input>( &'c self, device_spec: u16, flags: SetMapFlags, min_key_code: u8, max_key_code: u8, first_type: u8, n_types: u8, first_key_sym: u8, n_key_syms: u8, total_syms: u16, first_key_action: u8, n_key_actions: u8, total_actions: u16, first_key_behavior: u8, n_key_behaviors: u8, total_key_behaviors: u8, first_key_explicit: u8, n_key_explicit: u8, total_key_explicit: u8, first_mod_map_key: u8, n_mod_map_keys: u8, total_mod_map_keys: u8, first_v_mod_map_key: u8, n_v_mod_map_keys: u8, total_v_mod_map_keys: u8, virtual_mods: VMod, values: &'input SetMapAux, ) -> Result<VoidCookie<'c, Self>, ConnectionError>

ยง

fn xkb_get_compat_map( &self, device_spec: u16, groups: SetOfGroup, get_all_si: bool, first_si: u16, n_si: u16, ) -> Result<Cookie<'_, Self, GetCompatMapReply>, ConnectionError>

ยง

fn xkb_set_compat_map<'c, 'input>( &'c self, device_spec: u16, recompute_actions: bool, truncate_si: bool, groups: SetOfGroup, first_si: u16, si: &'input [SymInterpret], group_maps: &'input [ModDef], ) -> Result<VoidCookie<'c, Self>, ConnectionError>

ยง

fn xkb_get_indicator_state( &self, device_spec: u16, ) -> Result<Cookie<'_, Self, GetIndicatorStateReply>, ConnectionError>

ยง

fn xkb_get_indicator_map( &self, device_spec: u16, which: u32, ) -> Result<Cookie<'_, Self, GetIndicatorMapReply>, ConnectionError>

ยง

fn xkb_set_indicator_map<'c, 'input>( &'c self, device_spec: u16, which: u32, maps: &'input [IndicatorMap], ) -> Result<VoidCookie<'c, Self>, ConnectionError>

ยง

fn xkb_get_named_indicator<A>( &self, device_spec: u16, led_class: LedClass, led_id: A, indicator: u32, ) -> Result<Cookie<'_, Self, GetNamedIndicatorReply>, ConnectionError>
where A: Into<u16>,

ยง

fn xkb_set_named_indicator<A>( &self, device_spec: u16, led_class: LedClass, led_id: A, indicator: u32, set_state: bool, on: bool, set_map: bool, create_map: bool, map_flags: IMFlag, map_which_groups: IMGroupsWhich, map_groups: SetOfGroups, map_which_mods: IMModsWhich, map_real_mods: ModMask, map_vmods: VMod, map_ctrls: BoolCtrl, ) -> Result<VoidCookie<'_, Self>, ConnectionError>
where A: Into<u16>,

ยง

fn xkb_get_names( &self, device_spec: u16, which: NameDetail, ) -> Result<Cookie<'_, Self, GetNamesReply>, ConnectionError>

ยง

fn xkb_set_names<'c, 'input>( &'c self, device_spec: u16, virtual_mods: VMod, first_type: u8, n_types: u8, first_kt_levelt: u8, n_kt_levels: u8, indicators: u32, group_names: SetOfGroup, n_radio_groups: u8, first_key: u8, n_keys: u8, n_key_aliases: u8, total_kt_level_names: u16, values: &'input SetNamesAux, ) -> Result<VoidCookie<'c, Self>, ConnectionError>

ยง

fn xkb_per_client_flags( &self, device_spec: u16, change: PerClientFlag, value: PerClientFlag, ctrls_to_change: BoolCtrl, auto_ctrls: BoolCtrl, auto_ctrls_values: BoolCtrl, ) -> Result<Cookie<'_, Self, PerClientFlagsReply>, ConnectionError>

ยง

fn xkb_list_components( &self, device_spec: u16, max_names: u16, ) -> Result<Cookie<'_, Self, ListComponentsReply>, ConnectionError>

ยง

fn xkb_get_kbd_by_name( &self, device_spec: u16, need: GBNDetail, want: GBNDetail, load: bool, ) -> Result<Cookie<'_, Self, GetKbdByNameReply>, ConnectionError>

ยง

fn xkb_get_device_info<A>( &self, device_spec: u16, wanted: XIFeature, all_buttons: bool, first_button: u8, n_buttons: u8, led_class: LedClass, led_id: A, ) -> Result<Cookie<'_, Self, GetDeviceInfoReply>, ConnectionError>
where A: Into<u16>,

ยง

fn xkb_set_device_info<'c, 'input>( &'c self, device_spec: u16, first_btn: u8, change: XIFeature, btn_actions: &'input [Action], leds: &'input [DeviceLedInfo], ) -> Result<VoidCookie<'c, Self>, ConnectionError>

ยง

fn xkb_set_debugging_flags<'c, 'input>( &'c self, affect_flags: u32, flags: u32, affect_ctrls: u32, ctrls: u32, message: &'input [u8], ) -> Result<Cookie<'c, Self, SetDebuggingFlagsReply>, ConnectionError>

ยง

impl<C> ConnectionExt for C
where C: RequestConnection + ?Sized,

ยง

fn bigreq_enable( &self, ) -> Result<Cookie<'_, Self, EnableReply>, ConnectionError>

Enable the BIG-REQUESTS extension. Read more
ยง

impl<C> ConnectionExt for C
where C: RequestConnection + ?Sized,

ยง

fn dri3_query_version( &self, major_version: u32, minor_version: u32, ) -> Result<Cookie<'_, Self, QueryVersionReply>, ConnectionError>

ยง

fn dri3_open( &self, drawable: u32, provider: u32, ) -> Result<CookieWithFds<'_, Self, OpenReply>, ConnectionError>

ยง

fn dri3_pixmap_from_buffer<A>( &self, pixmap: u32, drawable: u32, size: u32, width: u16, height: u16, stride: u16, depth: u8, bpp: u8, pixmap_fd: A, ) -> Result<VoidCookie<'_, Self>, ConnectionError>
where A: Into<OwnedFd>,

ยง

fn dri3_buffer_from_pixmap( &self, pixmap: u32, ) -> Result<CookieWithFds<'_, Self, BufferFromPixmapReply>, ConnectionError>

ยง

fn dri3_fence_from_fd<A>( &self, drawable: u32, fence: u32, initially_triggered: bool, fence_fd: A, ) -> Result<VoidCookie<'_, Self>, ConnectionError>
where A: Into<OwnedFd>,

ยง

fn dri3_fd_from_fence( &self, drawable: u32, fence: u32, ) -> Result<CookieWithFds<'_, Self, FDFromFenceReply>, ConnectionError>

ยง

fn dri3_get_supported_modifiers( &self, window: u32, depth: u8, bpp: u8, ) -> Result<Cookie<'_, Self, GetSupportedModifiersReply>, ConnectionError>

ยง

fn dri3_pixmap_from_buffers( &self, pixmap: u32, window: u32, width: u16, height: u16, stride0: u32, offset0: u32, stride1: u32, offset1: u32, stride2: u32, offset2: u32, stride3: u32, offset3: u32, depth: u8, bpp: u8, modifier: u64, buffers: Vec<OwnedFd>, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn dri3_buffers_from_pixmap( &self, pixmap: u32, ) -> Result<CookieWithFds<'_, Self, BuffersFromPixmapReply>, ConnectionError>

ยง

fn dri3_set_drm_device_in_use( &self, window: u32, drm_major: u32, drm_minor: u32, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn dri3_import_syncobj<A>( &self, syncobj: u32, drawable: u32, syncobj_fd: A, ) -> Result<VoidCookie<'_, Self>, ConnectionError>
where A: Into<OwnedFd>,

ยง

fn dri3_free_syncobj( &self, syncobj: u32, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

impl<C> ConnectionExt for C
where C: RequestConnection + ?Sized,

ยง

fn ge_query_version( &self, client_major_version: u16, client_minor_version: u16, ) -> Result<Cookie<'_, Self, QueryVersionReply>, ConnectionError>

ยง

impl<C> ConnectionExt for C
where C: RequestConnection + ?Sized,

ยง

fn randr_query_version( &self, major_version: u32, minor_version: u32, ) -> Result<Cookie<'_, Self, QueryVersionReply>, ConnectionError>

ยง

fn randr_set_screen_config( &self, window: u32, timestamp: u32, config_timestamp: u32, size_id: u16, rotation: Rotation, rate: u16, ) -> Result<Cookie<'_, Self, SetScreenConfigReply>, ConnectionError>

ยง

fn randr_select_input( &self, window: u32, enable: NotifyMask, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn randr_get_screen_info( &self, window: u32, ) -> Result<Cookie<'_, Self, GetScreenInfoReply>, ConnectionError>

ยง

fn randr_get_screen_size_range( &self, window: u32, ) -> Result<Cookie<'_, Self, GetScreenSizeRangeReply>, ConnectionError>

ยง

fn randr_set_screen_size( &self, window: u32, width: u16, height: u16, mm_width: u32, mm_height: u32, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn randr_get_screen_resources( &self, window: u32, ) -> Result<Cookie<'_, Self, GetScreenResourcesReply>, ConnectionError>

ยง

fn randr_get_output_info( &self, output: u32, config_timestamp: u32, ) -> Result<Cookie<'_, Self, GetOutputInfoReply>, ConnectionError>

ยง

fn randr_list_output_properties( &self, output: u32, ) -> Result<Cookie<'_, Self, ListOutputPropertiesReply>, ConnectionError>

ยง

fn randr_query_output_property( &self, output: u32, property: u32, ) -> Result<Cookie<'_, Self, QueryOutputPropertyReply>, ConnectionError>

ยง

fn randr_configure_output_property<'c, 'input>( &'c self, output: u32, property: u32, pending: bool, range: bool, values: &'input [i32], ) -> Result<VoidCookie<'c, Self>, ConnectionError>

ยง

fn randr_change_output_property<'c, 'input>( &'c self, output: u32, property: u32, type_: u32, format: u8, mode: PropMode, num_units: u32, data: &'input [u8], ) -> Result<VoidCookie<'c, Self>, ConnectionError>

ยง

fn randr_delete_output_property( &self, output: u32, property: u32, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn randr_get_output_property<A>( &self, output: u32, property: u32, type_: A, long_offset: u32, long_length: u32, delete: bool, pending: bool, ) -> Result<Cookie<'_, Self, GetOutputPropertyReply>, ConnectionError>
where A: Into<u32>,

ยง

fn randr_create_mode<'c, 'input>( &'c self, window: u32, mode_info: ModeInfo, name: &'input [u8], ) -> Result<Cookie<'c, Self, CreateModeReply>, ConnectionError>

ยง

fn randr_destroy_mode( &self, mode: u32, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn randr_add_output_mode( &self, output: u32, mode: u32, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn randr_delete_output_mode( &self, output: u32, mode: u32, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn randr_get_crtc_info( &self, crtc: u32, config_timestamp: u32, ) -> Result<Cookie<'_, Self, GetCrtcInfoReply>, ConnectionError>

ยง

fn randr_set_crtc_config<'c, 'input>( &'c self, crtc: u32, timestamp: u32, config_timestamp: u32, x: i16, y: i16, mode: u32, rotation: Rotation, outputs: &'input [u32], ) -> Result<Cookie<'c, Self, SetCrtcConfigReply>, ConnectionError>

ยง

fn randr_get_crtc_gamma_size( &self, crtc: u32, ) -> Result<Cookie<'_, Self, GetCrtcGammaSizeReply>, ConnectionError>

ยง

fn randr_get_crtc_gamma( &self, crtc: u32, ) -> Result<Cookie<'_, Self, GetCrtcGammaReply>, ConnectionError>

ยง

fn randr_set_crtc_gamma<'c, 'input>( &'c self, crtc: u32, red: &'input [u16], green: &'input [u16], blue: &'input [u16], ) -> Result<VoidCookie<'c, Self>, ConnectionError>

ยง

fn randr_get_screen_resources_current( &self, window: u32, ) -> Result<Cookie<'_, Self, GetScreenResourcesCurrentReply>, ConnectionError>

ยง

fn randr_set_crtc_transform<'c, 'input>( &'c self, crtc: u32, transform: Transform, filter_name: &'input [u8], filter_params: &'input [i32], ) -> Result<VoidCookie<'c, Self>, ConnectionError>

ยง

fn randr_get_crtc_transform( &self, crtc: u32, ) -> Result<Cookie<'_, Self, GetCrtcTransformReply>, ConnectionError>

ยง

fn randr_get_panning( &self, crtc: u32, ) -> Result<Cookie<'_, Self, GetPanningReply>, ConnectionError>

ยง

fn randr_set_panning( &self, crtc: u32, timestamp: u32, left: u16, top: u16, width: u16, height: u16, track_left: u16, track_top: u16, track_width: u16, track_height: u16, border_left: i16, border_top: i16, border_right: i16, border_bottom: i16, ) -> Result<Cookie<'_, Self, SetPanningReply>, ConnectionError>

ยง

fn randr_set_output_primary( &self, window: u32, output: u32, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn randr_get_output_primary( &self, window: u32, ) -> Result<Cookie<'_, Self, GetOutputPrimaryReply>, ConnectionError>

ยง

fn randr_get_providers( &self, window: u32, ) -> Result<Cookie<'_, Self, GetProvidersReply>, ConnectionError>

ยง

fn randr_get_provider_info( &self, provider: u32, config_timestamp: u32, ) -> Result<Cookie<'_, Self, GetProviderInfoReply>, ConnectionError>

ยง

fn randr_set_provider_offload_sink( &self, provider: u32, sink_provider: u32, config_timestamp: u32, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn randr_set_provider_output_source( &self, provider: u32, source_provider: u32, config_timestamp: u32, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn randr_list_provider_properties( &self, provider: u32, ) -> Result<Cookie<'_, Self, ListProviderPropertiesReply>, ConnectionError>

ยง

fn randr_query_provider_property( &self, provider: u32, property: u32, ) -> Result<Cookie<'_, Self, QueryProviderPropertyReply>, ConnectionError>

ยง

fn randr_configure_provider_property<'c, 'input>( &'c self, provider: u32, property: u32, pending: bool, range: bool, values: &'input [i32], ) -> Result<VoidCookie<'c, Self>, ConnectionError>

ยง

fn randr_change_provider_property<'c, 'input>( &'c self, provider: u32, property: u32, type_: u32, format: u8, mode: u8, num_items: u32, data: &'input [u8], ) -> Result<VoidCookie<'c, Self>, ConnectionError>

ยง

fn randr_delete_provider_property( &self, provider: u32, property: u32, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn randr_get_provider_property( &self, provider: u32, property: u32, type_: u32, long_offset: u32, long_length: u32, delete: bool, pending: bool, ) -> Result<Cookie<'_, Self, GetProviderPropertyReply>, ConnectionError>

ยง

fn randr_get_monitors( &self, window: u32, get_active: bool, ) -> Result<Cookie<'_, Self, GetMonitorsReply>, ConnectionError>

ยง

fn randr_set_monitor( &self, window: u32, monitorinfo: MonitorInfo, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn randr_delete_monitor( &self, window: u32, name: u32, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn randr_create_lease<'c, 'input>( &'c self, window: u32, lid: u32, crtcs: &'input [u32], outputs: &'input [u32], ) -> Result<CookieWithFds<'c, Self, CreateLeaseReply>, ConnectionError>

ยง

fn randr_free_lease( &self, lid: u32, terminate: u8, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

impl<C> ConnectionExt for C
where C: RequestConnection + ?Sized,

ยง

fn render_query_version( &self, client_major_version: u32, client_minor_version: u32, ) -> Result<Cookie<'_, Self, QueryVersionReply>, ConnectionError>

ยง

fn render_query_pict_formats( &self, ) -> Result<Cookie<'_, Self, QueryPictFormatsReply>, ConnectionError>

ยง

fn render_query_pict_index_values( &self, format: u32, ) -> Result<Cookie<'_, Self, QueryPictIndexValuesReply>, ConnectionError>

ยง

fn render_create_picture<'c, 'input>( &'c self, pid: u32, drawable: u32, format: u32, value_list: &'input CreatePictureAux, ) -> Result<VoidCookie<'c, Self>, ConnectionError>

ยง

fn render_change_picture<'c, 'input>( &'c self, picture: u32, value_list: &'input ChangePictureAux, ) -> Result<VoidCookie<'c, Self>, ConnectionError>

ยง

fn render_set_picture_clip_rectangles<'c, 'input>( &'c self, picture: u32, clip_x_origin: i16, clip_y_origin: i16, rectangles: &'input [Rectangle], ) -> Result<VoidCookie<'c, Self>, ConnectionError>

ยง

fn render_free_picture( &self, picture: u32, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn render_composite<A>( &self, op: PictOp, src: u32, mask: A, dst: u32, src_x: i16, src_y: i16, mask_x: i16, mask_y: i16, dst_x: i16, dst_y: i16, width: u16, height: u16, ) -> Result<VoidCookie<'_, Self>, ConnectionError>
where A: Into<u32>,

ยง

fn render_trapezoids<'c, 'input>( &'c self, op: PictOp, src: u32, dst: u32, mask_format: u32, src_x: i16, src_y: i16, traps: &'input [Trapezoid], ) -> Result<VoidCookie<'c, Self>, ConnectionError>

ยง

fn render_triangles<'c, 'input>( &'c self, op: PictOp, src: u32, dst: u32, mask_format: u32, src_x: i16, src_y: i16, triangles: &'input [Triangle], ) -> Result<VoidCookie<'c, Self>, ConnectionError>

ยง

fn render_tri_strip<'c, 'input>( &'c self, op: PictOp, src: u32, dst: u32, mask_format: u32, src_x: i16, src_y: i16, points: &'input [Pointfix], ) -> Result<VoidCookie<'c, Self>, ConnectionError>

ยง

fn render_tri_fan<'c, 'input>( &'c self, op: PictOp, src: u32, dst: u32, mask_format: u32, src_x: i16, src_y: i16, points: &'input [Pointfix], ) -> Result<VoidCookie<'c, Self>, ConnectionError>

ยง

fn render_create_glyph_set( &self, gsid: u32, format: u32, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn render_reference_glyph_set( &self, gsid: u32, existing: u32, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn render_free_glyph_set( &self, glyphset: u32, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn render_add_glyphs<'c, 'input>( &'c self, glyphset: u32, glyphids: &'input [u32], glyphs: &'input [Glyphinfo], data: &'input [u8], ) -> Result<VoidCookie<'c, Self>, ConnectionError>

ยง

fn render_free_glyphs<'c, 'input>( &'c self, glyphset: u32, glyphs: &'input [u32], ) -> Result<VoidCookie<'c, Self>, ConnectionError>

ยง

fn render_composite_glyphs8<'c, 'input>( &'c self, op: PictOp, src: u32, dst: u32, mask_format: u32, glyphset: u32, src_x: i16, src_y: i16, glyphcmds: &'input [u8], ) -> Result<VoidCookie<'c, Self>, ConnectionError>

ยง

fn render_composite_glyphs16<'c, 'input>( &'c self, op: PictOp, src: u32, dst: u32, mask_format: u32, glyphset: u32, src_x: i16, src_y: i16, glyphcmds: &'input [u8], ) -> Result<VoidCookie<'c, Self>, ConnectionError>

ยง

fn render_composite_glyphs32<'c, 'input>( &'c self, op: PictOp, src: u32, dst: u32, mask_format: u32, glyphset: u32, src_x: i16, src_y: i16, glyphcmds: &'input [u8], ) -> Result<VoidCookie<'c, Self>, ConnectionError>

ยง

fn render_fill_rectangles<'c, 'input>( &'c self, op: PictOp, dst: u32, color: Color, rects: &'input [Rectangle], ) -> Result<VoidCookie<'c, Self>, ConnectionError>

ยง

fn render_create_cursor( &self, cid: u32, source: u32, x: u16, y: u16, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn render_set_picture_transform( &self, picture: u32, transform: Transform, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn render_query_filters( &self, drawable: u32, ) -> Result<Cookie<'_, Self, QueryFiltersReply>, ConnectionError>

ยง

fn render_set_picture_filter<'c, 'input>( &'c self, picture: u32, filter: &'input [u8], values: &'input [i32], ) -> Result<VoidCookie<'c, Self>, ConnectionError>

ยง

fn render_create_anim_cursor<'c, 'input>( &'c self, cid: u32, cursors: &'input [Animcursorelt], ) -> Result<VoidCookie<'c, Self>, ConnectionError>

ยง

fn render_add_traps<'c, 'input>( &'c self, picture: u32, x_off: i16, y_off: i16, traps: &'input [Trap], ) -> Result<VoidCookie<'c, Self>, ConnectionError>

ยง

fn render_create_solid_fill( &self, picture: u32, color: Color, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn render_create_linear_gradient<'c, 'input>( &'c self, picture: u32, p1: Pointfix, p2: Pointfix, stops: &'input [i32], colors: &'input [Color], ) -> Result<VoidCookie<'c, Self>, ConnectionError>

ยง

fn render_create_radial_gradient<'c, 'input>( &'c self, picture: u32, inner: Pointfix, outer: Pointfix, inner_radius: i32, outer_radius: i32, stops: &'input [i32], colors: &'input [Color], ) -> Result<VoidCookie<'c, Self>, ConnectionError>

ยง

fn render_create_conical_gradient<'c, 'input>( &'c self, picture: u32, center: Pointfix, angle: i32, stops: &'input [i32], colors: &'input [Color], ) -> Result<VoidCookie<'c, Self>, ConnectionError>

ยง

impl<C> ConnectionExt for C
where C: RequestConnection + ?Sized,

ยง

fn shape_query_version( &self, ) -> Result<Cookie<'_, Self, QueryVersionReply>, ConnectionError>

ยง

fn shape_rectangles<'c, 'input>( &'c self, operation: SO, destination_kind: SK, ordering: ClipOrdering, destination_window: u32, x_offset: i16, y_offset: i16, rectangles: &'input [Rectangle], ) -> Result<VoidCookie<'c, Self>, ConnectionError>

ยง

fn shape_mask<A>( &self, operation: SO, destination_kind: SK, destination_window: u32, x_offset: i16, y_offset: i16, source_bitmap: A, ) -> Result<VoidCookie<'_, Self>, ConnectionError>
where A: Into<u32>,

ยง

fn shape_combine( &self, operation: SO, destination_kind: SK, source_kind: SK, destination_window: u32, x_offset: i16, y_offset: i16, source_window: u32, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn shape_offset( &self, destination_kind: SK, destination_window: u32, x_offset: i16, y_offset: i16, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn shape_query_extents( &self, destination_window: u32, ) -> Result<Cookie<'_, Self, QueryExtentsReply>, ConnectionError>

ยง

fn shape_select_input( &self, destination_window: u32, enable: bool, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn shape_input_selected( &self, destination_window: u32, ) -> Result<Cookie<'_, Self, InputSelectedReply>, ConnectionError>

ยง

fn shape_get_rectangles( &self, window: u32, source_kind: SK, ) -> Result<Cookie<'_, Self, GetRectanglesReply>, ConnectionError>

ยง

impl<C> ConnectionExt for C
where C: RequestConnection + ?Sized,

ยง

fn shm_query_version( &self, ) -> Result<Cookie<'_, Self, QueryVersionReply>, ConnectionError>

Query the version of the MIT-SHM extension.. Read more
ยง

fn shm_attach( &self, shmseg: u32, shmid: u32, read_only: bool, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

Attach a System V shared memory segment.. Read more
ยง

fn shm_detach( &self, shmseg: u32, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

Destroys the specified shared memory segment.. Read more
ยง

fn shm_put_image( &self, drawable: u32, gc: u32, total_width: u16, total_height: u16, src_x: u16, src_y: u16, src_width: u16, src_height: u16, dst_x: i16, dst_y: i16, depth: u8, format: u8, send_event: bool, shmseg: u32, offset: u32, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

Copy data from the shared memory to the specified drawable.. Read more
ยง

fn shm_get_image( &self, drawable: u32, x: i16, y: i16, width: u16, height: u16, plane_mask: u32, format: u8, shmseg: u32, offset: u32, ) -> Result<Cookie<'_, Self, GetImageReply>, ConnectionError>

Copies data from the specified drawable to the shared memory segment.. Read more
ยง

fn shm_create_pixmap( &self, pid: u32, drawable: u32, width: u16, height: u16, depth: u8, shmseg: u32, offset: u32, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

Create a pixmap backed by shared memory.. Read more
ยง

fn shm_attach_fd<A>( &self, shmseg: u32, shm_fd: A, read_only: bool, ) -> Result<VoidCookie<'_, Self>, ConnectionError>
where A: Into<OwnedFd>,

Create a shared memory segment. Read more
ยง

fn shm_create_segment( &self, shmseg: u32, size: u32, read_only: bool, ) -> Result<CookieWithFds<'_, Self, CreateSegmentReply>, ConnectionError>

Asks the server to allocate a shared memory segment.. Read more
ยง

impl<C> ConnectionExt for C
where C: RequestConnection + ?Sized,

ยง

fn sync_initialize( &self, desired_major_version: u8, desired_minor_version: u8, ) -> Result<Cookie<'_, Self, InitializeReply>, ConnectionError>

ยง

fn sync_list_system_counters( &self, ) -> Result<Cookie<'_, Self, ListSystemCountersReply>, ConnectionError>

ยง

fn sync_create_counter( &self, id: u32, initial_value: Int64, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn sync_destroy_counter( &self, counter: u32, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn sync_query_counter( &self, counter: u32, ) -> Result<Cookie<'_, Self, QueryCounterReply>, ConnectionError>

ยง

fn sync_await_<'c, 'input>( &'c self, wait_list: &'input [Waitcondition], ) -> Result<VoidCookie<'c, Self>, ConnectionError>

ยง

fn sync_change_counter( &self, counter: u32, amount: Int64, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn sync_set_counter( &self, counter: u32, value: Int64, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn sync_create_alarm<'c, 'input>( &'c self, id: u32, value_list: &'input CreateAlarmAux, ) -> Result<VoidCookie<'c, Self>, ConnectionError>

ยง

fn sync_change_alarm<'c, 'input>( &'c self, id: u32, value_list: &'input ChangeAlarmAux, ) -> Result<VoidCookie<'c, Self>, ConnectionError>

ยง

fn sync_destroy_alarm( &self, alarm: u32, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn sync_query_alarm( &self, alarm: u32, ) -> Result<Cookie<'_, Self, QueryAlarmReply>, ConnectionError>

ยง

fn sync_set_priority( &self, id: u32, priority: i32, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn sync_get_priority( &self, id: u32, ) -> Result<Cookie<'_, Self, GetPriorityReply>, ConnectionError>

ยง

fn sync_create_fence( &self, drawable: u32, fence: u32, initially_triggered: bool, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn sync_trigger_fence( &self, fence: u32, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn sync_reset_fence( &self, fence: u32, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn sync_destroy_fence( &self, fence: u32, ) -> Result<VoidCookie<'_, Self>, ConnectionError>

ยง

fn sync_query_fence( &self, fence: u32, ) -> Result<Cookie<'_, Self, QueryFenceReply>, ConnectionError>

ยง

fn sync_await_fence<'c, 'input>( &'c self, fence_list: &'input [u32], ) -> Result<VoidCookie<'c, Self>, ConnectionError>

ยง

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> Downcast for T
where T: Any,

ยง

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

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
ยง

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

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
ยง

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

Convert &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)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Anyโ€™s vtable from &mut Traitโ€™s.
ยง

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

ยง

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

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
ยง

impl<T, A> DynAccess<T> for A
where A: Access<T>, <A as Access<T>>::Guard: 'static,

ยง

fn load(&self) -> DynGuard<T>

The equivalent of [Access::load].
ยง

impl<'de, T> DynamicDeserialize<'de> for T
where T: Type + Deserialize<'de>,

ยง

type Deserializer = PhantomData<T>

A DeserializeSeed implementation for this type.
ยง

fn deserializer_for_signature( signature: &Signature, ) -> Result<<T as DynamicDeserialize<'de>>::Deserializer, Error>

Get a deserializer compatible with this parsed signature.
ยง

impl<'de, T> DynamicDeserialize<'de> for T
where T: Type + Deserialize<'de>,

ยง

type Deserializer = PhantomData<T>

A DeserializeSeed implementation for this type.
ยง

fn deserializer_for_signature( signature: &Signature, ) -> Result<<T as DynamicDeserialize<'de>>::Deserializer, Error>

Get a deserializer compatible with this parsed signature.
ยง

impl<T> DynamicType for T
where T: Type + ?Sized,

ยง

fn signature(&self) -> Signature

The type signature for self. Read more
ยง

impl<T> DynamicType for T
where T: Type + ?Sized,

ยง

fn signature(&self) -> Signature

The type signature for self. Read more
ยง

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<F> EventHandler for F
where F: FnMut(Result<Event, Error>) + Send + 'static,

ยง

fn handle_event(&mut self, event: Result<Event, Error>)

Handles an event.
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.
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<F, A, B, O> Function<A, B, O> for F
where F: Fn(A, B) -> O, A: Clone,

ยง

fn with(self, prefix: A) -> impl Fn(B)

Applies the given first argument to a binary function and returns a new function that takes the other argument. Read more
ยง

impl<F, A, B, O> Function<A, B, O> for F
where F: Fn(A, B) -> O, A: Clone,

ยง

fn with(self, prefix: A) -> impl Fn(B)

Applies the given first argument to a binary function and returns a new function that takes the other argument. Read more
ยง

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

ยง

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

A convenience for calling Future::poll() on !Unpin types.
ยง

fn or<F>(self, other: F) -> Or<Self, F> โ“˜
where Self: Sized, F: Future<Output = Self::Output>,

Returns the result of self or other future, preferring self if both are ready. Read more
ยง

fn race<F>(self, other: F) -> Race<Self, F> โ“˜
where Self: Sized, F: Future<Output = Self::Output>,

Available on crate features std and race only.
Returns the result of self or other future, with no preference if both are ready. Read more
ยง

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

Available on crate feature std only.
Catches panics while polling the future. 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.
Boxes the future and changes its type to dyn Future + Send + 'a. 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.
Boxes the future and changes its type to dyn Future + 'a. 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, or crate features alloc and spin 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> 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.
Sourceยง

impl<I> IntoAsyncIterator for I
where I: AsyncIterator,

Sourceยง

type Item = <I as AsyncIterator>::Item

๐Ÿ”ฌThis is a nightly-only experimental API. (async_iterator)
The type of the item yielded by the iterator
Sourceยง

type IntoAsyncIter = I

๐Ÿ”ฌThis is a nightly-only experimental API. (async_iterator)
The type of the resulting iterator
Sourceยง

fn into_async_iter(self) -> <I as IntoAsyncIterator>::IntoAsyncIter

๐Ÿ”ฌThis is a nightly-only experimental API. (async_iterator)
Converts self into an async iterator
ยง

impl<State, Message> IntoBoot<State, Message> for State

ยง

fn into_boot(self) -> (State, Task<Message>)

Turns some type into the initial state of some Application.
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.
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
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
Sourceยง

impl<I> IntoIterator for I
where I: Iterator,

Sourceยง

type Item = <I as Iterator>::Item

The type of the elements being iterated over.
Sourceยง

type IntoIter = I

Which kind of iterator are we turning this into?
Sourceยง

fn into_iter(self) -> I

Creates an iterator from a value. Read more
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<I> IteratorRandom for I
where I: Iterator,

ยง

fn choose<R>(self, rng: &mut R) -> Option<Self::Item>
where R: Rng + ?Sized,

Uniformly sample one element Read more
ยง

fn choose_stable<R>(self, rng: &mut R) -> Option<Self::Item>
where R: Rng + ?Sized,

Uniformly sample one element (stable) Read more
ยง

fn sample_fill<R>(self, rng: &mut R, buf: &mut [Self::Item]) -> usize
where R: Rng + ?Sized,

Uniformly sample amount distinct elements into a buffer Read more
ยง

fn sample<R>(self, rng: &mut R, amount: usize) -> Vec<Self::Item>
where R: Rng + ?Sized,

Available on crate feature alloc only.
Uniformly sample amount distinct elements into a Vec Read more
ยง

fn choose_multiple_fill<R>(self, rng: &mut R, buf: &mut [Self::Item]) -> usize
where R: Rng + ?Sized,

๐Ÿ‘ŽDeprecated since 0.10.0:

Renamed to sample_fill

Deprecated: use [Self::sample_fill] instead
ยง

fn choose_multiple<R>(self, rng: &mut R, amount: usize) -> Vec<Self::Item>
where R: Rng + ?Sized,

๐Ÿ‘ŽDeprecated since 0.10.0:

Renamed to sample

Available on crate feature alloc only.
Deprecated: use [Self::sample] instead
ยง

impl<Sp> LocalSpawnExt for Sp
where Sp: LocalSpawn + ?Sized,

ยง

fn spawn_local<Fut>(&self, future: Fut) -> Result<(), SpawnError>
where Fut: Future<Output = ()> + 'static,

Available on crate feature alloc only.
Spawns a task that polls the given future with output () to completion. Read more
ยง

fn spawn_local_with_handle<Fut>( &self, future: Fut, ) -> Result<RemoteHandle<<Fut as Future>::Output>, SpawnError>
where Fut: Future + 'static,

Available on crate features channel and std only.
Spawns a task that polls the given future to completion and returns a future that resolves to the spawned futureโ€™s output. Read more
ยง

impl<T> NonFatalErrorHandler for T
where T: FnMut(NonFatalError),

ยง

fn handle(&mut self, e: NonFatalError)

ยง

impl<T> NoneValue for T
where T: Default,

ยง

type NoneType = T

ยง

fn null_value() -> T

The none-equivalent value.
ยง

impl<T> NoneValue for T
where T: Default,

ยง

type NoneType = T

The type of the none-equivalent value that [NoneValue::null_value] produces.
ยง

fn null_value() -> T

The none-equivalent value.
ยง

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_iter(&mut self, input: I) -> ParseIter<'_, Self, I, O, E>
where Self: Sized, I: Stream + StreamIsPartial, E: ParserError<I>, <E as ParserError<I>>::Inner: ParserError<I>,

Repeat this parse until all of input is consumed, 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
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
ยง

impl<Iter> PathIterator for Iter

ยง

fn flattened(self, tolerance: f32) -> Flattened<Self> โ“˜

Returns an iterator that turns curves into line segments.
ยง

fn transformed<T>(self, mat: &T) -> Transformed<'_, Self, T> โ“˜
where T: Transformation<f32>,

Returns an iterator applying a 2D transform to all of its events.
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.
ยง

impl<R> ReadBytes for R
where R: Read,

ยง

fn read_u8(&mut self, endian: Endian) -> Result<u8, Error>

Read a u8.
ยง

fn read_u16(&mut self, endian: Endian) -> Result<u16, Error>

Read a u16.
ยง

fn read_u32(&mut self, endian: Endian) -> Result<u32, Error>

Read a u32.
ยง

fn read_u64(&mut self, endian: Endian) -> Result<u64, Error>

Read a u64.
ยง

fn read_u128(&mut self, endian: Endian) -> Result<u128, Error>

Read a u128.
ยง

fn read_i8(&mut self, endian: Endian) -> Result<i8, Error>

Read a i8.
ยง

fn read_i16(&mut self, endian: Endian) -> Result<i16, Error>

Read a i16.
ยง

fn read_i32(&mut self, endian: Endian) -> Result<i32, Error>

Read a i32.
ยง

fn read_i64(&mut self, endian: Endian) -> Result<i64, Error>

Read a i64.
ยง

fn read_i128(&mut self, endian: Endian) -> Result<i128, Error>

Read a i128.
ยง

fn read_f32(&mut self, endian: Endian) -> Result<f32, Error>

Read a f32.
ยง

fn read_f64(&mut self, endian: Endian) -> Result<f64, Error>

Read a f64.
ยง

impl<R> ReadBytesExt for R
where R: Read + ?Sized,

ยง

fn read_u8(&mut self) -> Result<u8, Error>

Reads an unsigned 8 bit integer from the underlying reader. Read more
ยง

fn read_i8(&mut self) -> Result<i8, Error>

Reads a signed 8 bit integer from the underlying reader. Read more
ยง

fn read_u16<T>(&mut self) -> Result<u16, Error>
where T: ByteOrder,

Reads an unsigned 16 bit integer from the underlying reader. Read more
ยง

fn read_i16<T>(&mut self) -> Result<i16, Error>
where T: ByteOrder,

Reads a signed 16 bit integer from the underlying reader. Read more
ยง

fn read_u24<T>(&mut self) -> Result<u32, Error>
where T: ByteOrder,

Reads an unsigned 24 bit integer from the underlying reader. Read more
ยง

fn read_i24<T>(&mut self) -> Result<i32, Error>
where T: ByteOrder,

Reads a signed 24 bit integer from the underlying reader. Read more
ยง

fn read_u32<T>(&mut self) -> Result<u32, Error>
where T: ByteOrder,

Reads an unsigned 32 bit integer from the underlying reader. Read more
ยง

fn read_i32<T>(&mut self) -> Result<i32, Error>
where T: ByteOrder,

Reads a signed 32 bit integer from the underlying reader. Read more
ยง

fn read_u48<T>(&mut self) -> Result<u64, Error>
where T: ByteOrder,

Reads an unsigned 48 bit integer from the underlying reader. Read more
ยง

fn read_i48<T>(&mut self) -> Result<i64, Error>
where T: ByteOrder,

Reads a signed 48 bit integer from the underlying reader. Read more
ยง

fn read_u64<T>(&mut self) -> Result<u64, Error>
where T: ByteOrder,

Reads an unsigned 64 bit integer from the underlying reader. Read more
ยง

fn read_i64<T>(&mut self) -> Result<i64, Error>
where T: ByteOrder,

Reads a signed 64 bit integer from the underlying reader. Read more
ยง

fn read_u128<T>(&mut self) -> Result<u128, Error>
where T: ByteOrder,

Reads an unsigned 128 bit integer from the underlying reader. Read more
ยง

fn read_i128<T>(&mut self) -> Result<i128, Error>
where T: ByteOrder,

Reads a signed 128 bit integer from the underlying reader. Read more
ยง

fn read_uint<T>(&mut self, nbytes: usize) -> Result<u64, Error>
where T: ByteOrder,

Reads an unsigned n-bytes integer from the underlying reader. Read more
ยง

fn read_int<T>(&mut self, nbytes: usize) -> Result<i64, Error>
where T: ByteOrder,

Reads a signed n-bytes integer from the underlying reader. Read more
ยง

fn read_uint128<T>(&mut self, nbytes: usize) -> Result<u128, Error>
where T: ByteOrder,

Reads an unsigned n-bytes integer from the underlying reader.
ยง

fn read_int128<T>(&mut self, nbytes: usize) -> Result<i128, Error>
where T: ByteOrder,

Reads a signed n-bytes integer from the underlying reader.
ยง

fn read_f32<T>(&mut self) -> Result<f32, Error>
where T: ByteOrder,

Reads a IEEE754 single-precision (4 bytes) floating point number from the underlying reader. Read more
ยง

fn read_f64<T>(&mut self) -> Result<f64, Error>
where T: ByteOrder,

Reads a IEEE754 double-precision (8 bytes) floating point number from the underlying reader. Read more
Sourceยง

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Sourceยง

type Target = T

๐Ÿ”ฌThis is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
ยง

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<R> Rng for R
where R: TryRng<Error = Infallible> + ?Sized,

ยง

fn next_u32(&mut self) -> u32

Return the next random u32.
ยง

fn next_u64(&mut self) -> u64

Return the next random u64.
ยง

fn fill_bytes(&mut self, dst: &mut [u8])

Fill dest with random data. Read more
ยง

impl<R> RngExt for R
where R: Rng + ?Sized,

ยง

fn random<T>(&mut self) -> T
where StandardUniform: Distribution<T>,

Return a random value via the StandardUniform distribution. Read more
ยง

fn random_iter<T>(self) -> Iter<StandardUniform, Self, T>
where Self: Sized, StandardUniform: Distribution<T>,

Return an iterator over random variates Read more
ยง

fn random_range<T, R>(&mut self, range: R) -> T
where T: SampleUniform, R: SampleRange<T>,

Generate a random value in the given range. Read more
ยง

fn random_bool(&mut self, p: f64) -> bool

Return a bool with a probability p of being true. Read more
ยง

fn random_ratio(&mut self, numerator: u32, denominator: u32) -> bool

Return a bool with a probability of numerator/denominator of being true. Read more
ยง

fn sample<T, D>(&mut self, distr: D) -> T
where D: Distribution<T>,

Sample a new value, using the given distribution. Read more
ยง

fn sample_iter<T, D>(self, distr: D) -> Iter<D, Self, T>
where D: Distribution<T>, Self: Sized,

Create an iterator that generates values using the given distribution. Read more
ยง

fn fill<T>(&mut self, dest: &mut [T])
where T: Fill,

Fill any type implementing [Fill] with random data Read more
Sourceยง

impl<T> Same for T

Sourceยง

type Output = T

Should always be Self
ยง

impl<F> ScanEventHandler for F
where F: FnMut(Result<PathBuf, Error>) + Send + 'static,

ยง

fn handle_event(&mut self, event: Result<PathBuf, Error>)

Handles an event.
ยง

impl<M, F> Schedule<M> for F
where F: Fn(Runnable<M>),

ยง

fn schedule(&self, runnable: Runnable<M>, _: ScheduleInfo)

The actual scheduling procedure.
ยง

impl<T, Item> SinkExt<Item> for T
where T: Sink<Item> + ?Sized,

ยง

fn with<U, Fut, F, E>(self, f: F) -> With<Self, Item, U, Fut, F>
where F: FnMut(U) -> Fut, Fut: Future<Output = Result<Item, E>>, E: From<Self::Error>, Self: Sized,

Composes a function in front of the sink. Read more
ยง

fn with_flat_map<U, St, F>(self, f: F) -> WithFlatMap<Self, Item, U, St, F>
where F: FnMut(U) -> St, St: Stream<Item = Result<Item, Self::Error>>, Self: Sized,

Composes a function in front of the sink. Read more
ยง

fn sink_map_err<E, F>(self, f: F) -> SinkMapErr<Self, F>
where F: FnOnce(Self::Error) -> E, Self: Sized,

Transforms the error returned by the sink.
ยง

fn sink_err_into<E>(self) -> SinkErrInto<Self, Item, E>
where Self: Sized, Self::Error: Into<E>,

Map this sinkโ€™s error to a different error type using the Into trait. Read more
ยง

fn buffer(self, capacity: usize) -> Buffer<Self, Item>
where Self: Sized,

Available on crate feature alloc only.
Adds a fixed-size buffer to the current sink. Read more
ยง

fn close(&mut self) -> Close<'_, Self, Item> โ“˜
where Self: Unpin,

Close the sink.
ยง

fn fanout<Si>(self, other: Si) -> Fanout<Self, Si>
where Self: Sized, Item: Clone, Si: Sink<Item, Error = Self::Error>,

Fanout items to multiple sinks. Read more
ยง

fn flush(&mut self) -> Flush<'_, Self, Item> โ“˜
where Self: Unpin,

Flush the sink, processing all pending items. Read more
ยง

fn send(&mut self, item: Item) -> Send<'_, Self, Item> โ“˜
where Self: Unpin,

A future that completes after the given item has been fully processed into the sink, including flushing. Read more
ยง

fn feed(&mut self, item: Item) -> Feed<'_, Self, Item> โ“˜
where Self: Unpin,

A future that completes after the given item has been received by the sink. Read more
ยง

fn send_all<'a, St>(&'a mut self, stream: &'a mut St) -> SendAll<'a, Self, St> โ“˜
where St: TryStream<Ok = Item, Error = Self::Error> + Stream + Unpin + ?Sized, Self: Unpin,

A future that completes after the given stream has been fully processed into the sink, including flushing. Read more
ยง

fn left_sink<Si2>(self) -> Either<Self, Si2> โ“˜
where Si2: Sink<Item, Error = Self::Error>, Self: Sized,

Wrap this sink in an Either sink, making it the left-hand variant of that Either. Read more
ยง

fn right_sink<Si1>(self) -> Either<Si1, Self> โ“˜
where Si1: Sink<Item, Error = Self::Error>, Self: Sized,

Wrap this stream in an Either stream, making it the right-hand variant of that Either. Read more
ยง

fn poll_ready_unpin( &mut self, cx: &mut Context<'_>, ) -> Poll<Result<(), Self::Error>>
where Self: Unpin,

A convenience method for calling Sink::poll_ready on Unpin sink types.
ยง

fn start_send_unpin(&mut self, item: Item) -> Result<(), Self::Error>
where Self: Unpin,

A convenience method for calling Sink::start_send on Unpin sink types.
ยง

fn poll_flush_unpin( &mut self, cx: &mut Context<'_>, ) -> Poll<Result<(), Self::Error>>
where Self: Unpin,

A convenience method for calling Sink::poll_flush on Unpin sink types.
ยง

fn poll_close_unpin( &mut self, cx: &mut Context<'_>, ) -> Poll<Result<(), Self::Error>>
where Self: Unpin,

A convenience method for calling Sink::poll_close on Unpin sink types.
Sourceยง

impl<T> Spanned for T
where T: Spanned + ?Sized,

Sourceยง

fn span(&self) -> Span

Returns a Span covering the complete contents of this syntax tree node, or Span::call_site() if this node is empty.
ยง

impl<Sp> SpawnExt for Sp
where Sp: Spawn + ?Sized,

ยง

fn spawn<Fut>(&self, future: Fut) -> Result<(), SpawnError>
where Fut: Future<Output = ()> + Send + 'static,

Available on crate feature alloc only.
Spawns a task that polls the given future with output () to completion. Read more
ยง

fn spawn_with_handle<Fut>( &self, future: Fut, ) -> Result<RemoteHandle<<Fut as Future>::Output>, SpawnError>
where Fut: Future + Send + 'static, <Fut as Future>::Output: Send,

Available on crate features channel and std only.
Spawns a task that polls the given future to completion and returns a future that resolves to the spawned futureโ€™s output. Read more
ยง

impl<S> StreamExt for S
where S: Stream + ?Sized,

ยง

fn poll_next(&mut self, cx: &mut Context<'_>) -> Poll<Option<Self::Item>>
where Self: Unpin,

A convenience for calling Stream::poll_next() on !Unpin types.
ยง

fn next(&mut self) -> NextFuture<'_, Self> โ“˜
where Self: Unpin,

Retrieves the next item in the stream. Read more
ยง

fn try_next<T, E>(&mut self) -> TryNextFuture<'_, Self> โ“˜
where Self: Stream<Item = Result<T, E>> + Unpin,

Retrieves the next item in the stream. Read more
ยง

fn count(self) -> CountFuture<Self> โ“˜
where Self: Sized,

Counts the number of items in the stream. Read more
ยง

fn map<T, F>(self, f: F) -> Map<Self, F>
where Self: Sized, F: FnMut(Self::Item) -> T,

Maps items of the stream to new values using a closure. Read more
ยง

fn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F>
where Self: Sized, U: Stream, F: FnMut(Self::Item) -> U,

Maps items to streams and then concatenates them. Read more
ยง

fn flatten(self) -> Flatten<Self>
where Self: Sized, Self::Item: Stream,

Concatenates inner streams. Read more
ยง

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

Maps items of the stream to new values using an async closure. Read more
ยง

fn filter<P>(self, predicate: P) -> Filter<Self, P>
where Self: Sized, P: FnMut(&Self::Item) -> bool,

Keeps items of the stream for which predicate returns true. Read more
ยง

fn filter_map<T, F>(self, f: F) -> FilterMap<Self, F>
where Self: Sized, F: FnMut(Self::Item) -> Option<T>,

Filters and maps items of the stream using a closure. Read more
ยง

fn take(self, n: usize) -> Take<Self>
where Self: Sized,

Takes only the first n items of the stream. Read more
ยง

fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P>
where Self: Sized, P: FnMut(&Self::Item) -> bool,

Takes items while predicate returns true. Read more
ยง

fn map_while<B, P>(self, predicate: P) -> MapWhile<Self, P>
where Self: Sized, P: FnMut(Self::Item) -> Option<B>,

Maps items while predicate returns Some. Read more
ยง

fn skip(self, n: usize) -> Skip<Self>
where Self: Sized,

Skips the first n items of the stream. Read more
ยง

fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P>
where Self: Sized, P: FnMut(&Self::Item) -> bool,

Skips items while predicate returns true. Read more
ยง

fn step_by(self, step: usize) -> StepBy<Self>
where Self: Sized,

Yields every stepth item. Read more
ยง

fn chain<U>(self, other: U) -> Chain<Self, U>
where Self: Sized, U: Stream<Item = Self::Item>,

Appends another stream to the end of this one. Read more
ยง

fn cloned<'a, T>(self) -> Cloned<Self>
where Self: Sized + Stream<Item = &'a T>, T: Clone + 'a,

Clones all items. Read more
ยง

fn copied<'a, T>(self) -> Copied<Self>
where Self: Sized + Stream<Item = &'a T>, T: Copy + 'a,

Copies all items. Read more
ยง

fn collect<C>(self) -> CollectFuture<Self, C> โ“˜
where Self: Sized, C: Default + Extend<Self::Item>,

Collects all items in the stream into a collection. Read more
ยง

fn try_collect<T, E, C>(self) -> TryCollectFuture<Self, C> โ“˜
where Self: Sized + Stream<Item = Result<T, E>>, C: Default + Extend<T>,

Collects all items in the fallible stream into a collection. Read more
ยง

fn partition<B, P>(self, predicate: P) -> PartitionFuture<Self, P, B> โ“˜
where Self: Sized, B: Default + Extend<Self::Item>, P: FnMut(&Self::Item) -> bool,

Partitions items into those for which predicate is true and those for which it is false, and then collects them into two collections. Read more
ยง

fn fold<T, F>(self, init: T, f: F) -> FoldFuture<Self, F, T> โ“˜
where Self: Sized, F: FnMut(T, Self::Item) -> T,

Accumulates a computation over the stream. Read more
ยง

fn try_fold<T, E, F, B>( &mut self, init: B, f: F, ) -> TryFoldFuture<'_, Self, F, B> โ“˜
where Self: Sized + Stream<Item = Result<T, E>> + Unpin, F: FnMut(B, T) -> Result<B, E>,

Accumulates a fallible computation over the stream. Read more
ยง

fn scan<St, B, F>(self, initial_state: St, f: F) -> Scan<Self, St, F>
where Self: Sized, F: FnMut(&mut St, Self::Item) -> Option<B>,

Maps items of the stream to new values using a state value and a closure. Read more
ยง

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

Fuses the stream so that it stops yielding items after the first None. Read more
ยง

fn cycle(self) -> Cycle<Self>
where Self: Sized + Clone,

Repeats the stream from beginning to end, forever. Read more
ยง

fn enumerate(self) -> Enumerate<Self>
where Self: Sized,

Enumerates items, mapping them to (index, item). Read more
ยง

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

Calls a closure on each item and passes it on. Read more
ยง

fn nth(&mut self, n: usize) -> NthFuture<'_, Self> โ“˜
where Self: Unpin,

Gets the nth item of the stream. Read more
ยง

fn last(self) -> LastFuture<Self> โ“˜
where Self: Sized,

Returns the last item in the stream. Read more
ยง

fn find<P>(&mut self, predicate: P) -> FindFuture<'_, Self, P> โ“˜
where Self: Unpin, P: FnMut(&Self::Item) -> bool,

Finds the first item of the stream for which predicate returns true. Read more
ยง

fn find_map<F, B>(&mut self, f: F) -> FindMapFuture<'_, Self, F> โ“˜
where Self: Unpin, F: FnMut(Self::Item) -> Option<B>,

Applies a closure to items in the stream and returns the first Some result. Read more
ยง

fn position<P>(&mut self, predicate: P) -> PositionFuture<'_, Self, P> โ“˜
where Self: Unpin, P: FnMut(Self::Item) -> bool,

Finds the index of the first item of the stream for which predicate returns true. Read more
ยง

fn all<P>(&mut self, predicate: P) -> AllFuture<'_, Self, P> โ“˜
where Self: Unpin, P: FnMut(Self::Item) -> bool,

Tests if predicate returns true for all items in the stream. Read more
ยง

fn any<P>(&mut self, predicate: P) -> AnyFuture<'_, Self, P> โ“˜
where Self: Unpin, P: FnMut(Self::Item) -> bool,

Tests if predicate returns true for any item in the stream. Read more
ยง

fn for_each<F>(self, f: F) -> ForEachFuture<Self, F> โ“˜
where Self: Sized, F: FnMut(Self::Item),

Calls a closure on each item of the stream. Read more
ยง

fn try_for_each<F, E>(&mut self, f: F) -> TryForEachFuture<'_, Self, F> โ“˜
where Self: Unpin, F: FnMut(Self::Item) -> Result<(), E>,

Calls a fallible closure on each item of the stream, stopping on first error. Read more
ยง

fn zip<U>(self, other: U) -> Zip<Self, U>
where Self: Sized, U: Stream,

Zips up two streams into a single stream of pairs. Read more
ยง

fn unzip<A, B, FromA, FromB>(self) -> UnzipFuture<Self, FromA, FromB> โ“˜
where FromA: Default + Extend<A>, FromB: Default + Extend<B>, Self: Sized + Stream<Item = (A, B)>,

Collects a stream of pairs into a pair of collections. Read more
ยง

fn or<S>(self, other: S) -> Or<Self, S>
where Self: Sized, S: Stream<Item = Self::Item>,

Merges with other stream, preferring items from self whenever both streams are ready. Read more
ยง

fn race<S>(self, other: S) -> Race<Self, S>
where Self: Sized, S: Stream<Item = Self::Item>,

Available on crate features std and race only.
Merges with other stream, with no preference for either stream when both are ready. Read more
ยง

fn drain(&mut self) -> Drain<'_, Self>

Yields all immediately available values from a stream. Read more
ยง

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

Available on crate feature alloc only.
Boxes the stream and changes its type to dyn Stream + Send + 'a. Read more
ยง

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

Available on crate feature alloc only.
Boxes the stream and changes its type to dyn Stream + 'a. Read more
ยง

impl<St> StreamExt for St
where St: Stream + ?Sized,

ยง

fn next(&mut self) -> Next<'_, Self>
where Self: Unpin,

Consumes and returns the next value in the stream or None if the stream is finished. Read more
ยง

fn try_next<T, E>(&mut self) -> TryNext<'_, Self>
where Self: Stream<Item = Result<T, E>> + Unpin,

Consumes and returns the next item in the stream. If an error is encountered before the next item, the error is returned instead. Read more
ยง

fn map<T, F>(self, f: F) -> Map<Self, F>
where F: FnMut(Self::Item) -> T, Self: Sized,

Maps this streamโ€™s items to a different type, returning a new stream of the resulting type. Read more
ยง

fn map_while<T, F>(self, f: F) -> MapWhile<Self, F>
where F: FnMut(Self::Item) -> Option<T>, Self: Sized,

Map this streamโ€™s items to a different type for as long as determined by the provided closure. A stream of the target type will be returned, which will yield elements until the closure returns None. Read more
ยง

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

Maps this streamโ€™s items asynchronously to a different type, returning a new stream of the resulting type. Read more
ยง

fn merge<U>(self, other: U) -> Merge<Self, U>
where U: Stream<Item = Self::Item>, Self: Sized,

Combine two streams into one by interleaving the output of both as it is produced. Read more
ยง

fn filter<F>(self, f: F) -> Filter<Self, F>
where F: FnMut(&Self::Item) -> bool, Self: Sized,

Filters the values produced by this stream according to the provided predicate. Read more
ยง

fn filter_map<T, F>(self, f: F) -> FilterMap<Self, F>
where F: FnMut(Self::Item) -> Option<T>, Self: Sized,

Filters the values produced by this stream while simultaneously mapping them to a different type according to the provided closure. Read more
ยง

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

Creates a stream which ends after the first None. Read more
ยง

fn take(self, n: usize) -> Take<Self>
where Self: Sized,

Creates a new stream of at most n items of the underlying stream. Read more
ยง

fn take_while<F>(self, f: F) -> TakeWhile<Self, F>
where F: FnMut(&Self::Item) -> bool, Self: Sized,

Take elements from this stream while the provided predicate resolves to true. Read more
ยง

fn skip(self, n: usize) -> Skip<Self>
where Self: Sized,

Creates a new stream that will skip the n first items of the underlying stream. Read more
ยง

fn skip_while<F>(self, f: F) -> SkipWhile<Self, F>
where F: FnMut(&Self::Item) -> bool, Self: Sized,

Skip elements from the underlying stream while the provided predicate resolves to true. Read more
ยง

fn all<F>(&mut self, f: F) -> AllFuture<'_, Self, F>
where Self: Unpin, F: FnMut(Self::Item) -> bool,

Tests if every element of the stream matches a predicate. Read more
ยง

fn any<F>(&mut self, f: F) -> AnyFuture<'_, Self, F>
where Self: Unpin, F: FnMut(Self::Item) -> bool,

Tests if any element of the stream matches a predicate. Read more
ยง

fn chain<U>(self, other: U) -> Chain<Self, U>
where U: Stream<Item = Self::Item>, Self: Sized,

Combine two streams into one by first returning all values from the first stream then all values from the second stream. Read more
ยง

fn fold<B, F>(self, init: B, f: F) -> FoldFuture<Self, B, F>
where Self: Sized, F: FnMut(B, Self::Item) -> B,

A combinator that applies a function to every element in a stream producing a single, final value. Read more
ยง

fn collect<T>( self, ) -> Collect<Self, T, <T as FromStreamPriv<Self::Item>>::InternalCollection>
where T: FromStream<Self::Item>, Self: Sized,

Drain stream pushing all emitted values into a collection. Read more
ยง

fn timeout(self, duration: Duration) -> Timeout<Self>
where Self: Sized,

Available on crate feature time only.
Applies a per-item timeout to the passed stream. Read more
ยง

fn timeout_repeating(self, interval: Interval) -> TimeoutRepeating<Self>
where Self: Sized,

Available on crate feature time only.
Applies a per-item timeout to the passed stream. Read more
ยง

fn throttle(self, duration: Duration) -> Throttle<Self>
where Self: Sized,

Available on crate feature time only.
Slows down a stream by enforcing a delay between items. Read more
ยง

fn chunks_timeout( self, max_size: usize, duration: Duration, ) -> ChunksTimeout<Self>
where Self: Sized,

Available on crate feature time only.
Batches the items in the given stream using a maximum duration and size for each batch. Read more
ยง

fn peekable(self) -> Peekable<Self>
where Self: Sized,

Turns the stream into a peekable stream, whose next element can be peeked at without being consumed. Read more
ยง

impl<T> StreamExt for T
where T: Stream + ?Sized,

ยง

fn next(&mut self) -> Next<'_, Self> โ“˜
where Self: Unpin,

Creates a future that resolves to the next item in the stream. Read more
ยง

fn into_future(self) -> StreamFuture<Self> โ“˜
where Self: Sized + Unpin,

Converts this stream into a future of (next_item, tail_of_stream). If the stream terminates, then the next item is None. Read more
ยง

fn map<T, F>(self, f: F) -> Map<Self, F>
where F: FnMut(Self::Item) -> T, Self: Sized,

Maps this streamโ€™s items to a different type, returning a new stream of the resulting type. Read more
ยง

fn enumerate(self) -> Enumerate<Self>
where Self: Sized,

Creates a stream which gives the current iteration count as well as the next value. Read more
ยง

fn filter<Fut, F>(self, f: F) -> Filter<Self, Fut, F>
where F: FnMut(&Self::Item) -> Fut, Fut: Future<Output = bool>, Self: Sized,

Filters the values produced by this stream according to the provided asynchronous predicate. Read more
ยง

fn filter_map<Fut, T, F>(self, f: F) -> FilterMap<Self, Fut, F>
where F: FnMut(Self::Item) -> Fut, Fut: Future<Output = Option<T>>, Self: Sized,

Filters the values produced by this stream while simultaneously mapping them to a different type according to the provided asynchronous closure. Read more
ยง

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

Computes from this streamโ€™s items new items of a different type using an asynchronous closure. Read more
ยง

fn collect<C>(self) -> Collect<Self, C> โ“˜
where C: Default + Extend<Self::Item>, Self: Sized,

Transforms a stream into a collection, returning a future representing the result of that computation. Read more
ยง

fn unzip<A, B, FromA, FromB>(self) -> Unzip<Self, FromA, FromB> โ“˜
where FromA: Default + Extend<A>, FromB: Default + Extend<B>, Self: Sized + Stream<Item = (A, B)>,

Converts a stream of pairs into a future, which resolves to pair of containers. Read more
ยง

fn concat(self) -> Concat<Self> โ“˜
where Self: Sized, Self::Item: Extend<<Self::Item as IntoIterator>::Item> + IntoIterator + Default,

Concatenate all items of a stream into a single extendable destination, returning a future representing the end result. Read more
ยง

fn count(self) -> Count<Self> โ“˜
where Self: Sized,

Drives the stream to completion, counting the number of items. Read more
ยง

fn cycle(self) -> Cycle<Self>
where Self: Sized + Clone,

Repeats a stream endlessly. Read more
ยง

fn fold<T, Fut, F>(self, init: T, f: F) -> Fold<Self, Fut, T, F> โ“˜
where F: FnMut(T, Self::Item) -> Fut, Fut: Future<Output = T>, Self: Sized,

Execute an accumulating asynchronous computation over a stream, collecting all the values into one final result. Read more
ยง

fn any<Fut, F>(self, f: F) -> Any<Self, Fut, F> โ“˜
where F: FnMut(Self::Item) -> Fut, Fut: Future<Output = bool>, Self: Sized,

Execute predicate over asynchronous stream, and return true if any element in stream satisfied a predicate. Read more
ยง

fn all<Fut, F>(self, f: F) -> All<Self, Fut, F> โ“˜
where F: FnMut(Self::Item) -> Fut, Fut: Future<Output = bool>, Self: Sized,

Execute predicate over asynchronous stream, and return true if all element in stream satisfied a predicate. Read more
ยง

fn flatten(self) -> Flatten<Self>
where Self::Item: Stream, Self: Sized,

Flattens a stream of streams into just one continuous stream. Read more
ยง

fn flatten_unordered( self, limit: impl Into<Option<usize>>, ) -> FlattenUnorderedWithFlowController<Self, ()>
where Self::Item: Stream + Unpin, Self: Sized,

Available on target_has_atomic=ptr and crate feature alloc only.
Flattens a stream of streams into just one continuous stream. Polls inner streams produced by the base stream concurrently. Read more
ยง

fn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F>
where F: FnMut(Self::Item) -> U, U: Stream, Self: Sized,

Maps a stream like StreamExt::map but flattens nested Streams. Read more
ยง

fn flat_map_unordered<U, F>( self, limit: impl Into<Option<usize>>, f: F, ) -> FlatMapUnordered<Self, U, F>
where U: Stream + Unpin, F: FnMut(Self::Item) -> U, Self: Sized,

Available on target_has_atomic=ptr and crate feature alloc only.
Maps a stream like StreamExt::map but flattens nested Streams and polls them concurrently, yielding items in any order, as they made available. Read more
ยง

fn scan<S, B, Fut, F>(self, initial_state: S, f: F) -> Scan<Self, S, Fut, F>
where F: FnMut(&mut S, Self::Item) -> Fut, Fut: Future<Output = Option<B>>, Self: Sized,

Combinator similar to StreamExt::fold that holds internal state and produces a new stream. Read more
ยง

fn skip_while<Fut, F>(self, f: F) -> SkipWhile<Self, Fut, F>
where F: FnMut(&Self::Item) -> Fut, Fut: Future<Output = bool>, Self: Sized,

Skip elements on this stream while the provided asynchronous predicate resolves to true. Read more
ยง

fn take_while<Fut, F>(self, f: F) -> TakeWhile<Self, Fut, F>
where F: FnMut(&Self::Item) -> Fut, Fut: Future<Output = bool>, Self: Sized,

Take elements from this stream while the provided asynchronous predicate resolves to true. Read more
ยง

fn take_until<Fut>(self, fut: Fut) -> TakeUntil<Self, Fut>
where Fut: Future, Self: Sized,

Take elements from this stream until the provided future resolves. Read more
ยง

fn for_each<Fut, F>(self, f: F) -> ForEach<Self, Fut, F> โ“˜
where F: FnMut(Self::Item) -> Fut, Fut: Future<Output = ()>, Self: Sized,

Runs this stream to completion, executing the provided asynchronous closure for each element on the stream. Read more
ยง

fn for_each_concurrent<Fut, F>( self, limit: impl Into<Option<usize>>, f: F, ) -> ForEachConcurrent<Self, Fut, F> โ“˜
where F: FnMut(Self::Item) -> Fut, Fut: Future<Output = ()>, Self: Sized,

Available on target_has_atomic=ptr and crate feature alloc only.
Runs this stream to completion, executing the provided asynchronous closure for each element on the stream concurrently as elements become available. Read more
ยง

fn take(self, n: usize) -> Take<Self>
where Self: Sized,

Creates a new stream of at most n items of the underlying stream. Read more
ยง

fn skip(self, n: usize) -> Skip<Self>
where Self: Sized,

Creates a new stream which skips n items of the underlying stream. Read more
ยง

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

Fuse a stream such that poll_next will never again be called once it has finished. This method can be used to turn any Stream into a FusedStream. Read more
ยง

fn by_ref(&mut self) -> &mut Self

Borrows a stream, rather than consuming it. Read more
ยง

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

Available on crate feature std only.
Catches unwinding panics while polling the stream. Read more
ยง

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

Available on crate feature alloc only.
Wrap the stream in a Box, pinning it. Read more
ยง

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

Available on crate feature alloc only.
Wrap the stream in a Box, pinning it. Read more
ยง

fn buffered(self, n: usize) -> Buffered<Self>
where Self::Item: Future, Self: Sized,

Available on target_has_atomic=ptr and crate feature alloc only.
An adaptor for creating a buffered list of pending futures. Read more
ยง

fn buffer_unordered(self, n: usize) -> BufferUnordered<Self>
where Self::Item: Future, Self: Sized,

Available on target_has_atomic=ptr and crate feature alloc only.
An adaptor for creating a buffered list of pending futures (unordered). Read more
ยง

fn zip<St>(self, other: St) -> Zip<Self, St>
where St: Stream, Self: Sized,

An adapter for zipping two streams together. Read more
ยง

fn chain<St>(self, other: St) -> Chain<Self, St>
where St: Stream<Item = Self::Item>, Self: Sized,

Adapter for chaining two streams. Read more
ยง

fn peekable(self) -> Peekable<Self>
where Self: Sized,

Creates a new stream which exposes a peek method. Read more
ยง

fn chunks(self, capacity: usize) -> Chunks<Self>
where Self: Sized,

Available on crate feature alloc only.
An adaptor for chunking up items of the stream inside a vector. Read more
ยง

fn ready_chunks(self, capacity: usize) -> ReadyChunks<Self>
where Self: Sized,

Available on crate feature alloc only.
An adaptor for chunking up ready items of the stream inside a vector. Read more
ยง

fn forward<S>(self, sink: S) -> Forward<Self, S> โ“˜
where S: Sink<Self::Ok, Error = Self::Error>, Self: Sized + TryStream,

Available on crate feature sink only.
A future that completes after the given stream has been fully processed into the sink and the sink has been flushed and closed. Read more
ยง

fn split<Item>(self) -> (SplitSink<Self, Item>, SplitStream<Self>)
where Self: Sized + Sink<Item>,

Available on crate feature sink and target_has_atomic=ptr and crate feature alloc only.
Splits this Stream + Sink object into separate Sink and Stream objects. Read more
ยง

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

Do something with each item of this stream, afterwards passing it on. Read more
ยง

fn left_stream<B>(self) -> Either<Self, B> โ“˜
where B: Stream<Item = Self::Item>, Self: Sized,

Wrap this stream in an Either stream, making it the left-hand variant of that Either. Read more
ยง

fn right_stream<B>(self) -> Either<B, Self> โ“˜
where B: Stream<Item = Self::Item>, Self: Sized,

Wrap this stream in an Either stream, making it the right-hand variant of that Either. Read more
ยง

fn poll_next_unpin(&mut self, cx: &mut Context<'_>) -> Poll<Option<Self::Item>>
where Self: Unpin,

A convenience method for calling Stream::poll_next on Unpin stream types.
ยง

fn select_next_some(&mut self) -> SelectNextSome<'_, Self> โ“˜
where Self: Unpin + FusedStream,

Returns a Future that resolves when the next item in this stream is ready. Read more
ยง

impl<F, T, State, Theme> ThemeFn<State, Theme> for F
where F: Fn(&State) -> T, T: Into<Option<Theme>>,

ยง

fn theme(&self, state: &State) -> Option<Theme>

Returns the theme of the Application for the current state. Read more
ยง

impl<F, T, State, Theme> ThemeFn<State, Theme> for F
where F: Fn(&State, Id) -> T, T: Into<Option<Theme>>,

ยง

fn theme(&self, state: &State, window: Id) -> Option<Theme>

Returns the theme of the Daemon for the current state and window. Read more
ยง

impl<T, State> TitleFn<State> for T
where T: Fn(&State) -> String,

ยง

fn title(&self, state: &State) -> String

Produces the title of the Application.
ยง

impl<T, State> TitleFn<State> for T
where T: Fn(&State, Id) -> String,

ยง

fn title(&self, state: &State, window: Id) -> String

Produces the title of the Daemon.
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)
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<T> ToSmolStr for T
where T: Display + ?Sized,

Sourceยง

impl<T> ToString for T
where T: Display + ?Sized,

Sourceยง

fn to_string(&self) -> String

Converts the given value to a String. Read more
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
ยง

impl<R> TryRng for R
where R: DerefMut, <R as Deref>::Target: TryRng,

ยง

type Error = <<R as Deref>::Target as TryRng>::Error

The type returned in the event of a RNG error. Read more
ยง

fn try_next_u32(&mut self) -> Result<u32, <R as TryRng>::Error>

Return the next random u32.
ยง

fn try_next_u64(&mut self) -> Result<u64, <R as TryRng>::Error>

Return the next random u64.
ยง

fn try_fill_bytes(&mut self, dst: &mut [u8]) -> Result<(), <R as TryRng>::Error>

Fill dst entirely with random data.
ยง

impl<S, T, E> TryStream for S
where S: Stream<Item = 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_next( self: Pin<&mut S>, cx: &mut Context<'_>, ) -> Poll<Option<Result<<S as TryStream>::Ok, <S as TryStream>::Error>>>

Poll this TryStream as if it were a Stream. Read more
ยง

impl<S> TryStreamExt for S
where S: TryStream + ?Sized,

ยง

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

Wraps the current stream in a new stream which converts the error type into the one provided. Read more
ยง

fn map_ok<T, F>(self, f: F) -> MapOk<Self, F>
where Self: Sized, F: FnMut(Self::Ok) -> T,

Wraps the current stream in a new stream which maps the success value using the provided closure. Read more
ยง

fn map_err<E, F>(self, f: F) -> MapErr<Self, F>
where Self: Sized, F: FnMut(Self::Error) -> E,

Wraps the current stream in a new stream which maps the error value using the provided closure. Read more
ยง

fn and_then<Fut, F>(self, f: F) -> AndThen<Self, Fut, F>
where F: FnMut(Self::Ok) -> Fut, Fut: TryFuture<Error = Self::Error>, Self: Sized,

Chain on a computation for when a value is ready, passing the successful results to the provided closure f. Read more
ยง

fn or_else<Fut, F>(self, f: F) -> OrElse<Self, Fut, F>
where F: FnMut(Self::Error) -> Fut, Fut: TryFuture<Ok = Self::Ok>, Self: Sized,

Chain on a computation for when an error happens, passing the erroneous result to the provided closure f. Read more
ยง

fn inspect_ok<F>(self, f: F) -> InspectOk<Self, F>
where F: FnMut(&Self::Ok), Self: Sized,

Do something with the success value of this stream, afterwards passing it on. Read more
ยง

fn inspect_err<F>(self, f: F) -> InspectErr<Self, F>
where F: FnMut(&Self::Error), Self: Sized,

Do something with the error value of this stream, afterwards passing it on. Read more
ยง

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

Wraps a TryStream into a type that implements Stream Read more
ยง

fn try_next(&mut self) -> TryNext<'_, Self> โ“˜
where Self: Unpin,

Creates a future that attempts to resolve the next item in the stream. If an error is encountered before the next item, the error is returned instead. Read more
ยง

fn try_for_each<Fut, F>(self, f: F) -> TryForEach<Self, Fut, F> โ“˜
where F: FnMut(Self::Ok) -> Fut, Fut: TryFuture<Ok = (), Error = Self::Error>, Self: Sized,

Attempts to run this stream to completion, executing the provided asynchronous closure for each element on the stream. Read more
ยง

fn try_skip_while<Fut, F>(self, f: F) -> TrySkipWhile<Self, Fut, F>
where F: FnMut(&Self::Ok) -> Fut, Fut: TryFuture<Ok = bool, Error = Self::Error>, Self: Sized,

Skip elements on this stream while the provided asynchronous predicate resolves to true. Read more
ยง

fn try_take_while<Fut, F>(self, f: F) -> TryTakeWhile<Self, Fut, F>
where F: FnMut(&Self::Ok) -> Fut, Fut: TryFuture<Ok = bool, Error = Self::Error>, Self: Sized,

Take elements on this stream while the provided asynchronous predicate resolves to true. Read more
ยง

fn try_for_each_concurrent<Fut, F>( self, limit: impl Into<Option<usize>>, f: F, ) -> TryForEachConcurrent<Self, Fut, F> โ“˜
where F: FnMut(Self::Ok) -> Fut, Fut: Future<Output = Result<(), Self::Error>>, Self: Sized,

Available on target_has_atomic=ptr and crate feature alloc only.
Attempts to run this stream to completion, executing the provided asynchronous closure for each element on the stream concurrently as elements become available, exiting as soon as an error occurs. Read more
ยง

fn try_collect<C>(self) -> TryCollect<Self, C> โ“˜
where C: Default + Extend<Self::Ok>, Self: Sized,

Attempt to transform a stream into a collection, returning a future representing the result of that computation. Read more
ยง

fn try_chunks(self, capacity: usize) -> TryChunks<Self>
where Self: Sized,

Available on crate feature alloc only.
An adaptor for chunking up successful items of the stream inside a vector. Read more
ยง

fn try_ready_chunks(self, capacity: usize) -> TryReadyChunks<Self>
where Self: Sized,

Available on crate feature alloc only.
An adaptor for chunking up successful, ready items of the stream inside a vector. Read more
ยง

fn try_filter<Fut, F>(self, f: F) -> TryFilter<Self, Fut, F>
where Fut: Future<Output = bool>, F: FnMut(&Self::Ok) -> Fut, Self: Sized,

Attempt to filter the values produced by this stream according to the provided asynchronous closure. Read more
ยง

fn try_filter_map<Fut, F, T>(self, f: F) -> TryFilterMap<Self, Fut, F>
where Fut: TryFuture<Ok = Option<T>, Error = Self::Error>, F: FnMut(Self::Ok) -> Fut, Self: Sized,

Attempt to filter the values produced by this stream while simultaneously mapping them to a different type according to the provided asynchronous closure. Read more
ยง

fn try_flatten_unordered( self, limit: impl Into<Option<usize>>, ) -> TryFlattenUnordered<Self>
where Self::Ok: TryStream + Unpin, <Self::Ok as TryStream>::Error: From<Self::Error>, Self: Sized,

Available on target_has_atomic=ptr and crate feature alloc only.
Flattens a stream of streams into just one continuous stream. Produced streams will be polled concurrently and any errors will be passed through without looking at them. If the underlying base stream returns an error, it will be immediately propagated. Read more
ยง

fn try_flatten(self) -> TryFlatten<Self>
where Self::Ok: TryStream, <Self::Ok as TryStream>::Error: From<Self::Error>, Self: Sized,

Flattens a stream of streams into just one continuous stream. Read more
ยง

fn try_fold<T, Fut, F>(self, init: T, f: F) -> TryFold<Self, Fut, T, F> โ“˜
where F: FnMut(T, Self::Ok) -> Fut, Fut: TryFuture<Ok = T, Error = Self::Error>, Self: Sized,

Attempt to execute an accumulating asynchronous computation over a stream, collecting all the values into one final result. Read more
ยง

fn try_concat(self) -> TryConcat<Self> โ“˜
where Self: Sized, Self::Ok: Extend<<Self::Ok as IntoIterator>::Item> + IntoIterator + Default,

Attempt to concatenate all items of a stream into a single extendable destination, returning a future representing the end result. Read more
ยง

fn try_buffer_unordered(self, n: usize) -> TryBufferUnordered<Self>
where Self::Ok: TryFuture<Error = Self::Error>, Self: Sized,

Available on target_has_atomic=ptr and crate feature alloc only.
Attempt to execute several futures from a stream concurrently (unordered). Read more
ยง

fn try_buffered(self, n: usize) -> TryBuffered<Self>
where Self::Ok: TryFuture<Error = Self::Error>, Self: Sized,

Available on target_has_atomic=ptr and crate feature alloc only.
Attempt to execute several futures from a stream concurrently. Read more
ยง

fn try_poll_next_unpin( &mut self, cx: &mut Context<'_>, ) -> Poll<Option<Result<Self::Ok, Self::Error>>>
where Self: Unpin,

A convenience method for calling TryStream::try_poll_next on Unpin stream types.
ยง

fn into_async_read(self) -> IntoAsyncRead<Self>
where Self: Sized + TryStreamExt<Error = Error>, Self::Ok: AsRef<[u8]>,

Available on crate features io and std only.
Adapter that converts this stream into an AsyncBufRead. Read more
ยง

fn try_all<Fut, F>(self, f: F) -> TryAll<Self, Fut, F> โ“˜
where Self: Sized, F: FnMut(Self::Ok) -> Fut, Fut: Future<Output = bool>,

Attempt to execute a predicate over an asynchronous stream and evaluate if all items satisfy the predicate. Exits early if an Err is encountered or if an Ok item is found that does not satisfy the predicate. Read more
ยง

fn try_any<Fut, F>(self, f: F) -> TryAny<Self, Fut, F> โ“˜
where Self: Sized, F: FnMut(Self::Ok) -> Fut, Fut: Future<Output = bool>,

Attempt to execute a predicate over an asynchronous stream and evaluate if any items satisfy the predicate. Exits early if an Err is encountered or if an Ok item is found that satisfies the predicate. 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<T, State, Message, C> UpdateFn<State, Message> for T
where T: Fn(&mut State, Message, Instant) -> C, C: Into<Task<Message>>,

ยง

fn update( &self, state: &mut State, message: Message, now: Instant, ) -> impl Into<Task<Message>>

Processes the message and updates the state of the Application.
ยง

impl<T, State, Message, C> UpdateFn<State, Message> for T
where T: Fn(&mut State, Message) -> C, C: Into<Task<Message>>,

ยง

fn update(&self, state: &mut State, message: Message) -> Task<Message>

Processes the message and updates the state of the Application.
ยง

impl<'a, T, State, Message, Theme, Renderer, Widget> ViewFn<'a, State, Message, Theme, Renderer> for T
where T: Fn(&'a State) -> Widget, State: 'static, Widget: Into<Element<'a, Message, Theme, Renderer>>,

ยง

fn view(&self, state: &'a State) -> Element<'a, Message, Theme, Renderer>

Produces the widget of the Application.
ยง

impl<'a, T, State, Message, Theme, Renderer, Widget> ViewFn<'a, State, Message, Theme, Renderer> for T
where T: Fn(&'a State, Id) -> Widget, State: 'static, Widget: Into<Element<'a, Message, Theme, Renderer>>,

ยง

fn view( &self, state: &'a State, window: Id, ) -> Element<'a, Message, Theme, Renderer>

Produces the widget of the Daemon.
ยง

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<W> WriteBytes for W
where W: Write,

ยง

fn write_u8(&mut self, endian: Endian, n: u8) -> Result<(), Error>

Write a u8.
ยง

fn write_u16(&mut self, endian: Endian, n: u16) -> Result<(), Error>

Write a u16.
ยง

fn write_u32(&mut self, endian: Endian, n: u32) -> Result<(), Error>

Write a u32.
ยง

fn write_u64(&mut self, endian: Endian, n: u64) -> Result<(), Error>

Write a u64.
ยง

fn write_u128(&mut self, endian: Endian, n: u128) -> Result<(), Error>

Write a u128.
ยง

fn write_i8(&mut self, endian: Endian, n: i8) -> Result<(), Error>

Write a i8.
ยง

fn write_i16(&mut self, endian: Endian, n: i16) -> Result<(), Error>

Write a i16.
ยง

fn write_i32(&mut self, endian: Endian, n: i32) -> Result<(), Error>

Write a i32.
ยง

fn write_i64(&mut self, endian: Endian, n: i64) -> Result<(), Error>

Write a i64.
ยง

fn write_i128(&mut self, endian: Endian, n: i128) -> Result<(), Error>

Write a i128.
ยง

fn write_f32(&mut self, endian: Endian, n: f32) -> Result<(), Error>

Write a f32.
ยง

fn write_f64(&mut self, endian: Endian, n: f64) -> Result<(), Error>

Write a f64.
ยง

impl<W> WriteBytesExt for W
where W: Write + ?Sized,

ยง

fn write_u8(&mut self, n: u8) -> Result<(), Error>

Writes an unsigned 8 bit integer to the underlying writer. Read more
ยง

fn write_i8(&mut self, n: i8) -> Result<(), Error>

Writes a signed 8 bit integer to the underlying writer. Read more
ยง

fn write_u16<T>(&mut self, n: u16) -> Result<(), Error>
where T: ByteOrder,

Writes an unsigned 16 bit integer to the underlying writer. Read more
ยง

fn write_i16<T>(&mut self, n: i16) -> Result<(), Error>
where T: ByteOrder,

Writes a signed 16 bit integer to the underlying writer. Read more
ยง

fn write_u24<T>(&mut self, n: u32) -> Result<(), Error>
where T: ByteOrder,

Writes an unsigned 24 bit integer to the underlying writer. Read more
ยง

fn write_i24<T>(&mut self, n: i32) -> Result<(), Error>
where T: ByteOrder,

Writes a signed 24 bit integer to the underlying writer. Read more
ยง

fn write_u32<T>(&mut self, n: u32) -> Result<(), Error>
where T: ByteOrder,

Writes an unsigned 32 bit integer to the underlying writer. Read more
ยง

fn write_i32<T>(&mut self, n: i32) -> Result<(), Error>
where T: ByteOrder,

Writes a signed 32 bit integer to the underlying writer. Read more
ยง

fn write_u48<T>(&mut self, n: u64) -> Result<(), Error>
where T: ByteOrder,

Writes an unsigned 48 bit integer to the underlying writer. Read more
ยง

fn write_i48<T>(&mut self, n: i64) -> Result<(), Error>
where T: ByteOrder,

Writes a signed 48 bit integer to the underlying writer. Read more
ยง

fn write_u64<T>(&mut self, n: u64) -> Result<(), Error>
where T: ByteOrder,

Writes an unsigned 64 bit integer to the underlying writer. Read more
ยง

fn write_i64<T>(&mut self, n: i64) -> Result<(), Error>
where T: ByteOrder,

Writes a signed 64 bit integer to the underlying writer. Read more
ยง

fn write_u128<T>(&mut self, n: u128) -> Result<(), Error>
where T: ByteOrder,

Writes an unsigned 128 bit integer to the underlying writer.
ยง

fn write_i128<T>(&mut self, n: i128) -> Result<(), Error>
where T: ByteOrder,

Writes a signed 128 bit integer to the underlying writer.
ยง

fn write_uint<T>(&mut self, n: u64, nbytes: usize) -> Result<(), Error>
where T: ByteOrder,

Writes an unsigned n-bytes integer to the underlying writer. Read more
ยง

fn write_int<T>(&mut self, n: i64, nbytes: usize) -> Result<(), Error>
where T: ByteOrder,

Writes a signed n-bytes integer to the underlying writer. Read more
ยง

fn write_uint128<T>(&mut self, n: u128, nbytes: usize) -> Result<(), Error>
where T: ByteOrder,

Writes an unsigned n-bytes integer to the underlying writer. Read more
ยง

fn write_int128<T>(&mut self, n: i128, nbytes: usize) -> Result<(), Error>
where T: ByteOrder,

Writes a signed n-bytes integer to the underlying writer. Read more
ยง

fn write_f32<T>(&mut self, n: f32) -> Result<(), Error>
where T: ByteOrder,

Writes a IEEE754 single-precision (4 bytes) floating point number to the underlying writer. Read more
ยง

fn write_f64<T>(&mut self, n: f64) -> Result<(), Error>
where T: ByteOrder,

Writes a IEEE754 double-precision (8 bytes) floating point number to the underlying writer. Read more
ยง

impl<T> ZByteReaderTrait for T
where T: BufRead + Seek,

ยง

fn read_byte_no_error(&mut self) -> u8

Read a single byte from the decoder and return 0 if we canโ€™t read the byte, e.g because of EOF Read more
ยง

fn read_exact_bytes(&mut self, buf: &mut [u8]) -> Result<(), ZByteIoError>

Read exact bytes required to fill buf or return an error if that isnโ€™t possible Read more
ยง

fn read_bytes(&mut self, buf: &mut [u8]) -> Result<usize, ZByteIoError>

Read bytes into buf returning how many bytes you have read or an error if one occurred Read more
ยง

fn peek_bytes(&mut self, buf: &mut [u8]) -> Result<usize, ZByteIoError>

Reads data into provided buffer but does not advance read position.
ยง

fn peek_exact_bytes(&mut self, buf: &mut [u8]) -> Result<(), ZByteIoError>

ยง

fn z_seek(&mut self, from: ZSeekFrom) -> Result<u64, ZByteIoError>

Seek into a new position from the buffer Read more
ยง

fn is_eof(&mut self) -> Result<bool, ZByteIoError>

Report whether we are at the end of a stream. Read more
ยง

fn z_position(&mut self) -> Result<u64, ZByteIoError>

Return the current position of the inner cursor. Read more
ยง

fn read_remaining(&mut self, sink: &mut Vec<u8>) -> Result<usize, ZByteIoError>

Read all bytes remaining in this input to sink until we hit eof Read more
ยง

impl<T> ZByteWriterTrait for T
where T: Write,

ยง

fn write_bytes(&mut self, buf: &[u8]) -> Result<usize, ZByteIoError>

Write some bytes into the sink returning number of bytes written or an error if something bad happened Read more
ยง

fn write_all_bytes(&mut self, buf: &[u8]) -> Result<(), ZByteIoError>

Write all bytes to the buffer or return an error if something occurred Read more
ยง

fn write_const_bytes<const N: usize>( &mut self, buf: &[u8; N], ) -> Result<(), ZByteIoError>

Write a fixed number of bytes and error out if we canโ€™t write the bytes Read more
ยง

fn flush_bytes(&mut self) -> Result<(), ZByteIoError>

Ensure bytes are written to the sink. Read more
ยง

fn reserve_capacity(&mut self, _: usize) -> Result<(), ZByteIoError>

A hint to tell the implementation how big of a size we expect the image to be An implementation like in memory Vec can use this to reserve additional memory to prevent reallocation when encoding Read more
ยง

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

ยง

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

ยง

impl<T> CheapCloneStr for T
where T: AsRef<str> + for<'a> From<&'a str> + From<String> + PartialEq + Eq + Clone + Default + Debug + 'static,

ยง

impl<R> CryptoRng for R
where R: TryCryptoRng<Error = Infallible> + ?Sized,

Sourceยง

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

ยง

impl<T> Display for T
where T: HasDisplayHandle + 'static,

ยง

impl<T> MaybeClone for T

ยง

impl<T> MaybeDebug for T

ยง

impl<T> MaybeSend for T
where T: Send,

ยง

impl<T> MaybeSend for T
where T: Send,

ยง

impl<T> MaybeSync for T
where T: Sync,

ยง

impl<T> MaybeSync for T
where T: Sync,

ยง

impl<I, O, E, P> ModalParser<I, O, E> for P
where P: Parser<I, O, ErrMode<E>>,

Sourceยง

impl<T> NumBytes for T
where T: Debug + AsRef<[u8]> + AsMut<[u8]> + PartialEq + Eq + PartialOrd + Ord + Hash + Borrow<[u8]> + BorrowMut<[u8]> + ?Sized,

ยง

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

ยง

impl<R> RngCore for R
where R: Rng,

ยง

impl<T, M> Source<M> for T
where M: Mode, T: AsFd + 'static + IntoSource<M>,

ยง

impl<R> TryCryptoRng for R
where R: DerefMut, <R as Deref>::Target: TryCryptoRng,

ยง

impl<T> Window for T

ยง

impl<T> Window for T