[−][src]Struct stork::Storkable
A Storkable represents a "thing" which is traversable ("storkable").
To start "storking" an initial Storkable can be constructed with with Storkable::new, once initialised filters can be added using Storkable::with_filters.
After a Storkable has been initialised, the storking can begin with a call to Storkable::exec which will return a stream of more Storkables (with the filters from the parent Storkable copied) which in turn can also be storked if necessary.
A Storkable derives its functionality from its two generics,
T
and C: StorkClient<T>
. The StorkClient
implementation will
be called with a value of T
, and is expected to return all the
values of T
that can be found on the given T
.
Methods
impl<'a, T: Unpin + 'a, C: StorkClient<T> + 'a> Storkable<T, C>
[src]
pub fn new(val: T) -> Self
[src]
Instantiates a new Storkable from a T, storking can then begin on the given entrypoint using the Storkable::exec method.
pub fn with_filters(self, filters: FilterSet<T>) -> Self
[src]
pub fn with_client(self, client: C) -> Self
[src]
Replaces the default StorkClient with a new one accepting and returning the same type for this Storkable.
pub fn filters(&self) -> &FilterSet<T>
[src]
pub fn val(&self) -> &T
[src]
Get the value of this Storkable.
pub fn parent(&self) -> Option<&Storkable<T, C>>
[src]
pub fn exec<'b>(self) -> impl Stream<Item = Result<Storkable<T, C>, Error>> + 'a
[src]
Trait Implementations
impl<T: Clone + Unpin, C: Clone + StorkClient<T>> Clone for Storkable<T, C>
[src]
impl<T: Debug + Unpin, C: Debug + StorkClient<T>> Debug for Storkable<T, C>
[src]
Auto Trait Implementations
impl<T, C> !RefUnwindSafe for Storkable<T, C>
impl<T, C> !Send for Storkable<T, C>
impl<T, C> !Sync for Storkable<T, C>
impl<T, C> Unpin for Storkable<T, C>
impl<T, C> !UnwindSafe for Storkable<T, C>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DynClone for T where
T: Clone,
[src]
T: Clone,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,