Struct sunscreen_fhe_program::TransformList
source · [−]pub struct TransformList { /* private fields */ }
Expand description
A list of tranformations to be applied to the FheProgram
graph.
Implementations
sourceimpl TransformList
impl TransformList
sourcepub fn push(&mut self, transform: IRTransform) -> DeferredIndex
pub fn push(&mut self, transform: IRTransform) -> DeferredIndex
Pushes a transform into the list and returns the index of the pushed transform
suitable for use in TransformNodeIndex::DeferredIndex
.
sourcepub fn apply(&mut self, ir: &mut FheProgram)
pub fn apply(&mut self, ir: &mut FheProgram)
Applies every transform in the list to the given graph. Resoves any deferred indices after placing nodes in the graph.
Panics
If any deferred index is out of bounds or refers to a previous operation that didn’t
result in a node being added, this function will panic. For example, if an IRTransform::AppendAdd
refers to the index of a IRTransform::RemoveEdge
transform, a panic will result.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for TransformList
impl Send for TransformList
impl Sync for TransformList
impl Unpin for TransformList
impl UnwindSafe for TransformList
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more