Skip to main content

Tableau

Struct Tableau 

Source
pub struct Tableau<T: Config> {
    pub n_qubits: usize,
    pub data: Vec<PhasedPauliWord<T::Storage, T::BuildHasher, PauliWord<T::Storage, T::BuildHasher, false>>>,
    /* private fields */
}
Expand description

A 2n-row stabilizer / destabilizer tableau.

Rows 0..n hold the destabilizers; rows n..2n hold the stabilizers. Each row is a PhasedPauliWord tracking both its X/Z bits and a phase in {±1, ±i}. Implements every Clifford-only operation natively (Hadamard, phase, CNOT, CZ, etc.).

§Examples

use ppvm_pauli_sum::config::fxhash::ByteF64;
use ppvm_traits::traits::Clifford;
use ppvm_tableau::data::Tableau;

let mut tab: Tableau<ByteF64<1>> = Tableau::new(2);
tab.h(0);
tab.cnot(0, 1);
assert_eq!(tab.n_qubits, 2);
assert_eq!(tab.stabilizers().len(), 2);

Fields§

§n_qubits: usize

Number of qubits.

§data: Vec<PhasedPauliWord<T::Storage, T::BuildHasher, PauliWord<T::Storage, T::BuildHasher, false>>>

Destabilizer / Stabilizer tableau

  • Entries 0..n are the destabilizers
  • Entries n..2n are the stabilizers

Implementations§

Source§

impl<T: Config> Tableau<T>

Source

pub fn new(n_qubits: usize) -> Self

Construct a fresh tableau initialised to |0…0⟩.

Source

pub fn new_with_seed(n_qubits: usize, seed: u64) -> Self

Same as Tableau::new, but seed the RNG deterministically.

Source

pub fn reset_all(&mut self)

Source

pub fn stabilizers( &self, ) -> &[PhasedPauliWord<T::Storage, T::BuildHasher, PauliWord<T::Storage, T::BuildHasher, false>>]

View of the stabilizer rows (the upper half of the tableau).

Source

pub fn stabilizers_mut( &mut self, ) -> &mut [PhasedPauliWord<T::Storage, T::BuildHasher, PauliWord<T::Storage, T::BuildHasher, false>>]

Mutable view of the stabilizer rows.

Source

pub fn destabilizers( &self, ) -> &[PhasedPauliWord<T::Storage, T::BuildHasher, PauliWord<T::Storage, T::BuildHasher, false>>]

View of the destabilizer rows (the lower half of the tableau).

Source

pub fn destabilizers_mut( &mut self, ) -> &mut [PhasedPauliWord<T::Storage, T::BuildHasher, PauliWord<T::Storage, T::BuildHasher, false>>]

Mutable view of the destabilizer rows.

Source

pub fn cz_block_pairs(&mut self, base: usize, offset: usize, count: usize)

Apply CZ to N pairs with constant offset: (base+i, base+offset+i) for i in 0..count. All pairs must be in the same u64 word. This replaces N individual CZ calls with a single word-level shift+XOR operation per row.

§Preconditions

The fused kernel needs offset >= count, i.e. pairwise-disjoint supports (pairs i != j collide iff |i - j| == offset, which needs offset < count, or offset == 0). Both fused updates need it: the single count_ones() & 1 phase reads the pre-update z plane for every pair at once (Batch.lean::czSeq_phase proves it equal to the sequential loop only under pairwise disjointness, and czSeq_phase_needs_disjoint exhibits a counterexample), and the z delta ORs the two shifted planes, so a z bit written by two pairs is set once instead of XOR-cancelled.

Overlapping pairs (offset < count, including offset == 0) fall back to the per-pair cz loop, so this method is safe in release.

§Panics

Debug-asserts that all bits are within the same word.

Source

pub fn cz_block_pairs_cross_word( &mut self, word_c: usize, base_bit_c: usize, word_t: usize, base_bit_t: usize, count: usize, )
where <T::Storage as BitView>::Store: PrimInt,

Apply CZ to N pairs with constant offset across two different words. Controls at (word_c, base_bit_c+i) and targets at (word_t, base_bit_t+i) for i in 0..count. word_c and word_t must be different.

Trait Implementations§

Source§

impl<T: Config> Clifford for Tableau<T>
where <T::Storage as BitView>::Store: PrimInt,

Source§

fn x(&mut self, index: usize)

Apply Pauli X to one qubit.
Source§

fn y(&mut self, index: usize)

Apply Pauli Y to one qubit.
Source§

fn z(&mut self, index: usize)

Apply Pauli Z to one qubit.
Source§

fn h(&mut self, index: usize)

Apply Hadamard H to one qubit.
Source§

fn s(&mut self, index: usize)

Apply phase gate S to one qubit.
Source§

fn cnot(&mut self, control: usize, target: usize)

Apply CNOT to one (control, target) pair.
Source§

fn cz(&mut self, control: usize, target: usize)

Apply CZ to one qubit pair.
Source§

fn cx(&mut self, control: usize, target: usize)

stim alias for cnot.
Source§

fn zcx(&mut self, control: usize, target: usize)

stim alias for cnot.
Source§

fn zcz(&mut self, addr0: usize, addr1: usize)

stim alias for cz.
Source§

impl<T: Config> CliffordBatch for Tableau<T>
where <T::Storage as BitView>::Store: PrimInt,

Source§

fn x_many(&mut self, indices: &[usize])

X is bit-preserving: phase flips for each masked qubit where z=1.

Source§

fn y_many(&mut self, indices: &[usize])

Y is bit-preserving: phase flips for each masked qubit where x⊕z=1.

Source§

fn z_many(&mut self, indices: &[usize])

Z is bit-preserving: phase flips for each masked qubit where x=1.

Source§

fn s_many(&mut self, indices: &[usize])

Forward S: phase flips where x&z=1, then z ^= x for masked qubits.

Source§

fn cnot_many(&mut self, pairs: &[(usize, usize)])

Apply CNOT to many pairs, operating on raw storage words to avoid per-bit bitvec addressing. Pairs are applied sequentially per row, so semantics match the per-pair cnot loop exactly.

Source§

fn h_many(&mut self, indices: &[usize])

Apply H to multiple qubits using combined bitmask operations. H swaps x<->z bits (same as sqrt_y) but with different phase: phase += 2 when x=1 & z=1 (Y goes to -Y).

Source§

fn cz_many(&mut self, pairs: &[(usize, usize)])

Apply CZ to many pairs on raw storage words. CZ is symmetric and touches only z-bits; pairs are applied sequentially per row, so semantics match the per-pair cz loop exactly.

Source§

impl<T: Config> CliffordExtensions for Tableau<T>
where <T::Storage as BitView>::Store: PrimInt,

Source§

fn s_dag(&mut self, index: usize)

Apply S† to one qubit.
Source§

fn sqrt_x(&mut self, index: usize)

Apply √X to one qubit.
Source§

fn sqrt_x_dag(&mut self, index: usize)

Apply (√X)† to one qubit.
Source§

fn sqrt_y(&mut self, index: usize)

Apply √Y to one qubit.
Source§

fn sqrt_y_dag(&mut self, index: usize)

Apply (√Y)† to one qubit.
Source§

fn cy(&mut self, control: usize, target: usize)

Apply CY to one (control, target) pair.
Source§

fn zcy(&mut self, control: usize, target: usize)

stim alias for cy.
Source§

impl<T: Config> CliffordExtensionsBatch for Tableau<T>
where <T::Storage as BitView>::Store: PrimInt,

Source§

fn s_dag_many(&mut self, indices: &[usize])

Backward S (i.e. S†): same bit mapping as S, phase rule differs. Phase flips where x&!z=1, then z ^= x for masked qubits.

Source§

fn cy_many(&mut self, pairs: &[(usize, usize)])

Apply CY to many pairs on raw storage words. Pairs are applied sequentially per row, so semantics match the per-pair cy loop exactly.

Source§

fn sqrt_y_many(&mut self, indices: &[usize])

Apply √Y to multiple qubits using combined bitmask operations. All qubits targeting the same word are merged into a single mask, reducing N individual operations to O(n_words) per row.

Source§

fn sqrt_y_dag_many(&mut self, indices: &[usize])

Apply (√Y)† to multiple qubits using combined bitmask operations.

Source§

fn sqrt_x_many(&mut self, indices: &[usize])

Apply √X to multiple qubits using combined bitmask operations.

Source§

fn sqrt_x_dag_many(&mut self, indices: &[usize])

Apply (√X)† to multiple qubits using combined bitmask operations.

Source§

impl<T: Clone + Config> Clone for Tableau<T>
where T::Storage: Clone, T::BuildHasher: Clone,

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl<T: Debug + Config> Debug for Tableau<T>
where T::Storage: Debug, T::BuildHasher: Debug,

Source§

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

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

impl<T: Config> Depolarizing2<T> for Tableau<T>

Source§

fn depolarize2(&mut self, addr0: usize, addr1: usize, p: T::Coeff)

Depolarize one qubit pair with probability p.
Source§

fn depolarize2_many( &mut self, pairs: &[(usize, usize)], p: <T as Config>::Coeff, )

Explicit batched two-qubit depolarizing channel.
Source§

impl<T: Config> Depolarizing<T> for Tableau<T>

Source§

fn depolarize1(&mut self, addr0: usize, p: T::Coeff)

Depolarize one qubit with probability p.
Source§

fn depolarize1_many(&mut self, targets: &[usize], p: <T as Config>::Coeff)

Explicit batched single-qubit depolarizing channel.
Source§

impl<T: Config> Display for Tableau<T>

Source§

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

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

impl<T: Config> Measure for Tableau<T>
where <<T as Config>::Storage as BitView>::Store: PrimInt,

Source§

fn measure(&mut self, addr0: usize) -> bool

Measure qubit addr0 in Z basis

Source§

impl<T: Config> PauliError<T> for Tableau<T>

Source§

fn pauli_error(&mut self, addr0: usize, p: [T::Coeff; 3])

Apply a Pauli-error channel [p_x, p_y, p_z] to one qubit.
Source§

fn x_error(&mut self, addr0: usize, p: <T as Config>::Coeff)

stim X_ERROR(p) — apply X with probability p to one qubit.
Source§

fn y_error(&mut self, addr0: usize, p: <T as Config>::Coeff)

stim Y_ERROR(p) — apply Y with probability p to one qubit.
Source§

fn z_error(&mut self, addr0: usize, p: <T as Config>::Coeff)

stim Z_ERROR(p) — apply Z with probability p to one qubit.
Source§

fn pauli_error_many(&mut self, targets: &[usize], p: [<T as Config>::Coeff; 3])

Explicit batched Pauli-error channel.
Source§

fn x_error_many(&mut self, targets: &[usize], p: <T as Config>::Coeff)

Explicit batched X_ERROR(p).
Source§

fn y_error_many(&mut self, targets: &[usize], p: <T as Config>::Coeff)

Explicit batched Y_ERROR(p).
Source§

fn z_error_many(&mut self, targets: &[usize], p: <T as Config>::Coeff)

Explicit batched Z_ERROR(p).
Source§

impl<T: Config> Reset for Tableau<T>
where <<T as Config>::Storage as BitView>::Store: PrimInt,

Source§

fn reset(&mut self, addr0: usize)

Reset one qubit to |0⟩ (stim R/RZ).
Source§

fn reset_z(&mut self, addr0: usize)

stim RZ alias — reset to |0⟩.
Source§

fn reset_x(&mut self, addr0: usize)

stim RX — reset to |+⟩.
Source§

fn reset_y(&mut self, addr0: usize)

stim RY — reset to |i⟩.
Source§

fn reset_many(&mut self, targets: &[usize])

Explicit batched reset to |0⟩.
Source§

fn reset_z_many(&mut self, targets: &[usize])

Explicit batched RZ alias.
Source§

fn reset_x_many(&mut self, targets: &[usize])

Explicit batched RX.
Source§

fn reset_y_many(&mut self, targets: &[usize])

Explicit batched RY.
Source§

impl<T: Config> TableauLike for Tableau<T>

Source§

type Coeff = <T as Config>::Coeff

Coefficient type used for probabilities.
Source§

type Rng = SmallRng

RNG type backing the stochastic channels.
Source§

fn rng_mut(&mut self) -> &mut Self::Rng

Mutable access to the backend’s RNG.
Source§

fn is_qubit_lost(&self, _addr: usize) -> bool

Whether the qubit at addr is inactive (lost or leaked), so the Pauli noise channels skip it. Default: never inactive.
Source§

fn depolarize_impl(&mut self, addr0: usize, p: Self::Coeff)

Single-qubit depolarizing channel. Read more
Source§

fn pauli_error_impl(&mut self, addr0: usize, p: [Self::Coeff; 3])

Single-qubit Pauli-error channel (X, Y, Z with given probabilities). Read more
Source§

fn two_qubit_pauli_error_impl( &mut self, addr0: usize, addr1: usize, p: [Self::Coeff; 15], )

Two-qubit Pauli-error channel (15 non-identity Pauli combinations).
Source§

fn depolarize2_impl(&mut self, addr0: usize, addr1: usize, p: Self::Coeff)

Two-qubit depolarizing channel: spreads p over the 15 non-identity two-qubit Pauli errors.
Source§

impl<T: Config> TwoQubitPauliError<T> for Tableau<T>

Source§

fn two_qubit_pauli_error( &mut self, addr0: usize, addr1: usize, p: [T::Coeff; 15], )

Apply a two-qubit Pauli-error channel to one pair. Probabilities are given in the order: {IX, IY, IZ, XI, XX, XY, XZ, YI, YX, YY, YZ, ZI, ZX, ZY, ZZ}.
Source§

fn two_qubit_pauli_error_many( &mut self, pairs: &[(usize, usize)], p: [<T as Config>::Coeff; 15], )

Explicit batched two-qubit Pauli-error channel.

Auto Trait Implementations§

§

impl<T> Freeze for Tableau<T>
where Vec<PhasedPauliWord<<T as Config>::Storage, <T as Config>::BuildHasher, PauliWord<<T as Config>::Storage, <T as Config>::BuildHasher, false>>>: Freeze,

§

impl<T> RefUnwindSafe for Tableau<T>

§

impl<T> Send for Tableau<T>
where Vec<PhasedPauliWord<<T as Config>::Storage, <T as Config>::BuildHasher, PauliWord<<T as Config>::Storage, <T as Config>::BuildHasher, false>>>: Send,

§

impl<T> Sync for Tableau<T>
where Vec<PhasedPauliWord<<T as Config>::Storage, <T as Config>::BuildHasher, PauliWord<<T as Config>::Storage, <T as Config>::BuildHasher, false>>>: Sync,

§

impl<T> Unpin for Tableau<T>
where Vec<PhasedPauliWord<<T as Config>::Storage, <T as Config>::BuildHasher, PauliWord<<T as Config>::Storage, <T as Config>::BuildHasher, false>>>: Unpin,

§

impl<T> UnsafeUnpin for Tableau<T>

§

impl<T> UnwindSafe for Tableau<T>

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

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

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> Conv for T

Source§

fn conv<T>(self) -> T
where Self: Into<T>,

Converts self into T using Into<T>. Read more
Source§

impl<T> FmtForward for T

Source§

fn fmt_binary(self) -> FmtBinary<Self>
where Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
Source§

fn fmt_display(self) -> FmtDisplay<Self>
where Self: Display,

Causes self to use its Display implementation when Debug-formatted.
Source§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where Self: LowerExp,

Causes self to use its LowerExp implementation when Debug-formatted.
Source§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where Self: LowerHex,

Causes self to use its LowerHex implementation when Debug-formatted.
Source§

fn fmt_octal(self) -> FmtOctal<Self>
where Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
Source§

fn fmt_pointer(self) -> FmtPointer<Self>
where Self: Pointer,

Causes self to use its Pointer implementation when Debug-formatted.
Source§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where Self: UpperExp,

Causes self to use its UpperExp implementation when Debug-formatted.
Source§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where Self: UpperHex,

Causes self to use its UpperHex implementation when Debug-formatted.
Source§

fn fmt_list(self) -> FmtList<Self>
where &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

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

Source§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
Source§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
Source§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
Source§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where Self: Borrow<B>, B: 'a + ?Sized, R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
Source§

fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
where Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
Source§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where Self: AsRef<U>, U: 'a + ?Sized, R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
Source§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where Self: AsMut<U>, U: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe function.
Source§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where Self: Deref<Target = T>, T: 'a + ?Sized, R: 'a,

Borrows self, then passes self.deref() into the pipe function.
Source§

fn pipe_deref_mut<'a, T, R>( &'a mut self, func: impl FnOnce(&'a mut T) -> R, ) -> R
where Self: DerefMut<Target = T> + Deref, T: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe function.
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

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

Initializes a with the given initializer. Read more
Source§

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

Dereferences the given pointer. Read more
Source§

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

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

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

impl<T> Tap for T

Source§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
Source§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
Source§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
Source§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
Source§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
Source§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
Source§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
Source§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
Source§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
Source§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release builds.
Source§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release builds.
Source§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release builds.
Source§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
Source§

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

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

fn to_string(&self) -> String

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

impl<T> TryConv for T

Source§

fn try_conv<T>(self) -> Result<T, Self::Error>
where Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
Source§

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

Source§

type Error = !

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

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

Performs the conversion.
Source§

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

Source§

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

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

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

Performs the conversion.