pub trait HasGetAPI<'a> {
// Provided methods
fn get<T>(&'a self, segment: impl Into<String>) -> Option<T>
where &'a Self: HasGet + HasBranches<T>,
T: HasPathSegment + 'a { ... }
fn get_mut<T>(&'a mut self, segment: impl Into<String>) -> Option<T>
where &'a mut Self: HasGet + HasBranches<T>,
T: HasPathSegment + 'a { ... }
fn branch<T>(&'a mut self, segment: impl Into<String>) -> &'a mut T
where &'a mut Self: HasGet + HasBranches<&'a mut T>,
Self: AddBranch<T> + Sized,
T: HasPathSegment + 'a,
String: Into<T> { ... }
}
Expand description
This is an API trait for getting branches by their path segments.
Provided Methods§
sourcefn get<T>(&'a self, segment: impl Into<String>) -> Option<T>
fn get<T>(&'a self, segment: impl Into<String>) -> Option<T>
Gets a branch by its path segment.
sourcefn get_mut<T>(&'a mut self, segment: impl Into<String>) -> Option<T>
fn get_mut<T>(&'a mut self, segment: impl Into<String>) -> Option<T>
Gets a branch by its path segment mutably.
fn branch<T>(&'a mut self, segment: impl Into<String>) -> &'a mut Twhere
&'a mut Self: HasGet + HasBranches<&'a mut T>,
Self: AddBranch<T> + Sized,
T: HasPathSegment + 'a,
String: Into<T>,
Object Safety§
This trait is not object safe.