Trait is_tree::traits::has_get::HasGetAPI

source ·
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§

source

fn get<T>(&'a self, segment: impl Into<String>) -> Option<T>

Gets a branch by its path segment.

source

fn get_mut<T>(&'a mut self, segment: impl Into<String>) -> Option<T>

Gets a branch by its path segment mutably.

source

fn branch<T>(&'a mut self, segment: impl Into<String>) -> &'a mut T

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<'a, T> HasGetAPI<'a> for T