pub struct Origin<F, T> {
pub trees: Vec<GrTree>,
pub map: HashMap<F, (VarId, usize)>,
/* private fields */
}Fields§
§trees: Vec<GrTree>§map: HashMap<F, (VarId, usize)>Implementations§
Source§impl<F, T> Origin<F, T>
impl<F, T> Origin<F, T>
Sourcepub fn with_capacity(size: usize) -> Self
pub fn with_capacity(size: usize) -> Self
Creates a blank Origin object with a tree capacity of size. Use this method when
you can’t give the data in a form that suits the other constructors but when you know
the number of variables.
Sourcepub fn from_data(trees: Vec<GrTree>, map: HashMap<F, (VarId, usize)>) -> Self
pub fn from_data(trees: Vec<GrTree>, map: HashMap<F, (VarId, usize)>) -> Self
Creates an Origin object with the given trees and mapping.
Sourcepub fn from_trees_mut(trees: &mut Vec<GrTree>) -> Self
pub fn from_trees_mut(trees: &mut Vec<GrTree>) -> Self
Creates an Origin object with the given trees as mutable reference. It will
take the content from trees to create the object. After that, trees is empty.
Use this method to create an Origin object from another generic form of the
same type; typically when creating an Origin<(VarId, AltId), FromPRS> from an
Origin<(VarId, usize), FromRTS> if you can’t move the original.
Trait Implementations§
Auto Trait Implementations§
impl<F, T> Freeze for Origin<F, T>
impl<F, T> !RefUnwindSafe for Origin<F, T>
impl<F, T> Send for Origin<F, T>
impl<F, T> !Sync for Origin<F, T>
impl<F, T> Unpin for Origin<F, T>
impl<F, T> UnwindSafe for Origin<F, T>where
F: UnwindSafe,
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<S> BuildFrom<S> for S
impl<S> BuildFrom<S> for S
Source§fn build_from(source: S) -> S
fn build_from(source: S) -> S
Converts to this type from the input type.
Source§impl<S, T> BuildInto<T> for Swhere
T: BuildFrom<S>,
impl<S, T> BuildInto<T> for Swhere
T: BuildFrom<S>,
Source§fn build_into(self) -> T
fn build_into(self) -> T
Calls T::from(self) to convert a [S] into a [T].
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<S, T> TryBuildInto<T> for Swhere
T: TryBuildFrom<S>,
impl<S, T> TryBuildInto<T> for Swhere
T: TryBuildFrom<S>,
Source§type Error = <T as TryBuildFrom<S>>::Error
type Error = <T as TryBuildFrom<S>>::Error
The type returned in the event of a conversion error.
Source§fn try_build_into(self) -> Result<T, <T as TryBuildFrom<S>>::Error>
fn try_build_into(self) -> Result<T, <T as TryBuildFrom<S>>::Error>
Performs the conversion.