Struct pretty_rdf::PChunk
source · pub struct PChunk<A: AsRef<str>> { /* private fields */ }
Expand description
A set of triple like objects that represents a coherent chunk
Current invariants:
- each subject should appear only once (i.e. all subjects are grouped in PMultiTriple, or AsRefSeq)
- if a subject appears it represents all appearances of the node as a subject in the document of which this is a chunk
- if BNodes appear as subjects, they appear after any apperance as an object (TODO: Not implemented yet!)
Implementations§
source§impl<A> PChunk<A>
impl<A> PChunk<A>
sourcepub fn normalize(v: Vec<PTriple<A>>) -> Self
pub fn normalize(v: Vec<PTriple<A>>) -> Self
Given a set of triples normalize these to a chunk wth appropriate prettification applied
pub fn empty() -> Self
pub fn sort(&mut self)
pub fn accept_or_push_back(&mut self, t: PTriple<A>)
pub fn push_back(&mut self, et: PExpandedTriple<A>)
pub fn pop_front(&mut self) -> Option<PExpandedTriple<A>>
Trait Implementations§
Auto Trait Implementations§
impl<A> Freeze for PChunk<A>
impl<A> !RefUnwindSafe for PChunk<A>
impl<A> Send for PChunk<A>where
A: Send,
impl<A> !Sync for PChunk<A>
impl<A> Unpin for PChunk<A>where
A: Unpin,
impl<A> UnwindSafe for PChunk<A>where
A: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more