Struct sophia_api::triple::stream::FilterMapSource [−][src]
pub struct FilterMapSource<S, F> {
pub source: S,
pub filter_map: F,
}
Expand description
The result of TripleSource::filter_map_triples
Fields
source: S
filter_map: F
Trait Implementations
impl<S, F, T> IntoIterator for FilterMapSource<S, F> where
S: TripleSource,
F: FnMut(StreamedTriple<'_, S::Triple>) -> Option<T>,
T: 'static,
impl<S, F, T> IntoIterator for FilterMapSource<S, F> where
S: TripleSource,
F: FnMut(StreamedTriple<'_, S::Triple>) -> Option<T>,
T: 'static,
impl<S, F, T> QuadSource for FilterMapSource<S, F> where
S: TripleSource,
F: FnMut(StreamedTriple<'_, S::Triple>) -> Option<T>,
T: Quad,
impl<S, F, T> QuadSource for FilterMapSource<S, F> where
S: TripleSource,
F: FnMut(StreamedTriple<'_, S::Triple>) -> Option<T>,
T: Quad,
Determine the type of Quad
s
that this quad source yields.
(see streaming_mode
Read more
fn try_for_some_quad<G, E>(
&mut self,
f: &mut G
) -> StreamResult<bool, Self::Error, E> where
G: FnMut(StreamedQuad<'_, Self::Quad>) -> Result<(), E>,
E: Error,
fn try_for_some_quad<G, E>(
&mut self,
f: &mut G
) -> StreamResult<bool, Self::Error, E> where
G: FnMut(StreamedQuad<'_, Self::Quad>) -> Result<(), E>,
E: Error,
Call f for at least one quad from this quad source, if any. Read more
Returns the bounds on the remaining length of the quad source. Read more
fn try_for_each_quad<F, E>(&mut self, f: F) -> StreamResult<(), Self::Error, E> where
F: FnMut(StreamedQuad<'_, Self::Quad>) -> Result<(), E>,
E: Error,
fn try_for_each_quad<F, E>(&mut self, f: F) -> StreamResult<(), Self::Error, E> where
F: FnMut(StreamedQuad<'_, Self::Quad>) -> Result<(), E>,
E: Error,
Call f for all quads from this quad source.
fn for_some_quad<F>(&mut self, f: &mut F) -> Result<bool, Self::Error> where
F: FnMut(StreamedQuad<'_, Self::Quad>),
fn for_some_quad<F>(&mut self, f: &mut F) -> Result<bool, Self::Error> where
F: FnMut(StreamedQuad<'_, Self::Quad>),
Call f for at least one quad from this quad source, if any. Read more
fn for_each_quad<F>(&mut self, f: F) -> Result<(), Self::Error> where
F: FnMut(StreamedQuad<'_, Self::Quad>),
fn for_each_quad<F>(&mut self, f: F) -> Result<(), Self::Error> where
F: FnMut(StreamedQuad<'_, Self::Quad>),
Call f for all quads from this quad source.
fn filter_quads<F>(self, filter: F) -> FilterSource<Self, F> where
Self: Sized,
F: FnMut(&StreamedQuad<'_, Self::Quad>) -> bool,
fn filter_quads<F>(self, filter: F) -> FilterSource<Self, F> where
Self: Sized,
F: FnMut(&StreamedQuad<'_, Self::Quad>) -> bool,
Creates a quad source which uses a closure to determine if a quad should be yielded.
fn filter_map_quads<F, T>(self, filter_map: F) -> FilterMapSource<Self, F> where
Self: Sized,
F: FnMut(StreamedQuad<'_, Self::Quad>) -> Option<T>,
fn filter_map_quads<F, T>(self, filter_map: F) -> FilterMapSource<Self, F> where
Self: Sized,
F: FnMut(StreamedQuad<'_, Self::Quad>) -> Option<T>,
Creates a quad source that both filters and maps.
Takes a closure and creates quad source which yield the result of that closure for each quad.
fn collect_quads<D>(self) -> StreamResult<D, Self::Error, <D as Dataset>::Error> where
Self: Sized,
D: CollectibleDataset,
fn collect_quads<D>(self) -> StreamResult<D, Self::Error, <D as Dataset>::Error> where
Self: Sized,
D: CollectibleDataset,
Collect these quads into a new dataset.
fn add_to_dataset<D: MutableDataset>(
self,
dataset: &mut D
) -> StreamResult<usize, Self::Error, <D as MutableDataset>::MutationError> where
Self: Sized,
fn add_to_dataset<D: MutableDataset>(
self,
dataset: &mut D
) -> StreamResult<usize, Self::Error, <D as MutableDataset>::MutationError> where
Self: Sized,
Insert all quads from this source into the given MutableDataset. Read more
impl<S, F, T> TripleSource for FilterMapSource<S, F> where
S: TripleSource,
F: FnMut(StreamedTriple<'_, S::Triple>) -> Option<T>,
T: Triple,
impl<S, F, T> TripleSource for FilterMapSource<S, F> where
S: TripleSource,
F: FnMut(StreamedTriple<'_, S::Triple>) -> Option<T>,
T: Triple,
Determine the type of Triple
s
that this triple source yields.
(see streaming_mode
) Read more
fn try_for_some_triple<G, E>(
&mut self,
f: &mut G
) -> StreamResult<bool, Self::Error, E> where
G: FnMut(StreamedTriple<'_, Self::Triple>) -> Result<(), E>,
E: Error,
fn try_for_some_triple<G, E>(
&mut self,
f: &mut G
) -> StreamResult<bool, Self::Error, E> where
G: FnMut(StreamedTriple<'_, Self::Triple>) -> Result<(), E>,
E: Error,
Call f for at least one triple from this triple source, if any. Read more
Returns the bounds on the remaining length of the triple source. Read more
fn try_for_each_triple<F, E>(
&mut self,
f: F
) -> StreamResult<(), Self::Error, E> where
F: FnMut(StreamedTriple<'_, Self::Triple>) -> Result<(), E>,
E: Error,
fn try_for_each_triple<F, E>(
&mut self,
f: F
) -> StreamResult<(), Self::Error, E> where
F: FnMut(StreamedTriple<'_, Self::Triple>) -> Result<(), E>,
E: Error,
Call f for all triples from this triple source.
fn for_some_triple<F>(&mut self, f: &mut F) -> Result<bool, Self::Error> where
F: FnMut(StreamedTriple<'_, Self::Triple>),
fn for_some_triple<F>(&mut self, f: &mut F) -> Result<bool, Self::Error> where
F: FnMut(StreamedTriple<'_, Self::Triple>),
Call f for at least one triple from this triple source, if any. Read more
fn for_each_triple<F>(&mut self, f: F) -> Result<(), Self::Error> where
F: FnMut(StreamedTriple<'_, Self::Triple>),
fn for_each_triple<F>(&mut self, f: F) -> Result<(), Self::Error> where
F: FnMut(StreamedTriple<'_, Self::Triple>),
Call f for all triples from this triple source.
fn filter_triples<F>(self, filter: F) -> FilterSource<Self, F> where
Self: Sized,
F: FnMut(&StreamedTriple<'_, Self::Triple>) -> bool,
fn filter_triples<F>(self, filter: F) -> FilterSource<Self, F> where
Self: Sized,
F: FnMut(&StreamedTriple<'_, Self::Triple>) -> bool,
Creates a triple source which uses a closure to determine if a triple should be yielded.
fn filter_map_triples<F, T>(self, filter_map: F) -> FilterMapSource<Self, F> where
Self: Sized,
F: FnMut(StreamedTriple<'_, Self::Triple>) -> Option<T>,
fn filter_map_triples<F, T>(self, filter_map: F) -> FilterMapSource<Self, F> where
Self: Sized,
F: FnMut(StreamedTriple<'_, Self::Triple>) -> Option<T>,
Creates a triple source that both filters and maps.
fn map_triples<F, T>(self, map: F) -> MapSource<Self, F> where
Self: Sized,
F: FnMut(StreamedTriple<'_, Self::Triple>) -> T,
fn map_triples<F, T>(self, map: F) -> MapSource<Self, F> where
Self: Sized,
F: FnMut(StreamedTriple<'_, Self::Triple>) -> T,
Takes a closure and creates triple source which yield the result of that closure for each triple.
fn collect_triples<G>(self) -> StreamResult<G, Self::Error, <G as Graph>::Error> where
Self: Sized,
G: CollectibleGraph,
fn collect_triples<G>(self) -> StreamResult<G, Self::Error, <G as Graph>::Error> where
Self: Sized,
G: CollectibleGraph,
Collect these triples into a new graph.
fn add_to_graph<G: MutableGraph>(
self,
graph: &mut G
) -> StreamResult<usize, Self::Error, <G as MutableGraph>::MutationError> where
Self: Sized,
fn add_to_graph<G: MutableGraph>(
self,
graph: &mut G
) -> StreamResult<usize, Self::Error, <G as MutableGraph>::MutationError> where
Self: Sized,
Insert all triples from this source into the given MutableGraph. Read more