pub struct ExprRetargetMap { /* private fields */ }Expand description
A bidirectional name mapping between two character rigs.
Optionally carries prefix-rewrite rules inserted by build_prefix_map.
Implementations§
Source§impl RetargetMap
impl RetargetMap
Sourcepub fn add(&mut self, source: impl Into<String>, target: impl Into<String>)
pub fn add(&mut self, source: impl Into<String>, target: impl Into<String>)
Register a source ↔ target name pair (explicit entry).
Sourcepub fn forward(&self, source: &str) -> Option<&str>
pub fn forward(&self, source: &str) -> Option<&str>
Look up the target name for a given source name.
Checks explicit entries first, then prefix rules.
Sourcepub fn forward_owned(&self, source: &str) -> Option<String>
pub fn forward_owned(&self, source: &str) -> Option<String>
Like forward but returns an owned String; also resolves prefix rules.
Sourcepub fn inverse(&self, target: &str) -> Option<&str>
pub fn inverse(&self, target: &str) -> Option<&str>
Look up the source name for a given target name.
Sourcepub fn retarget_weights(&self, source_weights: &MorphWeights) -> MorphWeights
pub fn retarget_weights(&self, source_weights: &MorphWeights) -> MorphWeights
Remap source_weights keys through the forward mapping; drop unmapped.
Sourcepub fn inverse_retarget_weights(
&self,
target_weights: &MorphWeights,
) -> MorphWeights
pub fn inverse_retarget_weights( &self, target_weights: &MorphWeights, ) -> MorphWeights
Remap target_weights keys through the inverse mapping; drop unmapped.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RetargetMap
impl RefUnwindSafe for RetargetMap
impl Send for RetargetMap
impl Sync for RetargetMap
impl Unpin for RetargetMap
impl UnsafeUnpin for RetargetMap
impl UnwindSafe for RetargetMap
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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