srdf::srdf_parser

Struct SetFocus

Source
pub struct SetFocus<RDF>
where RDF: FocusRDF,
{ /* private fields */ }

Trait Implementations§

Source§

impl<RDF> Clone for SetFocus<RDF>
where RDF: FocusRDF + Clone, RDF::Term: Clone,

Source§

fn clone(&self) -> SetFocus<RDF>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<RDF> Debug for SetFocus<RDF>
where RDF: FocusRDF + Debug, RDF::Term: Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<RDF> RDFNodeParse<RDF> for SetFocus<RDF>
where RDF: FocusRDF,

Source§

type Output = ()

The type which is returned if the parser is successful.
Source§

fn parse_impl(&mut self, rdf: &mut RDF) -> PResult<()>

Parses the current focus node without modifying the state
Source§

fn parse(&mut self, node: &IriS, rdf: RDF) -> PResult<Self::Output>

Entry point to the parser. It moves the focus node of rdf to node and runs the parser. Read more
Source§

fn by_ref(&mut self) -> ByRef<'_, Self>
where Self: Sized,

Source§

fn flat_map<F, O>(self, f: F) -> FlatMap<Self, F>
where Self: Sized, F: FnMut(Self::Output) -> PResult<O>,

Uses f to map over the output of self. If f returns an error the parser fails. Read more
Source§

fn and_then<F, O, E>(self, f: F) -> AndThen<Self, F>
where Self: Sized, F: FnMut(Self::Output) -> Result<O, E>, E: Into<RDFParseError>,

Parses with self and applies f on the result if self parses successfully. f may optionally fail with an error which is automatically converted to a RDFParseError. Read more
Source§

fn map<F, B>(self, f: F) -> Map<Self, F>
where Self: Sized, F: FnMut(Self::Output) -> B,

Uses f to map over the parsed value. Read more
Source§

fn and<P2>(self, parser: P2) -> (Self, P2)
where Self: Sized, P2: RDFNodeParse<RDF>,

Parses self followed by p. Succeeds if both parsers succeed, otherwise fails. Returns a tuple with both values on success. Read more
Source§

fn then<N, F>(self, f: F) -> Then<Self, F>
where Self: Sized, F: FnMut(Self::Output) -> N, N: RDFNodeParse<RDF>,

Parses using self and then passes the value to f which returns a parser used to parse the rest of the input.
Source§

fn then_ref<N, F>(self, f: F) -> ThenRef<Self, F>
where Self: Sized, F: FnMut(&Self::Output) -> N, N: RDFNodeParse<RDF>,

Parses using self and then passes a reference to the value to f which returns a parser used to parse the rest of the input.
Source§

fn then_mut<N, F>(self, f: F) -> ThenMut<Self, F>
where Self: Sized, F: FnMut(&mut Self::Output) -> N, N: RDFNodeParse<RDF>,

Parses using self and then passes a reference to the mutable value to f which returns a parser used to parse the rest of the input. Read more
Source§

fn or<P2>(self, parser: P2) -> Or<Self, P2>
where Self: Sized, P2: RDFNodeParse<RDF, Output = Self::Output>,

Returns a parser which attempts to parse using self. If self fails then it attempts parser. Read more
Source§

fn focus(self, node: &RDF::Term) -> SetFocus<RDF>
where Self: Sized,

Sets the focus node and returns ()
Source§

fn with<P, A>(self, parser: P) -> With<Self, P>
where Self: Sized, P: RDFNodeParse<RDF, Output = A>,

Discards the value of the current parser and returns the value of parser Read more

Auto Trait Implementations§

§

impl<RDF> Freeze for SetFocus<RDF>
where <RDF as SRDFBasic>::Term: Freeze,

§

impl<RDF> RefUnwindSafe for SetFocus<RDF>
where <RDF as SRDFBasic>::Term: RefUnwindSafe, RDF: RefUnwindSafe,

§

impl<RDF> Send for SetFocus<RDF>
where <RDF as SRDFBasic>::Term: Send, RDF: Send,

§

impl<RDF> Sync for SetFocus<RDF>
where <RDF as SRDFBasic>::Term: Sync, RDF: Sync,

§

impl<RDF> Unpin for SetFocus<RDF>
where <RDF as SRDFBasic>::Term: Unpin, RDF: Unpin,

§

impl<RDF> UnwindSafe for SetFocus<RDF>
where <RDF as SRDFBasic>::Term: UnwindSafe, RDF: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T