Struct bevy::utils::smallvec::alloc::rc::Rc

1.0.0 · source ·
pub struct Rc<T, A = Global>
where A: Allocator, T: ?Sized,
{ /* private fields */ }
Expand description

A single-threaded reference-counting pointer. ‘Rc’ stands for ‘Reference Counted’.

See the module-level documentation for more details.

The inherent methods of Rc are all associated functions, which means that you have to call them as e.g., Rc::get_mut(&mut value) instead of value.get_mut(). This avoids conflicts with methods of the inner type T.

Implementations§

source§

impl<T> Rc<T>

source

pub fn new(value: T) -> Rc<T>

Constructs a new Rc<T>.

Examples
use std::rc::Rc;

let five = Rc::new(5);
1.60.0 · source

pub fn new_cyclic<F>(data_fn: F) -> Rc<T>
where F: FnOnce(&Weak<T>) -> T,

Constructs a new Rc<T> while giving you a Weak<T> to the allocation, to allow you to construct a T which holds a weak pointer to itself.

Generally, a structure circularly referencing itself, either directly or indirectly, should not hold a strong reference to itself to prevent a memory leak. Using this function, you get access to the weak pointer during the initialization of T, before the Rc<T> is created, such that you can clone and store it inside the T.

new_cyclic first allocates the managed allocation for the Rc<T>, then calls your closure, giving it a Weak<T> to this allocation, and only afterwards completes the construction of the Rc<T> by placing the T returned from your closure into the allocation.

Since the new Rc<T> is not fully-constructed until Rc<T>::new_cyclic returns, calling upgrade on the weak reference inside your closure will fail and result in a None value.

Panics

If data_fn panics, the panic is propagated to the caller, and the temporary Weak<T> is dropped normally.

Examples
use std::rc::{Rc, Weak};

struct Gadget {
    me: Weak<Gadget>,
}

impl Gadget {
    /// Construct a reference counted Gadget.
    fn new() -> Rc<Self> {
        // `me` is a `Weak<Gadget>` pointing at the new allocation of the
        // `Rc` we're constructing.
        Rc::new_cyclic(|me| {
            // Create the actual struct here.
            Gadget { me: me.clone() }
        })
    }

    /// Return a reference counted pointer to Self.
    fn me(&self) -> Rc<Self> {
        self.me.upgrade().unwrap()
    }
}
source

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

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

Constructs a new Rc with uninitialized contents.

Examples
#![feature(new_uninit)]
#![feature(get_mut_unchecked)]

use std::rc::Rc;

let mut five = Rc::<u32>::new_uninit();

// Deferred initialization:
Rc::get_mut(&mut five).unwrap().write(5);

let five = unsafe { five.assume_init() };

assert_eq!(*five, 5)
source

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

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

Constructs a new Rc 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
#![feature(new_uninit)]

use std::rc::Rc;

let zero = Rc::<u32>::new_zeroed();
let zero = unsafe { zero.assume_init() };

assert_eq!(*zero, 0)
source

pub fn try_new(value: T) -> Result<Rc<T>, AllocError>

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

Constructs a new Rc<T>, returning an error if the allocation fails

Examples
#![feature(allocator_api)]
use std::rc::Rc;

let five = Rc::try_new(5);
source

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

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

Constructs a new Rc with uninitialized contents, returning an error if the allocation fails

Examples
#![feature(allocator_api, new_uninit)]
#![feature(get_mut_unchecked)]

use std::rc::Rc;

let mut five = Rc::<u32>::try_new_uninit()?;

// Deferred initialization:
Rc::get_mut(&mut five).unwrap().write(5);

let five = unsafe { five.assume_init() };

assert_eq!(*five, 5);
source

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

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

Constructs a new Rc with uninitialized contents, with the memory being filled with 0 bytes, returning an error if the allocation fails

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

Examples
#![feature(allocator_api, new_uninit)]

use std::rc::Rc;

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

assert_eq!(*zero, 0);
1.33.0 · source

pub fn pin(value: T) -> Pin<Rc<T>>

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

source§

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

source

pub fn allocator(this: &Rc<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 Rc::allocator(&r) instead of r.allocator(). This is so that there is no conflict with a method on the inner type.

source

pub fn new_in(value: T, alloc: A) -> Rc<T, A>

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

Constructs a new Rc in the provided allocator.

Examples
#![feature(allocator_api)]
use std::rc::Rc;
use std::alloc::System;

let five = Rc::new_in(5, System);
source

pub fn new_uninit_in(alloc: A) -> Rc<MaybeUninit<T>, A>

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

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

Examples
#![feature(new_uninit)]
#![feature(get_mut_unchecked)]
#![feature(allocator_api)]

use std::rc::Rc;
use std::alloc::System;

let mut five = Rc::<u32, _>::new_uninit_in(System);

let five = unsafe {
    // Deferred initialization:
    Rc::get_mut_unchecked(&mut five).as_mut_ptr().write(5);

    five.assume_init()
};

assert_eq!(*five, 5)
source

pub fn new_zeroed_in(alloc: A) -> Rc<MaybeUninit<T>, A>

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

Constructs a new Rc 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(new_uninit)]
#![feature(allocator_api)]

use std::rc::Rc;
use std::alloc::System;

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

assert_eq!(*zero, 0)
source

pub fn try_new_in(value: T, alloc: A) -> Result<Rc<T, A>, AllocError>

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

Constructs a new Rc<T> in the provided allocator, returning an error if the allocation fails

Examples
#![feature(allocator_api)]
use std::rc::Rc;
use std::alloc::System;

let five = Rc::try_new_in(5, System);
source

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

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

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

Examples
#![feature(allocator_api, new_uninit)]
#![feature(get_mut_unchecked)]

use std::rc::Rc;
use std::alloc::System;

let mut five = Rc::<u32, _>::try_new_uninit_in(System)?;

let five = unsafe {
    // Deferred initialization:
    Rc::get_mut_unchecked(&mut five).as_mut_ptr().write(5);

    five.assume_init()
};

assert_eq!(*five, 5);
source

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

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

Constructs a new Rc 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, new_uninit)]

use std::rc::Rc;
use std::alloc::System;

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

assert_eq!(*zero, 0);
source

pub fn pin_in(value: T, alloc: A) -> Pin<Rc<T, A>>

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

Constructs a new Pin<Rc<T>> in the provided allocator. If T does not implement Unpin, then value will be pinned in memory and unable to be moved.

1.4.0 · source

pub fn try_unwrap(this: Rc<T, A>) -> Result<T, Rc<T, A>>

Returns the inner value, if the Rc has exactly one strong reference.

Otherwise, an Err is returned with the same Rc that was passed in.

This will succeed even if there are outstanding weak references.

Examples
use std::rc::Rc;

let x = Rc::new(3);
assert_eq!(Rc::try_unwrap(x), Ok(3));

let x = Rc::new(4);
let _y = Rc::clone(&x);
assert_eq!(*Rc::try_unwrap(x).unwrap_err(), 4);
1.70.0 · source

pub fn into_inner(this: Rc<T, A>) -> Option<T>

Returns the inner value, if the Rc has exactly one strong reference.

Otherwise, None is returned and the Rc is dropped.

This will succeed even if there are outstanding weak references.

If Rc::into_inner is called on every clone of this Rc, it is guaranteed that exactly one of the calls returns the inner value. This means in particular that the inner value is not dropped.

This is equivalent to Rc::try_unwrap(this).ok(). (Note that these are not equivalent for Arc, due to race conditions that do not apply to Rc.)

source§

impl<T> Rc<[T]>

source

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

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

Constructs a new reference-counted slice with uninitialized contents.

Examples
#![feature(new_uninit)]
#![feature(get_mut_unchecked)]

use std::rc::Rc;

let mut values = Rc::<[u32]>::new_uninit_slice(3);

// Deferred initialization:
let data = Rc::get_mut(&mut values).unwrap();
data[0].write(1);
data[1].write(2);
data[2].write(3);

let values = unsafe { values.assume_init() };

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

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

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

Constructs a new reference-counted 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
#![feature(new_uninit)]

use std::rc::Rc;

let values = Rc::<[u32]>::new_zeroed_slice(3);
let values = unsafe { values.assume_init() };

assert_eq!(*values, [0, 0, 0])
source§

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

source

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

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

Constructs a new reference-counted slice with uninitialized contents.

Examples
#![feature(new_uninit)]
#![feature(get_mut_unchecked)]
#![feature(allocator_api)]

use std::rc::Rc;
use std::alloc::System;

let mut values = Rc::<[u32], _>::new_uninit_slice_in(3, System);

let values = unsafe {
    // Deferred initialization:
    Rc::get_mut_unchecked(&mut values)[0].as_mut_ptr().write(1);
    Rc::get_mut_unchecked(&mut values)[1].as_mut_ptr().write(2);
    Rc::get_mut_unchecked(&mut values)[2].as_mut_ptr().write(3);

    values.assume_init()
};

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

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

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

Constructs a new reference-counted 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
#![feature(new_uninit)]
#![feature(allocator_api)]

use std::rc::Rc;
use std::alloc::System;

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

assert_eq!(*values, [0, 0, 0])
source§

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

source

pub unsafe fn assume_init(self) -> Rc<T, A>
where A: Clone,

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

Converts to Rc<T>.

Safety

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

Examples
#![feature(new_uninit)]
#![feature(get_mut_unchecked)]

use std::rc::Rc;

let mut five = Rc::<u32>::new_uninit();

// Deferred initialization:
Rc::get_mut(&mut five).unwrap().write(5);

let five = unsafe { five.assume_init() };

assert_eq!(*five, 5)
source§

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

source

pub unsafe fn assume_init(self) -> Rc<[T], A>
where A: Clone,

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

Converts to Rc<[T]>.

Safety

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

Examples
#![feature(new_uninit)]
#![feature(get_mut_unchecked)]

use std::rc::Rc;

let mut values = Rc::<[u32]>::new_uninit_slice(3);

// Deferred initialization:
let data = Rc::get_mut(&mut values).unwrap();
data[0].write(1);
data[1].write(2);
data[2].write(3);

let values = unsafe { values.assume_init() };

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

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

1.17.0 · source

pub unsafe fn from_raw(ptr: *const T) -> Rc<T>

Constructs an Rc<T> from a raw pointer.

The raw pointer must have been previously returned by a call to Rc<U>::into_raw where U must have the same size and alignment as T. This is trivially true if U is T. Note that if U is not T but has the same size and alignment, this is basically like transmuting references of different types. See mem::transmute for more information on what restrictions apply in this case.

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

The user of from_raw has to make sure a specific value of T is only dropped once.

This function is unsafe because improper use may lead to memory unsafety, even if the returned Rc<T> is never accessed.

Examples
use std::rc::Rc;

let x = Rc::new("hello".to_owned());
let x_ptr = Rc::into_raw(x);

unsafe {
    // Convert back to an `Rc` to prevent leak.
    let x = Rc::from_raw(x_ptr);
    assert_eq!(&*x, "hello");

    // Further calls to `Rc::from_raw(x_ptr)` would be memory-unsafe.
}

// The memory was freed when `x` went out of scope above, so `x_ptr` is now dangling!
1.53.0 · source

pub unsafe fn increment_strong_count(ptr: *const T)

Increments the strong reference count on the Rc<T> associated with the provided pointer by one.

Safety

The pointer must have been obtained through Rc::into_raw, the associated Rc instance must be valid (i.e. the strong count must be at least 1) for the duration of this method, and ptr must point to a block of memory allocated by the global allocator.

Examples
use std::rc::Rc;

let five = Rc::new(5);

unsafe {
    let ptr = Rc::into_raw(five);
    Rc::increment_strong_count(ptr);

    let five = Rc::from_raw(ptr);
    assert_eq!(2, Rc::strong_count(&five));
}
1.53.0 · source

pub unsafe fn decrement_strong_count(ptr: *const T)

Decrements the strong reference count on the Rc<T> associated with the provided pointer by one.

Safety

The pointer must have been obtained through Rc::into_raw, the associated Rc instance must be valid (i.e. the strong count must be at least 1) when invoking this method, and ptr must point to a block of memory allocated by the global allocator. This method can be used to release the final Rc and backing storage, but should not be called after the final Rc has been released.

Examples
use std::rc::Rc;

let five = Rc::new(5);

unsafe {
    let ptr = Rc::into_raw(five);
    Rc::increment_strong_count(ptr);

    let five = Rc::from_raw(ptr);
    assert_eq!(2, Rc::strong_count(&five));
    Rc::decrement_strong_count(ptr);
    assert_eq!(1, Rc::strong_count(&five));
}
source§

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

1.17.0 · source

pub fn into_raw(this: Rc<T, A>) -> *const T

Consumes the Rc, returning the wrapped pointer.

To avoid a memory leak the pointer must be converted back to an Rc using Rc::from_raw.

Examples
use std::rc::Rc;

let x = Rc::new("hello".to_owned());
let x_ptr = Rc::into_raw(x);
assert_eq!(unsafe { &*x_ptr }, "hello");
1.45.0 · source

pub fn as_ptr(this: &Rc<T, A>) -> *const T

Provides a raw pointer to the data.

The counts are not affected in any way and the Rc is not consumed. The pointer is valid for as long there are strong counts in the Rc.

Examples
use std::rc::Rc;

let x = Rc::new("hello".to_owned());
let y = Rc::clone(&x);
let x_ptr = Rc::as_ptr(&x);
assert_eq!(x_ptr, Rc::as_ptr(&y));
assert_eq!(unsafe { &*x_ptr }, "hello");
source

pub unsafe fn from_raw_in(ptr: *const T, alloc: A) -> Rc<T, A>

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

Constructs an Rc<T, A> from a raw pointer in the provided allocator.

The raw pointer must have been previously returned by a call to Rc<U, A>::into_raw where U must have the same size and alignment as T. This is trivially true if U is T. Note that if U is not T but has the same size and alignment, this is basically like transmuting references of different types. See mem::transmute for more information on what restrictions apply in this case.

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

The user of from_raw has to make sure a specific value of T is only dropped once.

This function is unsafe because improper use may lead to memory unsafety, even if the returned Rc<T> is never accessed.

Examples
#![feature(allocator_api)]

use std::rc::Rc;
use std::alloc::System;

let x = Rc::new_in("hello".to_owned(), System);
let x_ptr = Rc::into_raw(x);

unsafe {
    // Convert back to an `Rc` to prevent leak.
    let x = Rc::from_raw_in(x_ptr, System);
    assert_eq!(&*x, "hello");

    // Further calls to `Rc::from_raw(x_ptr)` would be memory-unsafe.
}

// The memory was freed when `x` went out of scope above, so `x_ptr` is now dangling!
1.4.0 · source

pub fn downgrade(this: &Rc<T, A>) -> Weak<T, A>
where A: Clone,

Creates a new Weak pointer to this allocation.

Examples
use std::rc::Rc;

let five = Rc::new(5);

let weak_five = Rc::downgrade(&five);
1.15.0 · source

pub fn weak_count(this: &Rc<T, A>) -> usize

Gets the number of Weak pointers to this allocation.

Examples
use std::rc::Rc;

let five = Rc::new(5);
let _weak_five = Rc::downgrade(&five);

assert_eq!(1, Rc::weak_count(&five));
1.15.0 · source

pub fn strong_count(this: &Rc<T, A>) -> usize

Gets the number of strong (Rc) pointers to this allocation.

Examples
use std::rc::Rc;

let five = Rc::new(5);
let _also_five = Rc::clone(&five);

assert_eq!(2, Rc::strong_count(&five));
source

pub unsafe fn increment_strong_count_in(ptr: *const T, alloc: A)
where A: Clone,

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

Increments the strong reference count on the Rc<T> associated with the provided pointer by one.

Safety

The pointer must have been obtained through Rc::into_raw, the associated Rc instance must be valid (i.e. the strong count must be at least 1) for the duration of this method, and ptr must point to a block of memory allocated by alloc

Examples
#![feature(allocator_api)]

use std::rc::Rc;
use std::alloc::System;

let five = Rc::new_in(5, System);

unsafe {
    let ptr = Rc::into_raw(five);
    Rc::increment_strong_count_in(ptr, System);

    let five = Rc::from_raw_in(ptr, System);
    assert_eq!(2, Rc::strong_count(&five));
}
source

pub unsafe fn decrement_strong_count_in(ptr: *const T, alloc: A)

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

Decrements the strong reference count on the Rc<T> associated with the provided pointer by one.

Safety

The pointer must have been obtained through Rc::into_raw, the associated Rc instance must be valid (i.e. the strong count must be at least 1) when invoking this method, and ptr must point to a block of memory allocated by alloc. This method can be used to release the final Rc and backing storage, but should not be called after the final Rc has been released.

Examples
#![feature(allocator_api)]

use std::rc::Rc;
use std::alloc::System;

let five = Rc::new_in(5, System);

unsafe {
    let ptr = Rc::into_raw(five);
    Rc::increment_strong_count_in(ptr, System);

    let five = Rc::from_raw_in(ptr, System);
    assert_eq!(2, Rc::strong_count(&five));
    Rc::decrement_strong_count_in(ptr, System);
    assert_eq!(1, Rc::strong_count(&five));
}
1.4.0 · source

pub fn get_mut(this: &mut Rc<T, A>) -> Option<&mut T>

Returns a mutable reference into the given Rc, if there are no other Rc or Weak pointers to the same allocation.

Returns None otherwise, because it is not safe to mutate a shared value.

See also make_mut, which will clone the inner value when there are other Rc pointers.

Examples
use std::rc::Rc;

let mut x = Rc::new(3);
*Rc::get_mut(&mut x).unwrap() = 4;
assert_eq!(*x, 4);

let _y = Rc::clone(&x);
assert!(Rc::get_mut(&mut x).is_none());
source

pub unsafe fn get_mut_unchecked(this: &mut Rc<T, A>) -> &mut T

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

Returns a mutable reference into the given Rc, without any check.

See also get_mut, which is safe and does appropriate checks.

Safety

If any other Rc or Weak pointers to the same allocation exist, then they must not be dereferenced or have active borrows for the duration of the returned borrow, and their inner type must be exactly the same as the inner type of this Rc (including lifetimes). This is trivially the case if no such pointers exist, for example immediately after Rc::new.

Examples
#![feature(get_mut_unchecked)]

use std::rc::Rc;

let mut x = Rc::new(String::new());
unsafe {
    Rc::get_mut_unchecked(&mut x).push_str("foo")
}
assert_eq!(*x, "foo");

Other Rc pointers to the same allocation must be to the same type.

#![feature(get_mut_unchecked)]

use std::rc::Rc;

let x: Rc<str> = Rc::from("Hello, world!");
let mut y: Rc<[u8]> = x.clone().into();
unsafe {
    // this is Undefined Behavior, because x's inner type is str, not [u8]
    Rc::get_mut_unchecked(&mut y).fill(0xff); // 0xff is invalid in UTF-8
}
println!("{}", &*x); // Invalid UTF-8 in a str

Other Rc pointers to the same allocation must be to the exact same type, including lifetimes.

#![feature(get_mut_unchecked)]

use std::rc::Rc;

let x: Rc<&str> = Rc::new("Hello, world!");
{
    let s = String::from("Oh, no!");
    let mut y: Rc<&str> = x.clone().into();
    unsafe {
        // this is Undefined Behavior, because x's inner type
        // is &'long str, not &'short str
        *Rc::get_mut_unchecked(&mut y) = &s;
    }
}
println!("{}", &*x); // Use-after-free
1.17.0 · source

pub fn ptr_eq(this: &Rc<T, A>, other: &Rc<T, A>) -> bool

Returns true if the two Rcs point to the same allocation in a vein similar to ptr::eq. This function ignores the metadata of dyn Trait pointers.

Examples
use std::rc::Rc;

let five = Rc::new(5);
let same_five = Rc::clone(&five);
let other_five = Rc::new(5);

assert!(Rc::ptr_eq(&five, &same_five));
assert!(!Rc::ptr_eq(&five, &other_five));
source§

impl<T, A> Rc<T, A>
where T: Clone, A: Allocator + Clone,

1.4.0 · source

pub fn make_mut(this: &mut Rc<T, A>) -> &mut T

Makes a mutable reference into the given Rc.

If there are other Rc pointers to the same allocation, then make_mut will clone the inner value to a new allocation to ensure unique ownership. This is also referred to as clone-on-write.

However, if there are no other Rc pointers to this allocation, but some Weak pointers, then the Weak pointers will be disassociated and the inner value will not be cloned.

See also get_mut, which will fail rather than cloning the inner value or disassociating Weak pointers.

Examples
use std::rc::Rc;

let mut data = Rc::new(5);

*Rc::make_mut(&mut data) += 1;         // Won't clone anything
let mut other_data = Rc::clone(&data); // Won't clone inner data
*Rc::make_mut(&mut data) += 1;         // Clones inner data
*Rc::make_mut(&mut data) += 1;         // Won't clone anything
*Rc::make_mut(&mut other_data) *= 2;   // Won't clone anything

// Now `data` and `other_data` point to different allocations.
assert_eq!(*data, 8);
assert_eq!(*other_data, 12);

Weak pointers will be disassociated:

use std::rc::Rc;

let mut data = Rc::new(75);
let weak = Rc::downgrade(&data);

assert!(75 == *data);
assert!(75 == *weak.upgrade().unwrap());

*Rc::make_mut(&mut data) += 1;

assert!(76 == *data);
assert!(weak.upgrade().is_none());
1.76.0 · source

pub fn unwrap_or_clone(this: Rc<T, A>) -> T

If we have the only reference to T then unwrap it. Otherwise, clone T and return the clone.

Assuming rc_t is of type Rc<T>, this function is functionally equivalent to (*rc_t).clone(), but will avoid cloning the inner value where possible.

Examples
let inner = String::from("test");
let ptr = inner.as_ptr();

let rc = Rc::new(inner);
let inner = Rc::unwrap_or_clone(rc);
// The inner value was not cloned
assert!(ptr::eq(ptr, inner.as_ptr()));

let rc = Rc::new(inner);
let rc2 = rc.clone();
let inner = Rc::unwrap_or_clone(rc);
// Because there were 2 references, we had to clone the inner value.
assert!(!ptr::eq(ptr, inner.as_ptr()));
// `rc2` is the last reference, so when we unwrap it we get back
// the original `String`.
let inner = Rc::unwrap_or_clone(rc2);
assert!(ptr::eq(ptr, inner.as_ptr()));
source§

impl<A> Rc<dyn Any, A>
where A: Allocator + Clone,

1.29.0 · source

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

Attempt to downcast the Rc<dyn Any> to a concrete type.

Examples
use std::any::Any;
use std::rc::Rc;

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

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

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

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

Downcasts the Rc<dyn Any> to a concrete type.

For a safe alternative see downcast.

Examples
#![feature(downcast_unchecked)]

use std::any::Any;
use std::rc::Rc;

let x: Rc<dyn Any> = Rc::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.

Trait Implementations§

1.69.0 · source§

impl<T> AsFd for Rc<T>
where T: AsFd,

source§

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

Borrows the file descriptor. Read more
1.69.0 · source§

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

source§

fn as_raw_fd(&self) -> i32

Extracts the raw file descriptor. Read more
source§

impl<T> AsRawXcbConnection for Rc<T>

source§

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 Rc<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<T, A> Borrow<T> for Rc<T, A>
where A: Allocator, T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BufferRef for Rc<T>
where T: BufferRef + ?Sized,

source§

fn len(&self) -> usize

source§

fn read<const N: usize>(&self, offset: usize) -> &[u8; N]

source§

impl<T> CalculateSizeFor for Rc<T>
where T: CalculateSizeFor + ?Sized,

source§

fn calculate_size_for(nr_of_el: u64) -> NonZeroU64

Returns the size of Self assuming the (contained) runtime-sized array has nr_of_el elements
source§

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

source§

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

Makes a clone of the Rc pointer.

This creates another pointer to the same allocation, increasing the strong reference count.

Examples
use std::rc::Rc;

let five = Rc::new(5);

let _ = Rc::clone(&five);
source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

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

source§

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

Wait for a new event from the X11 server.
source§

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

Wait for a new raw/unparsed event from the X11 server.
source§

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

Wait for a new event from the X11 server.
source§

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

Wait for a new raw/unparsed event from the X11 server.
source§

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

Poll for a new event from the X11 server.
source§

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

Poll for a new raw/unparsed event from the X11 server.
source§

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

Poll for a new event from the X11 server.
source§

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

Poll for a new unparsed/raw event from the X11 server.
source§

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

Send all pending requests to the server. Read more
source§

fn setup(&self) -> &Setup

Get the setup information sent by the X11 server. Read more
source§

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

Generate a new X11 identifier. Read more
source§

impl<T> CreateFrom for Rc<T>
where T: CreateFrom + ?Sized,

source§

fn create_from<B>(reader: &mut Reader<B>) -> Rc<T>
where B: BufferRef,

source§

impl<T, A> Debug for Rc<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
source§

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

source§

fn default() -> Rc<T>

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

Examples
use std::rc::Rc;

let x: Rc<i32> = Default::default();
assert_eq!(*x, 0);
source§

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

§

type Target = T

The resulting type after dereferencing.
source§

fn deref(&self) -> &T

Dereferences the value.
source§

impl<T, A> Display for Rc<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
source§

impl<T, A> Drop for Rc<T, A>
where A: Allocator, T: ?Sized,

source§

fn drop(&mut self)

Drops the Rc.

This will decrement the strong reference count. If the strong reference count reaches zero then the only other references (if any) are Weak, so we drop the inner value.

Examples
use std::rc::Rc;

struct Foo;

impl Drop for Foo {
    fn drop(&mut self) {
        println!("dropped!");
    }
}

let foo  = Rc::new(Foo);
let foo2 = Rc::clone(&foo);

drop(foo);    // Doesn't print anything
drop(foo2);   // Prints "dropped!"
1.21.0 · source§

impl<T> From<&[T]> for Rc<[T]>
where T: Clone,

source§

fn from(v: &[T]) -> Rc<[T]>

Allocate a reference-counted slice and fill it by cloning v’s items.

Example
let original: &[i32] = &[1, 2, 3];
let shared: Rc<[i32]> = Rc::from(original);
assert_eq!(&[1, 2, 3], &shared[..]);
1.24.0 · source§

impl From<&CStr> for Rc<CStr>

source§

fn from(s: &CStr) -> Rc<CStr>

Converts a &CStr into a Rc<CStr>, by copying the contents into a newly allocated Rc.

1.24.0 · source§

impl From<&OsStr> for Rc<OsStr>

source§

fn from(s: &OsStr) -> Rc<OsStr>

Copies the string into a newly allocated Rc<OsStr>.

1.24.0 · source§

impl From<&Path> for Rc<Path>

source§

fn from(s: &Path) -> Rc<Path>

Converts a Path into an Rc by copying the Path data into a new Rc buffer.

1.21.0 · source§

impl From<&str> for Rc<str>

source§

fn from(v: &str) -> Rc<str>

Allocate a reference-counted string slice and copy v into it.

Example
let shared: Rc<str> = Rc::from("statue");
assert_eq!("statue", &shared[..]);
1.74.0 · source§

impl<T, const N: usize> From<[T; N]> for Rc<[T]>

source§

fn from(v: [T; N]) -> Rc<[T]>

Converts a [T; N] into an Rc<[T]>.

The conversion moves the array into a newly allocated Rc.

Example
let original: [i32; 3] = [1, 2, 3];
let shared: Rc<[i32]> = Rc::from(original);
assert_eq!(&[1, 2, 3], &shared[..]);
1.21.0 · source§

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

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);
1.24.0 · source§

impl From<CString> for Rc<CStr>

source§

fn from(s: CString) -> Rc<CStr>

Converts a CString into an Rc<CStr> by moving the CString data into a new Rc buffer.

1.45.0 · source§

impl<'a, B> From<Cow<'a, B>> for Rc<B>
where B: ToOwned + ?Sized, Rc<B>: From<&'a B> + From<<B as ToOwned>::Owned>,

source§

fn from(cow: Cow<'a, B>) -> Rc<B>

Create a reference-counted pointer from a clone-on-write pointer by copying its content.

Example
let cow: Cow<'_, str> = Cow::Borrowed("eggplant");
let shared: Rc<str> = Rc::from(cow);
assert_eq!("eggplant", &shared[..]);
1.24.0 · source§

impl From<OsString> for Rc<OsStr>

source§

fn from(s: OsString) -> Rc<OsStr>

Converts an OsString into an Rc<OsStr> by moving the OsString data into a new Rc buffer.

1.24.0 · source§

impl From<PathBuf> for Rc<Path>

source§

fn from(s: PathBuf) -> Rc<Path>

Converts a PathBuf into an Rc<Path> by moving the PathBuf data into a new Rc buffer.

1.62.0 · source§

impl From<Rc<str>> for Rc<[u8]>

source§

fn from(rc: Rc<str>) -> Rc<[u8]>

Converts a reference-counted string slice into a byte slice.

Example
let string: Rc<str> = Rc::from("eggplant");
let bytes: Rc<[u8]> = Rc::from(string);
assert_eq!("eggplant".as_bytes(), bytes.as_ref());
1.21.0 · source§

impl From<String> for Rc<str>

source§

fn from(v: String) -> Rc<str>

Allocate a reference-counted string slice and copy v into it.

Example
let original: String = "statue".to_owned();
let shared: Rc<str> = Rc::from(original);
assert_eq!("statue", &shared[..]);
1.6.0 · source§

impl<T> From<T> for Rc<T>

source§

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

Converts a generic type T into an Rc<T>

The conversion allocates on the heap and moves t from the stack into it.

Example
let x = 5;
let rc = Rc::new(5);

assert_eq!(Rc::from(x), rc);
1.21.0 · source§

impl<T, A> From<Vec<T, A>> for Rc<[T], A>
where A: Allocator,

source§

fn from(v: Vec<T, A>) -> Rc<[T], A>

Allocate a reference-counted slice and move v’s items into it.

Example
let unique: Vec<i32> = vec![1, 2, 3];
let shared: Rc<[i32]> = Rc::from(unique);
assert_eq!(&[1, 2, 3], &shared[..]);
1.37.0 · source§

impl<T> FromIterator<T> for Rc<[T]>

source§

fn from_iter<I>(iter: I) -> Rc<[T]>
where I: IntoIterator<Item = T>,

Takes each element in the Iterator and collects it into an Rc<[T]>.

Performance characteristics
The general case

In the general case, collecting into Rc<[T]> is done by first collecting into a Vec<T>. That is, when writing the following:

let evens: Rc<[u8]> = (0..10).filter(|&x| x % 2 == 0).collect();

this behaves as if we wrote:

let evens: Rc<[u8]> = (0..10).filter(|&x| x % 2 == 0)
    .collect::<Vec<_>>() // The first set of allocations happens here.
    .into(); // A second allocation for `Rc<[T]>` happens here.

This will allocate as many times as needed for constructing the Vec<T> and then it will allocate once for turning the Vec<T> into the Rc<[T]>.

Iterators of known length

When your Iterator implements TrustedLen and is of an exact size, a single allocation will be made for the Rc<[T]>. For example:

let evens: Rc<[u8]> = (0..10).collect(); // Just a single allocation happens here.
source§

impl<H> HasDisplayHandle for Rc<H>
where H: HasDisplayHandle + ?Sized,

source§

fn display_handle(&self) -> Result<DisplayHandle<'_>, HandleError>

Get a handle to the display controller of the windowing system.
source§

impl<H> HasWindowHandle for Rc<H>
where H: HasWindowHandle + ?Sized,

source§

fn window_handle(&self) -> Result<WindowHandle<'_>, HandleError>

Get a handle to the window.
source§

impl<T, A> Hash for Rc<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
source§

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

source§

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

Comparison for two Rcs.

The two are compared by calling cmp() on their inner values.

Examples
use std::rc::Rc;
use std::cmp::Ordering;

let five = Rc::new(5);

assert_eq!(Ordering::Less, five.cmp(&Rc::new(6)));
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 + PartialOrd,

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

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

source§

fn eq(&self, other: &Rc<T, A>) -> bool

Equality for two Rcs.

Two Rcs are equal if their inner values are equal, even if they are stored in different allocation.

If T also implements Eq (implying reflexivity of equality), two Rcs that point to the same allocation are always equal.

Examples
use std::rc::Rc;

let five = Rc::new(5);

assert!(five == Rc::new(5));
source§

fn ne(&self, other: &Rc<T, A>) -> bool

Inequality for two Rcs.

Two Rcs are not equal if their inner values are not equal.

If T also implements Eq (implying reflexivity of equality), two Rcs that point to the same allocation are always equal.

Examples
use std::rc::Rc;

let five = Rc::new(5);

assert!(five != Rc::new(6));
source§

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

source§

fn partial_cmp(&self, other: &Rc<T, A>) -> Option<Ordering>

Partial comparison for two Rcs.

The two are compared by calling partial_cmp() on their inner values.

Examples
use std::rc::Rc;
use std::cmp::Ordering;

let five = Rc::new(5);

assert_eq!(Some(Ordering::Less), five.partial_cmp(&Rc::new(6)));
source§

fn lt(&self, other: &Rc<T, A>) -> bool

Less-than comparison for two Rcs.

The two are compared by calling < on their inner values.

Examples
use std::rc::Rc;

let five = Rc::new(5);

assert!(five < Rc::new(6));
source§

fn le(&self, other: &Rc<T, A>) -> bool

‘Less than or equal to’ comparison for two Rcs.

The two are compared by calling <= on their inner values.

Examples
use std::rc::Rc;

let five = Rc::new(5);

assert!(five <= Rc::new(5));
source§

fn gt(&self, other: &Rc<T, A>) -> bool

Greater-than comparison for two Rcs.

The two are compared by calling > on their inner values.

Examples
use std::rc::Rc;

let five = Rc::new(5);

assert!(five > Rc::new(4));
source§

fn ge(&self, other: &Rc<T, A>) -> bool

‘Greater than or equal to’ comparison for two Rcs.

The two are compared by calling >= on their inner values.

Examples
use std::rc::Rc;

let five = Rc::new(5);

assert!(five >= Rc::new(5));
source§

impl<T, A> Pointer for Rc<T, A>
where A: Allocator, T: ?Sized,

source§

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

Formats the value using the given formatter.
source§

impl<C> RequestConnection for Rc<C>

§

type Buf = <C as RequestConnection>::Buf

Type used as buffer to store raw replies or events before they are parsed.
source§

fn send_request_with_reply<R>( &self, bufs: &[IoSlice<'_>], fds: Vec<OwnedFd> ) -> Result<Cookie<'_, Rc<C>, R>, ConnectionError>
where R: TryParse,

Send a request with a reply to the server. Read more
source§

fn send_trait_request_with_reply<R>( &self, request: R ) -> Result<Cookie<'_, Rc<C>, <R as ReplyRequest>::Reply>, ConnectionError>
where R: ReplyRequest,

Send a request with a reply to the server. Read more
source§

fn send_request_with_reply_with_fds<R>( &self, bufs: &[IoSlice<'_>], fds: Vec<OwnedFd> ) -> Result<CookieWithFds<'_, Rc<C>, R>, ConnectionError>
where R: TryParseFd,

Send a request with a reply containing file descriptors to the server. Read more
source§

fn send_trait_request_with_reply_with_fds<R>( &self, request: R ) -> Result<CookieWithFds<'_, Rc<C>, <R as ReplyFDsRequest>::Reply>, ConnectionError>
where R: ReplyFDsRequest,

Send a request with a reply containing file descriptors to the server. Read more
source§

fn send_request_without_reply( &self, bufs: &[IoSlice<'_>], fds: Vec<OwnedFd> ) -> Result<VoidCookie<'_, Rc<C>>, ConnectionError>

Send a request without a reply to the server. Read more
source§

fn send_trait_request_without_reply<R>( &self, request: R ) -> Result<VoidCookie<'_, Rc<C>>, ConnectionError>
where R: VoidRequest,

Send a request without a reply to the server. Read more
source§

fn discard_reply(&self, sequence: u64, kind: RequestKind, mode: DiscardMode)

A reply to an error should be discarded. Read more
source§

fn prefetch_extension_information( &self, extension_name: &'static str ) -> Result<(), ConnectionError>

Prefetches information about an extension. Read more
source§

fn extension_information( &self, extension_name: &'static str ) -> Result<Option<ExtensionInformation>, ConnectionError>

Get information about an extension. Read more
source§

fn wait_for_reply_or_error( &self, sequence: u64 ) -> Result<<Rc<C> as RequestConnection>::Buf, ReplyError>

Wait for the reply to a request. Read more
source§

fn wait_for_reply_or_raw_error( &self, sequence: u64 ) -> Result<ReplyOrError<<Rc<C> as RequestConnection>::Buf>, ConnectionError>

Wait for the reply to a request. Read more
source§

fn wait_for_reply( &self, sequence: u64 ) -> Result<Option<<Rc<C> as RequestConnection>::Buf>, ConnectionError>

Wait for the reply to a request. Read more
source§

fn wait_for_reply_with_fds( &self, sequence: u64 ) -> Result<(<Rc<C> as RequestConnection>::Buf, Vec<OwnedFd>), ReplyError>

Wait for the reply to a request that has FDs. Read more
source§

fn wait_for_reply_with_fds_raw( &self, sequence: u64 ) -> Result<ReplyOrError<(<Rc<C> as RequestConnection>::Buf, Vec<OwnedFd>), <Rc<C> as RequestConnection>::Buf>, ConnectionError>

Wait for the reply to a request that has FDs. Read more
source§

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
source§

fn check_for_raw_error( &self, sequence: u64 ) -> Result<Option<<Rc<C> as RequestConnection>::Buf>, ConnectionError>

Check whether a request that does not have a reply caused an X11 error. Read more
source§

fn prefetch_maximum_request_bytes(&self)

Prefetches the maximum request length. Read more
source§

fn maximum_request_bytes(&self) -> usize

The maximum number of bytes that the X11 server accepts in a request.
source§

fn parse_error(&self, error: &[u8]) -> Result<X11Error, ParseError>

Parse a generic error.
source§

fn parse_event(&self, event: &[u8]) -> Result<Event, ParseError>

Parse a generic event.
source§

impl<T> ShaderSize for Rc<T>
where T: ShaderSize + ?Sized,

source§

const SHADER_SIZE: NonZeroU64 = T::SHADER_SIZE

Represents WGSL Size (equivalent to ShaderType::min_size)
source§

impl<T> ShaderType for Rc<T>
where T: ShaderType + ?Sized,

source§

fn size(&self) -> NonZeroU64

Returns the size of Self at runtime Read more
source§

fn min_size() -> NonZeroU64

Represents the minimum size of Self (equivalent to GPUBufferBindingLayout.minBindingSize) Read more
source§

fn assert_uniform_compat()

1.43.0 · source§

impl<T, const N: usize> TryFrom<Rc<[T]>> for Rc<[T; N]>

§

type Error = Rc<[T]>

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

fn try_from( boxed_slice: Rc<[T]> ) -> Result<Rc<[T; N]>, <Rc<[T; N]> as TryFrom<Rc<[T]>>>::Error>

Performs the conversion.
source§

impl<T> WriteInto for Rc<T>
where T: WriteInto + ?Sized,

source§

fn write_into<B>(&self, writer: &mut Writer<B>)
where B: BufferMut,

source§

impl<T, U, A> CoerceUnsized<Rc<U, A>> for Rc<T, A>
where T: Unsize<U> + ?Sized, A: Allocator, U: ?Sized,

source§

impl<T, U> DispatchFromDyn<Rc<U>> for Rc<T>
where T: Unsize<U> + ?Sized, U: ?Sized,

source§

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

1.58.0 · source§

impl<T, A> RefUnwindSafe for Rc<T, A>

source§

impl<T, A> !Send for Rc<T, A>
where A: Allocator, T: ?Sized,

source§

impl<T, A> !Sync for Rc<T, A>
where A: Allocator, T: ?Sized,

1.33.0 · source§

impl<T, A> Unpin for Rc<T, A>
where A: Allocator, T: ?Sized,

1.9.0 · source§

impl<T, A> UnwindSafe for Rc<T, A>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, U> AsBindGroupShaderType<U> for T
where U: ShaderType, &'a T: for<'a> Into<U>,

source§

fn as_bind_group_shader_type(&self, _images: &RenderAssets<Image>) -> U

Return the T ShaderType for self. When used in AsBindGroup derives, it is safe to assume that all images in self exist.
source§

impl<T> AsSource for T
where T: AsFd,

source§

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

Returns the borrowed file descriptor.
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

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

source§

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

Compare self to key and return their ordering.
source§

impl<C> ConnectionExt for C

source§

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
source§

fn change_window_attributes<'c, 'input>( &'c self, window: u32, value_list: &'input ChangeWindowAttributesAux ) -> Result<VoidCookie<'c, Self>, ConnectionError>

change window attributes. Read more
source§

fn get_window_attributes( &self, window: u32 ) -> Result<Cookie<'_, Self, GetWindowAttributesReply>, ConnectionError>

Gets window attributes. Read more
source§

fn destroy_window( &self, window: u32 ) -> Result<VoidCookie<'_, Self>, ConnectionError>

Destroys a window. Read more
source§

fn destroy_subwindows( &self, window: u32 ) -> Result<VoidCookie<'_, Self>, ConnectionError>

source§

fn change_save_set( &self, mode: SetMode, window: u32 ) -> Result<VoidCookie<'_, Self>, ConnectionError>

Changes a client’s save set. Read more
source§

fn reparent_window( &self, window: u32, parent: u32, x: i16, y: i16 ) -> Result<VoidCookie<'_, Self>, ConnectionError>

Reparents a window. Read more
source§

fn map_window( &self, window: u32 ) -> Result<VoidCookie<'_, Self>, ConnectionError>

Makes a window visible. Read more
source§

fn map_subwindows( &self, window: u32 ) -> Result<VoidCookie<'_, Self>, ConnectionError>

source§

fn unmap_window( &self, window: u32 ) -> Result<VoidCookie<'_, Self>, ConnectionError>

Makes a window invisible. Read more
source§

fn unmap_subwindows( &self, window: u32 ) -> Result<VoidCookie<'_, Self>, ConnectionError>

source§

fn configure_window<'c, 'input>( &'c self, window: u32, value_list: &'input ConfigureWindowAux ) -> Result<VoidCookie<'c, Self>, ConnectionError>

Configures window attributes. Read more
source§

fn circulate_window( &self, direction: Circulate, window: u32 ) -> Result<VoidCookie<'_, Self>, ConnectionError>

Change window stacking order. Read more
source§

fn get_geometry( &self, drawable: u32 ) -> Result<Cookie<'_, Self, GetGeometryReply>, ConnectionError>

Get current window geometry. Read more
source§

fn query_tree( &self, window: u32 ) -> Result<Cookie<'_, Self, QueryTreeReply>, ConnectionError>

query the window tree. Read more
source§

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
source§

fn get_atom_name( &self, atom: u32 ) -> Result<Cookie<'_, Self, GetAtomNameReply>, ConnectionError>

source§

fn change_property<A, B, 'c, 'input>( &'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
source§

fn delete_property( &self, window: u32, property: u32 ) -> Result<VoidCookie<'_, Self>, ConnectionError>

source§

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
source§

fn list_properties( &self, window: u32 ) -> Result<Cookie<'_, Self, ListPropertiesReply>, ConnectionError>

source§

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
source§

fn get_selection_owner( &self, selection: u32 ) -> Result<Cookie<'_, Self, GetSelectionOwnerReply>, ConnectionError>

Gets the owner of a selection. Read more
source§

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

source§

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
source§

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
source§

fn ungrab_pointer<A>( &self, time: A ) -> Result<VoidCookie<'_, Self>, ConnectionError>
where A: Into<u32>,

release the pointer. Read more
source§

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
source§

fn ungrab_button( &self, button: ButtonIndex, grab_window: u32, modifiers: ModMask ) -> Result<VoidCookie<'_, Self>, ConnectionError>

source§

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

source§

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
source§

fn ungrab_keyboard<A>( &self, time: A ) -> Result<VoidCookie<'_, Self>, ConnectionError>
where A: Into<u32>,

source§

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
source§

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
source§

fn allow_events<A>( &self, mode: Allow, time: A ) -> Result<VoidCookie<'_, Self>, ConnectionError>
where A: Into<u32>,

release queued events. Read more
source§

fn grab_server(&self) -> Result<VoidCookie<'_, Self>, ConnectionError>

source§

fn ungrab_server(&self) -> Result<VoidCookie<'_, Self>, ConnectionError>

source§

fn query_pointer( &self, window: u32 ) -> Result<Cookie<'_, Self, QueryPointerReply>, ConnectionError>

get pointer coordinates. Read more
source§

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

source§

fn translate_coordinates( &self, src_window: u32, dst_window: u32, src_x: i16, src_y: i16 ) -> Result<Cookie<'_, Self, TranslateCoordinatesReply>, ConnectionError>

source§

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
source§

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
source§

fn get_input_focus( &self ) -> Result<Cookie<'_, Self, GetInputFocusReply>, ConnectionError>

source§

fn query_keymap( &self ) -> Result<Cookie<'_, Self, QueryKeymapReply>, ConnectionError>

source§

fn open_font<'c, 'input>( &'c self, fid: u32, name: &'input [u8] ) -> Result<VoidCookie<'c, Self>, ConnectionError>

opens a font. Read more
source§

fn close_font(&self, font: u32) -> Result<VoidCookie<'_, Self>, ConnectionError>

source§

fn query_font( &self, font: u32 ) -> Result<Cookie<'_, Self, QueryFontReply>, ConnectionError>

query font metrics. Read more
source§

fn query_text_extents<'c, 'input>( &'c self, font: u32, string: &'input [Char2b] ) -> Result<Cookie<'c, Self, QueryTextExtentsReply>, ConnectionError>

get text extents. Read more
source§

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
source§

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
source§

fn set_font_path<'c, 'input>( &'c self, font: &'input [Str] ) -> Result<VoidCookie<'c, Self>, ConnectionError>

source§

fn get_font_path( &self ) -> Result<Cookie<'_, Self, GetFontPathReply>, ConnectionError>

source§

fn create_pixmap( &self, depth: u8, pid: u32, drawable: u32, width: u16, height: u16 ) -> Result<VoidCookie<'_, Self>, ConnectionError>

Creates a pixmap. Read more
source§

fn free_pixmap( &self, pixmap: u32 ) -> Result<VoidCookie<'_, Self>, ConnectionError>

Destroys a pixmap. Read more
source§

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
source§

fn change_gc<'c, 'input>( &'c self, gc: u32, value_list: &'input ChangeGCAux ) -> Result<VoidCookie<'c, Self>, ConnectionError>

change graphics context components. Read more
source§

fn copy_gc( &self, src_gc: u32, dst_gc: u32, value_mask: GC ) -> Result<VoidCookie<'_, Self>, ConnectionError>

source§

fn set_dashes<'c, 'input>( &'c self, gc: u32, dash_offset: u16, dashes: &'input [u8] ) -> Result<VoidCookie<'c, Self>, ConnectionError>

source§

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>

source§

fn free_gc(&self, gc: u32) -> Result<VoidCookie<'_, Self>, ConnectionError>

Destroys a graphics context. Read more
source§

fn clear_area( &self, exposures: bool, window: u32, x: i16, y: i16, width: u16, height: u16 ) -> Result<VoidCookie<'_, Self>, ConnectionError>

source§

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
source§

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>

source§

fn poly_point<'c, 'input>( &'c self, coordinate_mode: CoordMode, drawable: u32, gc: u32, points: &'input [Point] ) -> Result<VoidCookie<'c, Self>, ConnectionError>

source§

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
source§

fn poly_segment<'c, 'input>( &'c self, drawable: u32, gc: u32, segments: &'input [Segment] ) -> Result<VoidCookie<'c, Self>, ConnectionError>

draw lines. Read more
source§

fn poly_rectangle<'c, 'input>( &'c self, drawable: u32, gc: u32, rectangles: &'input [Rectangle] ) -> Result<VoidCookie<'c, Self>, ConnectionError>

source§

fn poly_arc<'c, 'input>( &'c self, drawable: u32, gc: u32, arcs: &'input [Arc] ) -> Result<VoidCookie<'c, Self>, ConnectionError>

source§

fn fill_poly<'c, 'input>( &'c self, drawable: u32, gc: u32, shape: PolyShape, coordinate_mode: CoordMode, points: &'input [Point] ) -> Result<VoidCookie<'c, Self>, ConnectionError>

source§

fn poly_fill_rectangle<'c, 'input>( &'c self, drawable: u32, gc: u32, rectangles: &'input [Rectangle] ) -> Result<VoidCookie<'c, Self>, ConnectionError>

Fills rectangles. Read more
source§

fn poly_fill_arc<'c, 'input>( &'c self, drawable: u32, gc: u32, arcs: &'input [Arc] ) -> Result<VoidCookie<'c, Self>, ConnectionError>

source§

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>

source§

fn get_image( &self, format: ImageFormat, drawable: u32, x: i16, y: i16, width: u16, height: u16, plane_mask: u32 ) -> Result<Cookie<'_, Self, GetImageReply>, ConnectionError>

source§

fn poly_text8<'c, 'input>( &'c self, drawable: u32, gc: u32, x: i16, y: i16, items: &'input [u8] ) -> Result<VoidCookie<'c, Self>, ConnectionError>

source§

fn poly_text16<'c, 'input>( &'c self, drawable: u32, gc: u32, x: i16, y: i16, items: &'input [u8] ) -> Result<VoidCookie<'c, Self>, ConnectionError>

source§

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
source§

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
source§

fn create_colormap( &self, alloc: ColormapAlloc, mid: u32, window: u32, visual: u32 ) -> Result<VoidCookie<'_, Self>, ConnectionError>

source§

fn free_colormap( &self, cmap: u32 ) -> Result<VoidCookie<'_, Self>, ConnectionError>

source§

fn copy_colormap_and_free( &self, mid: u32, src_cmap: u32 ) -> Result<VoidCookie<'_, Self>, ConnectionError>

source§

fn install_colormap( &self, cmap: u32 ) -> Result<VoidCookie<'_, Self>, ConnectionError>

source§

fn uninstall_colormap( &self, cmap: u32 ) -> Result<VoidCookie<'_, Self>, ConnectionError>

source§

fn list_installed_colormaps( &self, window: u32 ) -> Result<Cookie<'_, Self, ListInstalledColormapsReply>, ConnectionError>

source§

fn alloc_color( &self, cmap: u32, red: u16, green: u16, blue: u16 ) -> Result<Cookie<'_, Self, AllocColorReply>, ConnectionError>

Allocate a color. Read more
source§

fn alloc_named_color<'c, 'input>( &'c self, cmap: u32, name: &'input [u8] ) -> Result<Cookie<'c, Self, AllocNamedColorReply>, ConnectionError>

source§

fn alloc_color_cells( &self, contiguous: bool, cmap: u32, colors: u16, planes: u16 ) -> Result<Cookie<'_, Self, AllocColorCellsReply>, ConnectionError>

source§

fn alloc_color_planes( &self, contiguous: bool, cmap: u32, colors: u16, reds: u16, greens: u16, blues: u16 ) -> Result<Cookie<'_, Self, AllocColorPlanesReply>, ConnectionError>

source§

fn free_colors<'c, 'input>( &'c self, cmap: u32, plane_mask: u32, pixels: &'input [u32] ) -> Result<VoidCookie<'c, Self>, ConnectionError>

source§

fn store_colors<'c, 'input>( &'c self, cmap: u32, items: &'input [Coloritem] ) -> Result<VoidCookie<'c, Self>, ConnectionError>

source§

fn store_named_color<'c, 'input>( &'c self, flags: ColorFlag, cmap: u32, pixel: u32, name: &'input [u8] ) -> Result<VoidCookie<'c, Self>, ConnectionError>

source§

fn query_colors<'c, 'input>( &'c self, cmap: u32, pixels: &'input [u32] ) -> Result<Cookie<'c, Self, QueryColorsReply>, ConnectionError>

source§

fn lookup_color<'c, 'input>( &'c self, cmap: u32, name: &'input [u8] ) -> Result<Cookie<'c, Self, LookupColorReply>, ConnectionError>

source§

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

source§

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
source§

fn free_cursor( &self, cursor: u32 ) -> Result<VoidCookie<'_, Self>, ConnectionError>

Deletes a cursor. Read more
source§

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>

source§

fn query_best_size( &self, class: QueryShapeOf, drawable: u32, width: u16, height: u16 ) -> Result<Cookie<'_, Self, QueryBestSizeReply>, ConnectionError>

source§

fn query_extension<'c, 'input>( &'c self, name: &'input [u8] ) -> Result<Cookie<'c, Self, QueryExtensionReply>, ConnectionError>

check if extension is present. Read more
source§

fn list_extensions( &self ) -> Result<Cookie<'_, Self, ListExtensionsReply>, ConnectionError>

source§

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>

source§

fn get_keyboard_mapping( &self, first_keycode: u8, count: u8 ) -> Result<Cookie<'_, Self, GetKeyboardMappingReply>, ConnectionError>

source§

fn change_keyboard_control<'c, 'input>( &'c self, value_list: &'input ChangeKeyboardControlAux ) -> Result<VoidCookie<'c, Self>, ConnectionError>

source§

fn get_keyboard_control( &self ) -> Result<Cookie<'_, Self, GetKeyboardControlReply>, ConnectionError>

source§

fn bell(&self, percent: i8) -> Result<VoidCookie<'_, Self>, ConnectionError>

source§

fn change_pointer_control( &self, acceleration_numerator: i16, acceleration_denominator: i16, threshold: i16, do_acceleration: bool, do_threshold: bool ) -> Result<VoidCookie<'_, Self>, ConnectionError>

source§

fn get_pointer_control( &self ) -> Result<Cookie<'_, Self, GetPointerControlReply>, ConnectionError>

source§

fn set_screen_saver( &self, timeout: i16, interval: i16, prefer_blanking: Blanking, allow_exposures: Exposures ) -> Result<VoidCookie<'_, Self>, ConnectionError>

source§

fn get_screen_saver( &self ) -> Result<Cookie<'_, Self, GetScreenSaverReply>, ConnectionError>

source§

fn change_hosts<'c, 'input>( &'c self, mode: HostMode, family: Family, address: &'input [u8] ) -> Result<VoidCookie<'c, Self>, ConnectionError>

source§

fn list_hosts( &self ) -> Result<Cookie<'_, Self, ListHostsReply>, ConnectionError>

source§

fn set_access_control( &self, mode: AccessControl ) -> Result<VoidCookie<'_, Self>, ConnectionError>

source§

fn set_close_down_mode( &self, mode: CloseDown ) -> Result<VoidCookie<'_, Self>, ConnectionError>

source§

fn kill_client<A>( &self, resource: A ) -> Result<VoidCookie<'_, Self>, ConnectionError>
where A: Into<u32>,

kills a client. Read more
source§

fn rotate_properties<'c, 'input>( &'c self, window: u32, delta: i16, atoms: &'input [u32] ) -> Result<VoidCookie<'c, Self>, ConnectionError>

source§

fn force_screen_saver( &self, mode: ScreenSaver ) -> Result<VoidCookie<'_, Self>, ConnectionError>

source§

fn set_pointer_mapping<'c, 'input>( &'c self, map: &'input [u8] ) -> Result<Cookie<'c, Self, SetPointerMappingReply>, ConnectionError>

source§

fn get_pointer_mapping( &self ) -> Result<Cookie<'_, Self, GetPointerMappingReply>, ConnectionError>

source§

fn set_modifier_mapping<'c, 'input>( &'c self, keycodes: &'input [u8] ) -> Result<Cookie<'c, Self, SetModifierMappingReply>, ConnectionError>

source§

fn get_modifier_mapping( &self ) -> Result<Cookie<'_, Self, GetModifierMappingReply>, ConnectionError>

source§

fn no_operation(&self) -> Result<VoidCookie<'_, Self>, ConnectionError>

source§

impl<C> ConnectionExt for C

source§

fn shape_query_version( &self ) -> Result<Cookie<'_, Self, QueryVersionReply>, ConnectionError>

source§

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>

source§

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

source§

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>

source§

fn shape_offset( &self, destination_kind: SK, destination_window: u32, x_offset: i16, y_offset: i16 ) -> Result<VoidCookie<'_, Self>, ConnectionError>

source§

fn shape_query_extents( &self, destination_window: u32 ) -> Result<Cookie<'_, Self, QueryExtentsReply>, ConnectionError>

source§

fn shape_select_input( &self, destination_window: u32, enable: bool ) -> Result<VoidCookie<'_, Self>, ConnectionError>

source§

fn shape_input_selected( &self, destination_window: u32 ) -> Result<Cookie<'_, Self, InputSelectedReply>, ConnectionError>

source§

fn shape_get_rectangles( &self, window: u32, source_kind: SK ) -> Result<Cookie<'_, Self, GetRectanglesReply>, ConnectionError>

source§

impl<C> ConnectionExt for C

source§

fn ge_query_version( &self, client_major_version: u16, client_minor_version: u16 ) -> Result<Cookie<'_, Self, QueryVersionReply>, ConnectionError>

source§

impl<C> ConnectionExt for C

source§

fn xkb_use_extension( &self, wanted_major: u16, wanted_minor: u16 ) -> Result<Cookie<'_, Self, UseExtensionReply>, ConnectionError>

source§

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>

source§

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>

source§

fn xkb_get_state( &self, device_spec: u16 ) -> Result<Cookie<'_, Self, GetStateReply>, ConnectionError>

source§

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>

source§

fn xkb_get_controls( &self, device_spec: u16 ) -> Result<Cookie<'_, Self, GetControlsReply>, ConnectionError>

source§

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>

source§

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>

source§

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>

source§

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>

source§

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>

source§

fn xkb_get_indicator_state( &self, device_spec: u16 ) -> Result<Cookie<'_, Self, GetIndicatorStateReply>, ConnectionError>

source§

fn xkb_get_indicator_map( &self, device_spec: u16, which: u32 ) -> Result<Cookie<'_, Self, GetIndicatorMapReply>, ConnectionError>

source§

fn xkb_set_indicator_map<'c, 'input>( &'c self, device_spec: u16, which: u32, maps: &'input [IndicatorMap] ) -> Result<VoidCookie<'c, Self>, ConnectionError>

source§

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

source§

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

source§

fn xkb_get_names( &self, device_spec: u16, which: NameDetail ) -> Result<Cookie<'_, Self, GetNamesReply>, ConnectionError>

source§

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>

source§

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>

source§

fn xkb_list_components( &self, device_spec: u16, max_names: u16 ) -> Result<Cookie<'_, Self, ListComponentsReply>, ConnectionError>

source§

fn xkb_get_kbd_by_name( &self, device_spec: u16, need: GBNDetail, want: GBNDetail, load: bool ) -> Result<Cookie<'_, Self, GetKbdByNameReply>, ConnectionError>

source§

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

source§

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>

source§

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>

source§

impl<C> ConnectionExt for C

source§

fn randr_query_version( &self, major_version: u32, minor_version: u32 ) -> Result<Cookie<'_, Self, QueryVersionReply>, ConnectionError>

source§

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>

source§

fn randr_select_input( &self, window: u32, enable: NotifyMask ) -> Result<VoidCookie<'_, Self>, ConnectionError>

source§

fn randr_get_screen_info( &self, window: u32 ) -> Result<Cookie<'_, Self, GetScreenInfoReply>, ConnectionError>

source§

fn randr_get_screen_size_range( &self, window: u32 ) -> Result<Cookie<'_, Self, GetScreenSizeRangeReply>, ConnectionError>

source§

fn randr_set_screen_size( &self, window: u32, width: u16, height: u16, mm_width: u32, mm_height: u32 ) -> Result<VoidCookie<'_, Self>, ConnectionError>

source§

fn randr_get_screen_resources( &self, window: u32 ) -> Result<Cookie<'_, Self, GetScreenResourcesReply>, ConnectionError>

source§

fn randr_get_output_info( &self, output: u32, config_timestamp: u32 ) -> Result<Cookie<'_, Self, GetOutputInfoReply>, ConnectionError>

source§

fn randr_list_output_properties( &self, output: u32 ) -> Result<Cookie<'_, Self, ListOutputPropertiesReply>, ConnectionError>

source§

fn randr_query_output_property( &self, output: u32, property: u32 ) -> Result<Cookie<'_, Self, QueryOutputPropertyReply>, ConnectionError>

source§

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>

source§

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>

source§

fn randr_delete_output_property( &self, output: u32, property: u32 ) -> Result<VoidCookie<'_, Self>, ConnectionError>

source§

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

source§

fn randr_create_mode<'c, 'input>( &'c self, window: u32, mode_info: ModeInfo, name: &'input [u8] ) -> Result<Cookie<'c, Self, CreateModeReply>, ConnectionError>

source§

fn randr_destroy_mode( &self, mode: u32 ) -> Result<VoidCookie<'_, Self>, ConnectionError>

source§

fn randr_add_output_mode( &self, output: u32, mode: u32 ) -> Result<VoidCookie<'_, Self>, ConnectionError>

source§

fn randr_delete_output_mode( &self, output: u32, mode: u32 ) -> Result<VoidCookie<'_, Self>, ConnectionError>

source§

fn randr_get_crtc_info( &self, crtc: u32, config_timestamp: u32 ) -> Result<Cookie<'_, Self, GetCrtcInfoReply>, ConnectionError>

source§

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>

source§

fn randr_get_crtc_gamma_size( &self, crtc: u32 ) -> Result<Cookie<'_, Self, GetCrtcGammaSizeReply>, ConnectionError>

source§

fn randr_get_crtc_gamma( &self, crtc: u32 ) -> Result<Cookie<'_, Self, GetCrtcGammaReply>, ConnectionError>

source§

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>

source§

fn randr_get_screen_resources_current( &self, window: u32 ) -> Result<Cookie<'_, Self, GetScreenResourcesCurrentReply>, ConnectionError>

source§

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>

source§

fn randr_get_crtc_transform( &self, crtc: u32 ) -> Result<Cookie<'_, Self, GetCrtcTransformReply>, ConnectionError>

source§

fn randr_get_panning( &self, crtc: u32 ) -> Result<Cookie<'_, Self, GetPanningReply>, ConnectionError>

source§

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>

source§

fn randr_set_output_primary( &self, window: u32, output: u32 ) -> Result<VoidCookie<'_, Self>, ConnectionError>

source§

fn randr_get_output_primary( &self, window: u32 ) -> Result<Cookie<'_, Self, GetOutputPrimaryReply>, ConnectionError>

source§

fn randr_get_providers( &self, window: u32 ) -> Result<Cookie<'_, Self, GetProvidersReply>, ConnectionError>

source§

fn randr_get_provider_info( &self, provider: u32, config_timestamp: u32 ) -> Result<Cookie<'_, Self, GetProviderInfoReply>, ConnectionError>

source§

fn randr_set_provider_offload_sink( &self, provider: u32, sink_provider: u32, config_timestamp: u32 ) -> Result<VoidCookie<'_, Self>, ConnectionError>

source§

fn randr_set_provider_output_source( &self, provider: u32, source_provider: u32, config_timestamp: u32 ) -> Result<VoidCookie<'_, Self>, ConnectionError>

source§

fn randr_list_provider_properties( &self, provider: u32 ) -> Result<Cookie<'_, Self, ListProviderPropertiesReply>, ConnectionError>

source§

fn randr_query_provider_property( &self, provider: u32, property: u32 ) -> Result<Cookie<'_, Self, QueryProviderPropertyReply>, ConnectionError>

source§

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>

source§

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>

source§

fn randr_delete_provider_property( &self, provider: u32, property: u32 ) -> Result<VoidCookie<'_, Self>, ConnectionError>

source§

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>

source§

fn randr_get_monitors( &self, window: u32, get_active: bool ) -> Result<Cookie<'_, Self, GetMonitorsReply>, ConnectionError>

source§

fn randr_set_monitor( &self, window: u32, monitorinfo: MonitorInfo ) -> Result<VoidCookie<'_, Self>, ConnectionError>

source§

fn randr_delete_monitor( &self, window: u32, name: u32 ) -> Result<VoidCookie<'_, Self>, ConnectionError>

source§

fn randr_create_lease<'c, 'input>( &'c self, window: u32, lid: u32, crtcs: &'input [u32], outputs: &'input [u32] ) -> Result<CookieWithFds<'c, Self, CreateLeaseReply>, ConnectionError>

source§

fn randr_free_lease( &self, lid: u32, terminate: u8 ) -> Result<VoidCookie<'_, Self>, ConnectionError>

source§

impl<C> ConnectionExt for C

source§

fn xfixes_query_version( &self, client_major_version: u32, client_minor_version: u32 ) -> Result<Cookie<'_, Self, QueryVersionReply>, ConnectionError>

source§

fn xfixes_change_save_set( &self, mode: SaveSetMode, target: SaveSetTarget, map: SaveSetMapping, window: u32 ) -> Result<VoidCookie<'_, Self>, ConnectionError>

source§

fn xfixes_select_selection_input( &self, window: u32, selection: u32, event_mask: SelectionEventMask ) -> Result<VoidCookie<'_, Self>, ConnectionError>

source§

fn xfixes_select_cursor_input( &self, window: u32, event_mask: CursorNotifyMask ) -> Result<VoidCookie<'_, Self>, ConnectionError>

source§

fn xfixes_get_cursor_image( &self ) -> Result<Cookie<'_, Self, GetCursorImageReply>, ConnectionError>

source§

fn xfixes_create_region<'c, 'input>( &'c self, region: u32, rectangles: &'input [Rectangle] ) -> Result<VoidCookie<'c, Self>, ConnectionError>

source§

fn xfixes_create_region_from_bitmap( &self, region: u32, bitmap: u32 ) -> Result<VoidCookie<'_, Self>, ConnectionError>

source§

fn xfixes_create_region_from_window( &self, region: u32, window: u32, kind: SK ) -> Result<VoidCookie<'_, Self>, ConnectionError>

source§

fn xfixes_create_region_from_gc( &self, region: u32, gc: u32 ) -> Result<VoidCookie<'_, Self>, ConnectionError>

source§

fn xfixes_create_region_from_picture( &self, region: u32, picture: u32 ) -> Result<VoidCookie<'_, Self>, ConnectionError>

source§

fn xfixes_destroy_region( &self, region: u32 ) -> Result<VoidCookie<'_, Self>, ConnectionError>

source§

fn xfixes_set_region<'c, 'input>( &'c self, region: u32, rectangles: &'input [Rectangle] ) -> Result<VoidCookie<'c, Self>, ConnectionError>

source§

fn xfixes_copy_region( &self, source: u32, destination: u32 ) -> Result<VoidCookie<'_, Self>, ConnectionError>

source§

fn xfixes_union_region( &self, source1: u32, source2: u32, destination: u32 ) -> Result<VoidCookie<'_, Self>, ConnectionError>

source§

fn xfixes_intersect_region( &self, source1: u32, source2: u32, destination: u32 ) -> Result<VoidCookie<'_, Self>, ConnectionError>

source§

fn xfixes_subtract_region( &self, source1: u32, source2: u32, destination: u32 ) -> Result<VoidCookie<'_, Self>, ConnectionError>

source§

fn xfixes_invert_region( &self, source: u32, bounds: Rectangle, destination: u32 ) -> Result<VoidCookie<'_, Self>, ConnectionError>

source§

fn xfixes_translate_region( &self, region: u32, dx: i16, dy: i16 ) -> Result<VoidCookie<'_, Self>, ConnectionError>

source§

fn xfixes_region_extents( &self, source: u32, destination: u32 ) -> Result<VoidCookie<'_, Self>, ConnectionError>

source§

fn xfixes_fetch_region( &self, region: u32 ) -> Result<Cookie<'_, Self, FetchRegionReply>, ConnectionError>

source§

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

source§

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

source§

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

source§

fn xfixes_set_cursor_name<'c, 'input>( &'c self, cursor: u32, name: &'input [u8] ) -> Result<VoidCookie<'c, Self>, ConnectionError>

source§

fn xfixes_get_cursor_name( &self, cursor: u32 ) -> Result<Cookie<'_, Self, GetCursorNameReply>, ConnectionError>

source§

fn xfixes_get_cursor_image_and_name( &self ) -> Result<Cookie<'_, Self, GetCursorImageAndNameReply>, ConnectionError>

source§

fn xfixes_change_cursor( &self, source: u32, destination: u32 ) -> Result<VoidCookie<'_, Self>, ConnectionError>

source§

fn xfixes_change_cursor_by_name<'c, 'input>( &'c self, src: u32, name: &'input [u8] ) -> Result<VoidCookie<'c, Self>, ConnectionError>

source§

fn xfixes_expand_region( &self, source: u32, destination: u32, left: u16, right: u16, top: u16, bottom: u16 ) -> Result<VoidCookie<'_, Self>, ConnectionError>

source§

fn xfixes_hide_cursor( &self, window: u32 ) -> Result<VoidCookie<'_, Self>, ConnectionError>

source§

fn xfixes_show_cursor( &self, window: u32 ) -> Result<VoidCookie<'_, Self>, ConnectionError>

source§

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>

source§

fn xfixes_delete_pointer_barrier( &self, barrier: u32 ) -> Result<VoidCookie<'_, Self>, ConnectionError>

source§

fn xfixes_set_client_disconnect_mode( &self, disconnect_mode: ClientDisconnectFlags ) -> Result<VoidCookie<'_, Self>, ConnectionError>

Sets the disconnect mode for the client.. Read more
source§

fn xfixes_get_client_disconnect_mode( &self ) -> Result<Cookie<'_, Self, GetClientDisconnectModeReply>, ConnectionError>

source§

impl<C> ConnectionExt for C
where C: ConnectionExt + ?Sized,

source§

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.
source§

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.
source§

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.
source§

fn sync(&self) -> Result<(), ReplyError>

Synchronise with the X11 server. Read more
source§

impl<C> ConnectionExt for C

source§

fn bigreq_enable( &self ) -> Result<Cookie<'_, Self, EnableReply>, ConnectionError>

Enable the BIG-REQUESTS extension. Read more
source§

impl<C> ConnectionExt for C

source§

fn render_query_version( &self, client_major_version: u32, client_minor_version: u32 ) -> Result<Cookie<'_, Self, QueryVersionReply>, ConnectionError>

source§

fn render_query_pict_formats( &self ) -> Result<Cookie<'_, Self, QueryPictFormatsReply>, ConnectionError>

source§

fn render_query_pict_index_values( &self, format: u32 ) -> Result<Cookie<'_, Self, QueryPictIndexValuesReply>, ConnectionError>

source§

fn render_create_picture<'c, 'input>( &'c self, pid: u32, drawable: u32, format: u32, value_list: &'input CreatePictureAux ) -> Result<VoidCookie<'c, Self>, ConnectionError>

source§

fn render_change_picture<'c, 'input>( &'c self, picture: u32, value_list: &'input ChangePictureAux ) -> Result<VoidCookie<'c, Self>, ConnectionError>

source§

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>

source§

fn render_free_picture( &self, picture: u32 ) -> Result<VoidCookie<'_, Self>, ConnectionError>

source§

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

source§

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>

source§

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>

source§

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>

source§

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>

source§

fn render_create_glyph_set( &self, gsid: u32, format: u32 ) -> Result<VoidCookie<'_, Self>, ConnectionError>

source§

fn render_reference_glyph_set( &self, gsid: u32, existing: u32 ) -> Result<VoidCookie<'_, Self>, ConnectionError>

source§

fn render_free_glyph_set( &self, glyphset: u32 ) -> Result<VoidCookie<'_, Self>, ConnectionError>

source§

fn render_add_glyphs<'c, 'input>( &'c self, glyphset: u32, glyphids: &'input [u32], glyphs: &'input [Glyphinfo], data: &'input [u8] ) -> Result<VoidCookie<'c, Self>, ConnectionError>

source§

fn render_free_glyphs<'c, 'input>( &'c self, glyphset: u32, glyphs: &'input [u32] ) -> Result<VoidCookie<'c, Self>, ConnectionError>

source§

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>

source§

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>

source§

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>

source§

fn render_fill_rectangles<'c, 'input>( &'c self, op: PictOp, dst: u32, color: Color, rects: &'input [Rectangle] ) -> Result<VoidCookie<'c, Self>, ConnectionError>

source§

fn render_create_cursor( &self, cid: u32, source: u32, x: u16, y: u16 ) -> Result<VoidCookie<'_, Self>, ConnectionError>

source§

fn render_set_picture_transform( &self, picture: u32, transform: Transform ) -> Result<VoidCookie<'_, Self>, ConnectionError>

source§

fn render_query_filters( &self, drawable: u32 ) -> Result<Cookie<'_, Self, QueryFiltersReply>, ConnectionError>

source§

fn render_set_picture_filter<'c, 'input>( &'c self, picture: u32, filter: &'input [u8], values: &'input [i32] ) -> Result<VoidCookie<'c, Self>, ConnectionError>

source§

fn render_create_anim_cursor<'c, 'input>( &'c self, cid: u32, cursors: &'input [Animcursorelt] ) -> Result<VoidCookie<'c, Self>, ConnectionError>

source§

fn render_add_traps<'c, 'input>( &'c self, picture: u32, x_off: i16, y_off: i16, traps: &'input [Trap] ) -> Result<VoidCookie<'c, Self>, ConnectionError>

source§

fn render_create_solid_fill( &self, picture: u32, color: Color ) -> Result<VoidCookie<'_, Self>, ConnectionError>

source§

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>

source§

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>

source§

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>

source§

impl<C> ConnectionExt for C

source§

fn xinput_get_extension_version<'c, 'input>( &'c self, name: &'input [u8] ) -> Result<Cookie<'c, Self, GetExtensionVersionReply>, ConnectionError>

source§

fn xinput_list_input_devices( &self ) -> Result<Cookie<'_, Self, ListInputDevicesReply>, ConnectionError>

source§

fn xinput_open_device( &self, device_id: u8 ) -> Result<Cookie<'_, Self, OpenDeviceReply>, ConnectionError>

source§

fn xinput_close_device( &self, device_id: u8 ) -> Result<VoidCookie<'_, Self>, ConnectionError>

source§

fn xinput_set_device_mode( &self, device_id: u8, mode: ValuatorMode ) -> Result<Cookie<'_, Self, SetDeviceModeReply>, ConnectionError>

source§

fn xinput_select_extension_event<'c, 'input>( &'c self, window: u32, classes: &'input [u32] ) -> Result<VoidCookie<'c, Self>, ConnectionError>

source§

fn xinput_get_selected_extension_events( &self, window: u32 ) -> Result<Cookie<'_, Self, GetSelectedExtensionEventsReply>, ConnectionError>

source§

fn xinput_change_device_dont_propagate_list<'c, 'input>( &'c self, window: u32, mode: PropagateMode, classes: &'input [u32] ) -> Result<VoidCookie<'c, Self>, ConnectionError>

source§

fn xinput_get_device_dont_propagate_list( &self, window: u32 ) -> Result<Cookie<'_, Self, GetDeviceDontPropagateListReply>, ConnectionError>

source§

fn xinput_get_device_motion_events<A>( &self, start: u32, stop: A, device_id: u8 ) -> Result<Cookie<'_, Self, GetDeviceMotionEventsReply>, ConnectionError>
where A: Into<u32>,

source§

fn xinput_change_keyboard_device( &self, device_id: u8 ) -> Result<Cookie<'_, Self, ChangeKeyboardDeviceReply>, ConnectionError>

source§

fn xinput_change_pointer_device( &self, x_axis: u8, y_axis: u8, device_id: u8 ) -> Result<Cookie<'_, Self, ChangePointerDeviceReply>, ConnectionError>

source§

fn xinput_grab_device<A, 'c, 'input>( &'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>,

source§

fn xinput_ungrab_device<A>( &self, time: A, device_id: u8 ) -> Result<VoidCookie<'_, Self>, ConnectionError>
where A: Into<u32>,

source§

fn xinput_grab_device_key<A, B, 'c, 'input>( &'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>,

source§

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

source§

fn xinput_grab_device_button<A, B, 'c, 'input>( &'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>,

source§

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

source§

fn xinput_allow_device_events<A>( &self, time: A, mode: DeviceInputMode, device_id: u8 ) -> Result<VoidCookie<'_, Self>, ConnectionError>
where A: Into<u32>,

source§

fn xinput_get_device_focus( &self, device_id: u8 ) -> Result<Cookie<'_, Self, GetDeviceFocusReply>, ConnectionError>

source§

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

source§

fn xinput_get_feedback_control( &self, device_id: u8 ) -> Result<Cookie<'_, Self, GetFeedbackControlReply>, ConnectionError>

source§

fn xinput_change_feedback_control( &self, mask: ChangeFeedbackControlMask, device_id: u8, feedback_id: u8, feedback: FeedbackCtl ) -> Result<VoidCookie<'_, Self>, ConnectionError>

source§

fn xinput_get_device_key_mapping( &self, device_id: u8, first_keycode: u8, count: u8 ) -> Result<Cookie<'_, Self, GetDeviceKeyMappingReply>, ConnectionError>

source§

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>

source§

fn xinput_get_device_modifier_mapping( &self, device_id: u8 ) -> Result<Cookie<'_, Self, GetDeviceModifierMappingReply>, ConnectionError>

source§

fn xinput_set_device_modifier_mapping<'c, 'input>( &'c self, device_id: u8, keymaps: &'input [u8] ) -> Result<Cookie<'c, Self, SetDeviceModifierMappingReply>, ConnectionError>

source§

fn xinput_get_device_button_mapping( &self, device_id: u8 ) -> Result<Cookie<'_, Self, GetDeviceButtonMappingReply>, ConnectionError>

source§

fn xinput_set_device_button_mapping<'c, 'input>( &'c self, device_id: u8, map: &'input [u8] ) -> Result<Cookie<'c, Self, SetDeviceButtonMappingReply>, ConnectionError>

source§

fn xinput_query_device_state( &self, device_id: u8 ) -> Result<Cookie<'_, Self, QueryDeviceStateReply>, ConnectionError>

source§

fn xinput_device_bell( &self, device_id: u8, feedback_id: u8, feedback_class: u8, percent: i8 ) -> Result<VoidCookie<'_, Self>, ConnectionError>

source§

fn xinput_set_device_valuators<'c, 'input>( &'c self, device_id: u8, first_valuator: u8, valuators: &'input [i32] ) -> Result<Cookie<'c, Self, SetDeviceValuatorsReply>, ConnectionError>

source§

fn xinput_get_device_control( &self, control_id: DeviceControl, device_id: u8 ) -> Result<Cookie<'_, Self, GetDeviceControlReply>, ConnectionError>

source§

fn xinput_change_device_control( &self, control_id: DeviceControl, device_id: u8, control: DeviceCtl ) -> Result<Cookie<'_, Self, ChangeDeviceControlReply>, ConnectionError>

source§

fn xinput_list_device_properties( &self, device_id: u8 ) -> Result<Cookie<'_, Self, ListDevicePropertiesReply>, ConnectionError>

source§

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>

source§

fn xinput_delete_device_property( &self, property: u32, device_id: u8 ) -> Result<VoidCookie<'_, Self>, ConnectionError>

source§

fn xinput_get_device_property( &self, property: u32, type_: u32, offset: u32, len: u32, device_id: u8, delete: bool ) -> Result<Cookie<'_, Self, GetDevicePropertyReply>, ConnectionError>

source§

fn xinput_xi_query_pointer<A>( &self, window: u32, deviceid: A ) -> Result<Cookie<'_, Self, XIQueryPointerReply>, ConnectionError>
where A: Into<u16>,

source§

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

source§

fn xinput_xi_change_cursor<A>( &self, window: u32, cursor: u32, deviceid: A ) -> Result<VoidCookie<'_, Self>, ConnectionError>
where A: Into<u16>,

source§

fn xinput_xi_change_hierarchy<'c, 'input>( &'c self, changes: &'input [HierarchyChange] ) -> Result<VoidCookie<'c, Self>, ConnectionError>

source§

fn xinput_xi_set_client_pointer<A>( &self, window: u32, deviceid: A ) -> Result<VoidCookie<'_, Self>, ConnectionError>
where A: Into<u16>,

source§

fn xinput_xi_get_client_pointer( &self, window: u32 ) -> Result<Cookie<'_, Self, XIGetClientPointerReply>, ConnectionError>

source§

fn xinput_xi_select_events<'c, 'input>( &'c self, window: u32, masks: &'input [EventMask] ) -> Result<VoidCookie<'c, Self>, ConnectionError>

source§

fn xinput_xi_query_version( &self, major_version: u16, minor_version: u16 ) -> Result<Cookie<'_, Self, XIQueryVersionReply>, ConnectionError>

source§

fn xinput_xi_query_device<A>( &self, deviceid: A ) -> Result<Cookie<'_, Self, XIQueryDeviceReply>, ConnectionError>
where A: Into<u16>,

source§

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

source§

fn xinput_xi_get_focus<A>( &self, deviceid: A ) -> Result<Cookie<'_, Self, XIGetFocusReply>, ConnectionError>
where A: Into<u16>,

source§

fn xinput_xi_grab_device<A, B, 'c, 'input>( &'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>,

source§

fn xinput_xi_ungrab_device<A, B>( &self, time: A, deviceid: B ) -> Result<VoidCookie<'_, Self>, ConnectionError>
where A: Into<u32>, B: Into<u16>,

source§

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

source§

fn xinput_xi_passive_grab_device<A, B, 'c, 'input>( &'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>,

source§

fn xinput_xi_passive_ungrab_device<A, 'c, 'input>( &'c self, grab_window: u32, detail: u32, deviceid: A, grab_type: GrabType, modifiers: &'input [u32] ) -> Result<VoidCookie<'c, Self>, ConnectionError>
where A: Into<u16>,

source§

fn xinput_xi_list_properties<A>( &self, deviceid: A ) -> Result<Cookie<'_, Self, XIListPropertiesReply>, ConnectionError>
where A: Into<u16>,

source§

fn xinput_xi_change_property<A, 'c, 'input>( &'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>,

source§

fn xinput_xi_delete_property<A>( &self, deviceid: A, property: u32 ) -> Result<VoidCookie<'_, Self>, ConnectionError>
where A: Into<u16>,

source§

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

source§

fn xinput_xi_get_selected_events( &self, window: u32 ) -> Result<Cookie<'_, Self, XIGetSelectedEventsReply>, ConnectionError>

source§

fn xinput_xi_barrier_release_pointer<'c, 'input>( &'c self, barriers: &'input [BarrierReleasePointerInfo] ) -> Result<VoidCookie<'c, Self>, ConnectionError>

source§

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>

source§

impl<C> ConnectionExt for C

source§

fn xc_misc_get_version( &self, client_major_version: u16, client_minor_version: u16 ) -> Result<Cookie<'_, Self, GetVersionReply>, ConnectionError>

source§

fn xc_misc_get_xid_range( &self ) -> Result<Cookie<'_, Self, GetXIDRangeReply>, ConnectionError>

source§

fn xc_misc_get_xid_list( &self, count: u32 ) -> Result<Cookie<'_, Self, GetXIDListReply>, ConnectionError>

source§

impl<T> Downcast<T> for T

source§

fn downcast(&self) -> &T

source§

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

source§

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.
source§

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.
source§

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.
source§

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.
source§

impl<T> DynEq for T
where T: Any + Eq,

source§

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

Casts the type to dyn Any.
source§

fn dyn_eq(&self, other: &(dyn DynEq + 'static)) -> bool

This method tests for self and other values to be equal. Read more
source§

impl<T> DynHash for T
where T: DynEq + Hash,

source§

fn as_dyn_eq(&self) -> &(dyn DynEq + 'static)

Casts the type to dyn Any.
source§

fn dyn_hash(&self, state: &mut dyn Hasher)

Feeds this value into the given Hasher.
source§

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

source§

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

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

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

source§

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

Compare self to key and return true if they are equal.
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<S> FromSample<S> for S

source§

fn from_sample_(s: S) -> S

source§

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

source§

fn from_world(_world: &mut World) -> T

Creates Self using data from the given World.
source§

impl<T> HasRawDisplayHandle for T
where T: HasDisplayHandle + ?Sized,

source§

fn raw_display_handle(&self) -> Result<RawDisplayHandle, HandleError>

👎Deprecated: Use HasDisplayHandle instead
source§

impl<T> HasRawWindowHandle for T
where T: HasWindowHandle + ?Sized,

source§

fn raw_window_handle(&self) -> Result<RawWindowHandle, HandleError>

👎Deprecated: Use HasWindowHandle instead
source§

impl<T> Instrument for T

source§

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

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

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<S, T> ParallelSlice<T> for S
where T: Sync, S: AsRef<[T]>,

source§

fn par_chunk_map<F, R>( &self, task_pool: &TaskPool, chunk_size: usize, f: F ) -> Vec<R>
where F: Fn(&[T]) -> R + Send + Sync, R: Send + 'static,

Splits the slice in chunks of size chunks_size or less and maps the chunks in parallel across the provided task_pool. One task is spawned in the task pool for every chunk. Read more
source§

fn par_splat_map<F, R>( &self, task_pool: &TaskPool, max_tasks: Option<usize>, f: F ) -> Vec<R>
where F: Fn(&[T]) -> R + Send + Sync, R: Send + 'static,

Splits the slice into a maximum of max_tasks chunks, and maps the chunks in parallel across the provided task_pool. One task is spawned in the task pool for every chunk. Read more
source§

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

§

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
source§

impl<T, U> ToSample<U> for T
where U: FromSample<T>,

source§

fn to_sample_(self) -> U

source§

impl<T> ToSmolStr for T
where T: Display + ?Sized,

source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

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

§

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.
source§

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

§

type Error = <U as TryFrom<T>>::Error

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

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> Upcast<T> for T

source§

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

source§

impl<T> WithSubscriber for T

source§

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
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<S, T> Duplex<S> for T
where T: FromSample<S> + ToSample<S>,

source§

impl<T> GpuArrayBufferable for T