pub struct PathFinderConfig {
pub max_depth: usize,
pub max_paths: usize,
}Expand description
The PathFinderConfig object provides a standard interface for configuring various
implemented transformers.
Fields§
§max_depth: usizeMaximum search depth for pathfinding
max_paths: usizeMaximum number of paths to find
Implementations§
Source§impl PathFinderConfig
impl PathFinderConfig
Sourcepub const DEFAULT_MAX_DEPTH: usize = 5
pub const DEFAULT_MAX_DEPTH: usize = 5
the default maximum search depth for pathfinding
Sourcepub const DEFAULT_MAX_PATHS: usize = 5
pub const DEFAULT_MAX_PATHS: usize = 5
the default maximum number of paths to find
Sourcepub const fn new(depth: usize, paths: usize) -> PathFinderConfig
pub const fn new(depth: usize, paths: usize) -> PathFinderConfig
returns a new instance of the PathFinderConfig with the given values
Sourcepub const fn from_depth(depth: usize) -> PathFinderConfig
pub const fn from_depth(depth: usize) -> PathFinderConfig
returns a new instance of the PathFinderConfig with the given depth and default
paths
Sourcepub const fn from_paths(paths: usize) -> PathFinderConfig
pub const fn from_paths(paths: usize) -> PathFinderConfig
returns a new instance of the PathFinderConfig with the given paths and default
depth
Sourcepub const fn max_depth_mut(&mut self) -> &mut usize
pub const fn max_depth_mut(&mut self) -> &mut usize
returns a mutable reference to the maximum depth for pathfinding
Sourcepub const fn max_paths_mut(&mut self) -> &mut usize
pub const fn max_paths_mut(&mut self) -> &mut usize
returns a mutable reference to the maximum number of paths to find
Sourcepub const fn replace_max_depth(&mut self, depth: usize) -> usize
pub const fn replace_max_depth(&mut self, depth: usize) -> usize
replace the maximum depth for pathfinding, returning the previous value
Sourcepub const fn replace_max_paths(&mut self, paths: usize) -> usize
pub const fn replace_max_paths(&mut self, paths: usize) -> usize
replace the maximum number of paths to find, returning the previous value
Sourcepub const fn replace(&mut self, other: PathFinderConfig) -> PathFinderConfig
pub const fn replace(&mut self, other: PathFinderConfig) -> PathFinderConfig
replace the current values with that of another instance
Sourcepub const fn set_max_depth(&mut self, depth: usize)
pub const fn set_max_depth(&mut self, depth: usize)
set the maximum depth for pathfinding
Sourcepub const fn set_max_paths(&mut self, paths: usize)
pub const fn set_max_paths(&mut self, paths: usize)
set the maximum number of paths to find
Sourcepub fn with_max_depth(self, depth: usize) -> PathFinderConfig
pub fn with_max_depth(self, depth: usize) -> PathFinderConfig
consumes the current instance to create another with the given maximum depth
Sourcepub fn with_max_paths(self, paths: usize) -> PathFinderConfig
pub fn with_max_paths(self, paths: usize) -> PathFinderConfig
consumes the current instance to create another with the given maximum number of paths
Trait Implementations§
Source§impl Clone for PathFinderConfig
impl Clone for PathFinderConfig
Source§fn clone(&self) -> PathFinderConfig
fn clone(&self) -> PathFinderConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PathFinderConfig
impl Debug for PathFinderConfig
Source§impl Default for PathFinderConfig
impl Default for PathFinderConfig
Source§fn default() -> PathFinderConfig
fn default() -> PathFinderConfig
Source§impl Display for PathFinderConfig
impl Display for PathFinderConfig
Source§impl Hash for PathFinderConfig
impl Hash for PathFinderConfig
Source§impl Ord for PathFinderConfig
impl Ord for PathFinderConfig
Source§fn cmp(&self, other: &PathFinderConfig) -> Ordering
fn cmp(&self, other: &PathFinderConfig) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for PathFinderConfig
impl PartialEq for PathFinderConfig
Source§impl PartialOrd for PathFinderConfig
impl PartialOrd for PathFinderConfig
impl Copy for PathFinderConfig
impl Eq for PathFinderConfig
impl StructuralPartialEq for PathFinderConfig
Auto Trait Implementations§
impl Freeze for PathFinderConfig
impl RefUnwindSafe for PathFinderConfig
impl Send for PathFinderConfig
impl Sync for PathFinderConfig
impl Unpin for PathFinderConfig
impl UnwindSafe for PathFinderConfig
Blanket Implementations§
Source§impl<T> AsWeight<T> for Twhere
T: Clone + IntoWeight<T>,
impl<T> AsWeight<T> for Twhere
T: Clone + IntoWeight<T>,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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>
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>
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