Struct FheProgramNode

Source
pub struct FheProgramNode<T: NumCiphertexts, S = ()> {
    pub ids: &'static [NodeIndex],
    /* private fields */
}
Expand description

A type that wraps an FheType during graph construction. It is an implementation detail and you should not construct these directly. Outside of very specific semantics, use-after-free and other undefined behaviors may occur.

§Remarks

This type serves as an anchor so users can apply +, *, -, /, <<, and >> operators on types inside an FHE program function. If the underlying type T implements the GraphCipherAdd, GraphCipherMul, etc trait, then FheProgramNode<T> implements std::ops::Add, std::ops::Mul, etc and proxies to T’s underlying implementation.

This type impls the Copy trait so users don’t have to call .clone() all the time. Unfortunately, this rules out the clean implementation of using a Vec<NodeIndex> to store the graph nodes T represents; Vec does not impl Copy, and thus it cannot exist in this type. To circumvent this limitation, we use a threadlocal arena of NodeIndex to allocate and copy slices. This requires we lie about the lifetime of ids, which isn’t actually ’static, but rather until we clear the arena. We clean the arena in the FHE program macro after FHE program construction and thus after all FheProgramNodes have gone out of scope.

You should never explicitly construct these outside of e.g. FHE type GraphCipherPlainAdd traits, which run during graph construction.

§Undefined behavior

These types must be constructed while CURRENT_FHE_CTX refers to a valid FheContext. Furthermore, no FheProgramNode should outlive the said context. Violating any of these conditions may result in memory corruption or use-after-free.

Fields§

§ids: &'static [NodeIndex]

The ids on this node. The ’static lifetime on this slice is a lie. The sunscreen compiler must ensure that no FheProgramNode exists after FHE program construction.

Implementations§

Source§

impl<T: NumCiphertexts> FheProgramNode<T>

Source

pub fn new(ids: &[NodeIndex]) -> Self

Creates a new FHE program node with the given node index.

These are an implementation detail needed while constructing the FHE program graph and should not be constructed at any other time. You should never need to directly create a FheProgramNode.

§Remarks

This type internally captures a slice rather than directly storing its own Vec. We do this so the type can impl Copy and composing FHE programs is natural without the user needing to call clone() all the time.

§Undefined behavior

This type references memory in a bump allocator. Failing to ensure FheProgramNodes never outlive the backing context, will result in use-after-free.

Source§

impl<T: NumCiphertexts, S> FheProgramNode<T, S>

Source

pub fn get_plain_modulus() -> u64

Returns the plain modulus parameter for the given BFV scheme

Trait Implementations§

Source§

impl<L, T> Add<FheProgramNode<Cipher<T>>> for FheProgramNode<Indeterminate<L, T>, Stage>
where T: FheType + GraphCipherPlainAdd<Left = T, Right = T> + GraphCipherAdd<Left = T, Right = T>, L: FheLiteral,

Source§

type Output = FheProgramNode<Indeterminate<L, T>, Stage>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: FheProgramNode<Cipher<T>>) -> Self::Output

Performs the + operation. Read more
Source§

impl<T> Add<FheProgramNode<Cipher<T>>> for FheProgramNode<T>
where T: FheType + GraphCipherPlainAdd<Left = T, Right = T>,

Source§

type Output = FheProgramNode<Cipher<T>>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: FheProgramNode<Cipher<T>>) -> Self::Output

Performs the + operation. Read more
Source§

impl<T> Add<FheProgramNode<Cipher<T>>> for f64
where T: FheType + GraphCipherConstAdd<Left = T, Right = f64> + TryFrom<f64>,

Source§

type Output = FheProgramNode<Cipher<T>>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: FheProgramNode<Cipher<T>>) -> Self::Output

Performs the + operation. Read more
Source§

impl<T> Add<FheProgramNode<Cipher<T>>> for i64
where T: FheType + GraphCipherConstAdd<Left = T, Right = i64> + TryFrom<i64>,

Source§

type Output = FheProgramNode<Cipher<T>>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: FheProgramNode<Cipher<T>>) -> Self::Output

Performs the + operation. Read more
Source§

impl<T> Add<FheProgramNode<Cipher<T>>> for u64
where T: FheType + GraphCipherConstAdd<Left = T, Right = u64> + TryFrom<u64>,

Source§

type Output = FheProgramNode<Cipher<T>>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: FheProgramNode<Cipher<T>>) -> Self::Output

Performs the + operation. Read more
Source§

impl<L, T> Add<FheProgramNode<Indeterminate<L, T>, Stage>> for FheProgramNode<Cipher<T>>
where T: FheType + GraphCipherPlainAdd<Left = T, Right = T> + GraphCipherAdd<Left = T, Right = T>, L: FheLiteral,

Source§

type Output = FheProgramNode<Indeterminate<L, T>, Stage>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: FheProgramNode<Indeterminate<L, T>, Stage>) -> Self::Output

Performs the + operation. Read more
Source§

impl<T> Add<FheProgramNode<T>> for FheProgramNode<Cipher<T>>
where T: FheType + GraphCipherPlainAdd<Left = T, Right = T>,

Source§

type Output = FheProgramNode<Cipher<T>>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: FheProgramNode<T>) -> Self::Output

Performs the + operation. Read more
Source§

impl<T, U> Add<T> for FheProgramNode<Cipher<U>>
where U: FheType + GraphCipherConstAdd<Left = U, Right = T>, T: FheLiteral,

Source§

type Output = FheProgramNode<Cipher<U>>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: T) -> Self::Output

Performs the + operation. Read more
Source§

impl<T> Add for FheProgramNode<Cipher<T>>
where T: FheType + GraphCipherAdd<Left = T, Right = T>,

Source§

type Output = FheProgramNode<Cipher<T>>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Self) -> Self::Output

Performs the + operation. Read more
Source§

impl<T: Clone + NumCiphertexts, S: Clone> Clone for FheProgramNode<T, S>

Source§

fn clone(&self) -> FheProgramNode<T, S>

Returns a copy of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl<L, T> Coerce<FheProgramNode<Cipher<T>>> for FheProgramNode<Indeterminate<L, T>, Stage>
where L: FheLiteral, T: FheType,

Source§

fn coerce(self) -> FheProgramNode<Cipher<T>>

Coerce one FheProgramNode to another. The underlying value stays the same, but the types change. This function is allowed to panic on invalid coercions, which will result in a failed Err state when compiling the FHE program. Read more
Source§

impl<T: NumCiphertexts, S> Coerce<FheProgramNode<T, S>> for FheProgramNode<T, S>

Source§

fn coerce(self) -> Self

Coerce one FheProgramNode to another. The underlying value stays the same, but the types change. This function is allowed to panic on invalid coercions, which will result in a failed Err state when compiling the FHE program. Read more
Source§

impl<T: Debug + NumCiphertexts, S: Debug> Debug for FheProgramNode<T, S>

Source§

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

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

impl<L, T> Div<FheProgramNode<Cipher<T>>> for FheProgramNode<Indeterminate<L, T>, Stage>
where T: FheType + GraphCipherPlainDiv<Left = T, Right = T> + GraphCipherDiv<Left = T, Right = T>, L: FheLiteral,

Source§

type Output = FheProgramNode<Indeterminate<L, T>, Stage>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: FheProgramNode<Cipher<T>>) -> Self::Output

Performs the / operation. Read more
Source§

impl<T> Div<FheProgramNode<Cipher<T>>> for FheProgramNode<T>
where T: FheType + GraphPlainCipherDiv<Left = T, Right = T>,

Source§

type Output = FheProgramNode<Cipher<T>>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: FheProgramNode<Cipher<T>>) -> Self::Output

Performs the / operation. Read more
Source§

impl<T> Div<FheProgramNode<Cipher<T>>> for f64
where T: FheType + GraphConstCipherDiv<Left = f64, Right = T> + TryFrom<f64>,

Source§

type Output = FheProgramNode<Cipher<T>>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: FheProgramNode<Cipher<T>>) -> Self::Output

Performs the / operation. Read more
Source§

impl<T> Div<FheProgramNode<Cipher<T>>> for i64
where T: FheType + GraphConstCipherDiv<Left = i64, Right = T> + TryFrom<f64>,

Source§

type Output = FheProgramNode<Cipher<T>>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: FheProgramNode<Cipher<T>>) -> Self::Output

Performs the / operation. Read more
Source§

impl<T> Div<FheProgramNode<Cipher<T>>> for u64
where T: FheType + GraphConstCipherDiv<Left = u64, Right = T> + TryFrom<f64>,

Source§

type Output = FheProgramNode<Cipher<T>>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: FheProgramNode<Cipher<T>>) -> Self::Output

Performs the / operation. Read more
Source§

impl<L, T> Div<FheProgramNode<Indeterminate<L, T>, Stage>> for FheProgramNode<Cipher<T>>
where T: FheType + GraphCipherPlainDiv<Left = T, Right = T> + GraphCipherDiv<Left = T, Right = T>, L: FheLiteral,

Source§

type Output = FheProgramNode<Indeterminate<L, T>, Stage>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: FheProgramNode<Indeterminate<L, T>, Stage>) -> Self::Output

Performs the / operation. Read more
Source§

impl<T> Div<FheProgramNode<T>> for FheProgramNode<Cipher<T>>
where T: FheType + GraphCipherPlainDiv<Left = T, Right = T>,

Source§

type Output = FheProgramNode<Cipher<T>>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: FheProgramNode<T>) -> Self::Output

Performs the / operation. Read more
Source§

impl<T, U> Div<U> for FheProgramNode<Cipher<T>>
where U: FheLiteral, T: FheType + GraphCipherConstDiv<Left = T, Right = U>,

Source§

type Output = FheProgramNode<Cipher<T>>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: U) -> Self::Output

Performs the / operation. Read more
Source§

impl<T> Div for FheProgramNode<Cipher<T>>
where T: FheType + GraphCipherDiv<Left = T, Right = T>,

Source§

type Output = FheProgramNode<Cipher<T>>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: Self) -> Self::Output

Performs the / operation. Read more
Source§

impl<L, T> From<FheProgramNode<Indeterminate<L, T>, Stage>> for FheProgramNode<Cipher<T>>
where L: FheLiteral, T: FheType,

Source§

fn from(value: FheProgramNode<Indeterminate<L, T>, Stage>) -> Self

Converts to this type from the input type.
Source§

impl<T> Input for FheProgramNode<T>

Source§

type Output = FheProgramNode<T>

The type returned by the input fn`.
Source§

fn input() -> Self

Creates a new FheProgramNode denoted as an input to an Fhe Program graph. Read more
Source§

impl<T> LaneCount for FheProgramNode<Cipher<T>>
where T: FheType + LaneCount,

Source§

fn lane_count() -> usize

The number of lanes.
Source§

impl<L, T> Mul<FheProgramNode<Cipher<T>>> for FheProgramNode<Indeterminate<L, T>, Stage>
where T: FheType + GraphCipherPlainMul<Left = T, Right = T> + GraphCipherMul<Left = T, Right = T>, L: FheLiteral,

Source§

type Output = FheProgramNode<Indeterminate<L, T>, Stage>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: FheProgramNode<Cipher<T>>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T> Mul<FheProgramNode<Cipher<T>>> for FheProgramNode<T>
where T: FheType + GraphCipherPlainMul<Left = T, Right = T>,

Source§

type Output = FheProgramNode<Cipher<T>>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: FheProgramNode<Cipher<T>>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T> Mul<FheProgramNode<Cipher<T>>> for f64
where T: FheType + GraphCipherConstMul<Left = T, Right = f64> + TryFrom<f64>,

Source§

type Output = FheProgramNode<Cipher<T>>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: FheProgramNode<Cipher<T>>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T> Mul<FheProgramNode<Cipher<T>>> for i64
where T: FheType + GraphCipherConstMul<Left = T, Right = i64> + TryFrom<i64>,

Source§

type Output = FheProgramNode<Cipher<T>>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: FheProgramNode<Cipher<T>>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T> Mul<FheProgramNode<Cipher<T>>> for u64
where T: FheType + GraphCipherConstMul<Left = T, Right = u64> + TryFrom<u64>,

Source§

type Output = FheProgramNode<Cipher<T>>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: FheProgramNode<Cipher<T>>) -> Self::Output

Performs the * operation. Read more
Source§

impl<L, T> Mul<FheProgramNode<Indeterminate<L, T>, Stage>> for FheProgramNode<Cipher<T>>
where T: FheType + GraphCipherPlainMul<Left = T, Right = T> + GraphCipherMul<Left = T, Right = T>, L: FheLiteral,

Source§

type Output = FheProgramNode<Indeterminate<L, T>, Stage>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: FheProgramNode<Indeterminate<L, T>, Stage>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T> Mul<FheProgramNode<T>> for FheProgramNode<Cipher<T>>
where T: FheType + GraphCipherPlainMul<Left = T, Right = T>,

Source§

type Output = FheProgramNode<Cipher<T>>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: FheProgramNode<T>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T, U> Mul<T> for FheProgramNode<Cipher<U>>
where U: FheType + GraphCipherConstMul<Left = U, Right = T> + TryFrom<T>, T: FheLiteral,

Source§

type Output = FheProgramNode<Cipher<U>>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: T) -> Self::Output

Performs the * operation. Read more
Source§

impl<T> Mul for FheProgramNode<Cipher<T>>
where T: FheType + GraphCipherMul<Left = T, Right = T>,

Source§

type Output = FheProgramNode<Cipher<T>>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Self) -> Self::Output

Performs the * operation. Read more
Source§

impl<T> Neg for FheProgramNode<Cipher<T>>
where T: FheType + GraphCipherNeg<Val = T>,

Source§

type Output = FheProgramNode<Cipher<T>>

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl<T, S> NumCiphertexts for FheProgramNode<T, S>
where T: NumCiphertexts,

Source§

const NUM_CIPHERTEXTS: usize = T::NUM_CIPHERTEXTS

The number of ciphertexts this type decomposes into.
Source§

impl<T> Output for FheProgramNode<T>
where T: NumCiphertexts,

Source§

type Output = FheProgramNode<T>

The captured object return type.
Source§

fn output(&self) -> Self::Output

Denote this object is an output by appending an appropriate output FHE program nodes Read more
Source§

impl<T: PartialEq + NumCiphertexts, S: PartialEq> PartialEq for FheProgramNode<T, S>

Source§

fn eq(&self, other: &FheProgramNode<T, S>) -> bool

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

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

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

impl<T> Shl<u64> for FheProgramNode<Cipher<T>>
where T: FheType + GraphCipherRotateLeft,

Source§

type Output = FheProgramNode<Cipher<T>>

The resulting type after applying the << operator.
Source§

fn shl(self, x: u64) -> Self

Performs the << operation. Read more
Source§

impl<T> Shr<u64> for FheProgramNode<Cipher<T>>
where T: FheType + GraphCipherRotateRight,

Source§

type Output = FheProgramNode<Cipher<T>>

The resulting type after applying the >> operator.
Source§

fn shr(self, x: u64) -> Self

Performs the >> operation. Read more
Source§

impl<L, T> Sub<FheProgramNode<Cipher<T>>> for FheProgramNode<Indeterminate<L, T>, Stage>
where T: FheType + GraphCipherPlainSub<Left = T, Right = T> + GraphCipherSub<Left = T, Right = T>, L: FheLiteral,

Source§

type Output = FheProgramNode<Indeterminate<L, T>, Stage>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: FheProgramNode<Cipher<T>>) -> Self::Output

Performs the - operation. Read more
Source§

impl<T> Sub<FheProgramNode<Cipher<T>>> for FheProgramNode<T>
where T: FheType + GraphPlainCipherSub<Left = T, Right = T>,

Source§

type Output = FheProgramNode<Cipher<T>>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: FheProgramNode<Cipher<T>>) -> Self::Output

Performs the - operation. Read more
Source§

impl<T> Sub<FheProgramNode<Cipher<T>>> for f64
where T: FheType + GraphConstCipherSub<Left = f64, Right = T>,

Source§

type Output = FheProgramNode<Cipher<T>>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: FheProgramNode<Cipher<T>>) -> Self::Output

Performs the - operation. Read more
Source§

impl<T> Sub<FheProgramNode<Cipher<T>>> for i64
where T: FheType + GraphConstCipherSub<Left = i64, Right = T>,

Source§

type Output = FheProgramNode<Cipher<T>>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: FheProgramNode<Cipher<T>>) -> Self::Output

Performs the - operation. Read more
Source§

impl<T> Sub<FheProgramNode<Cipher<T>>> for u64
where T: FheType + GraphConstCipherSub<Left = u64, Right = T>,

Source§

type Output = FheProgramNode<Cipher<T>>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: FheProgramNode<Cipher<T>>) -> Self::Output

Performs the - operation. Read more
Source§

impl<L, T> Sub<FheProgramNode<Indeterminate<L, T>, Stage>> for FheProgramNode<Cipher<T>>
where T: FheType + GraphCipherPlainSub<Left = T, Right = T> + GraphCipherSub<Left = T, Right = T>, L: FheLiteral,

Source§

type Output = FheProgramNode<Indeterminate<L, T>, Stage>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: FheProgramNode<Indeterminate<L, T>, Stage>) -> Self::Output

Performs the - operation. Read more
Source§

impl<T> Sub<FheProgramNode<T>> for FheProgramNode<Cipher<T>>
where T: FheType + GraphCipherPlainSub<Left = T, Right = T>,

Source§

type Output = FheProgramNode<Cipher<T>>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: FheProgramNode<T>) -> Self::Output

Performs the - operation. Read more
Source§

impl<T, U> Sub<T> for FheProgramNode<Cipher<U>>
where U: FheType + GraphCipherConstSub<Left = U, Right = T>, T: FheLiteral,

Source§

type Output = FheProgramNode<Cipher<U>>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: T) -> Self::Output

Performs the - operation. Read more
Source§

impl<T> Sub for FheProgramNode<Cipher<T>>
where T: FheType + GraphCipherSub<Left = T, Right = T>,

Source§

type Output = FheProgramNode<Cipher<T>>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Self) -> Self::Output

Performs the - operation. Read more
Source§

impl<T> SwapRows for FheProgramNode<Cipher<T>>
where T: FheType + GraphCipherSwapRows,

Source§

type Output = FheProgramNode<Cipher<T>>

The result type. Typically, this should just be Self.
Source§

fn swap_rows(self) -> Self::Output

Performs a row swap.
Source§

impl<T, S> TypeName for FheProgramNode<T, S>

Source§

fn type_name() -> Type

Returns the Type of the &self. Lives only on the instance so you can be object-safe for use in dyn TypeName.
Source§

impl<T: Copy + NumCiphertexts, S: Copy> Copy for FheProgramNode<T, S>

Source§

impl<T: Eq + NumCiphertexts, S: Eq> Eq for FheProgramNode<T, S>

Source§

impl<T: NumCiphertexts, S> StructuralPartialEq for FheProgramNode<T, S>

Auto Trait Implementations§

§

impl<T, S> Freeze for FheProgramNode<T, S>
where S: Freeze,

§

impl<T, S> RefUnwindSafe for FheProgramNode<T, S>

§

impl<T, S> Send for FheProgramNode<T, S>
where S: Send, T: Send,

§

impl<T, S> Sync for FheProgramNode<T, S>
where S: Sync, T: Sync,

§

impl<T, S> Unpin for FheProgramNode<T, S>
where S: Unpin, T: Unpin,

§

impl<T, S> UnwindSafe for FheProgramNode<T, S>
where S: UnwindSafe, T: UnwindSafe,

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, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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

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<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> 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> Same for T

Source§

type Output = T

Should always be Self
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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

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

Source§

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

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

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

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T, U> ZkpInto<T> for U
where T: ZkpFrom<U>,