pub struct Collection { /* private fields */ }Expand description
Compact source ranges retain unknown properties without copying their values. Node IDs are local to this collection. No position or image is stored per node.
Implementations§
Source§impl Collection
impl Collection
pub fn parse(source: Arc<[u8]>, cancel: &AtomicBool) -> Result<Self, Error>
pub fn nodes(&self) -> &[Node]
pub fn games(&self) -> &[Game]
pub fn source(&self) -> &[u8] ⓘ
pub fn node_for_offset(&self, offset: usize) -> NodeId
pub fn text(&self, node: NodeId, property: &str) -> Option<String>
pub fn children(&self, node: NodeId) -> impl Iterator<Item = NodeId> + '_
pub fn title(&self, game: usize) -> String
pub fn position( &self, node: NodeId, cancel: &AtomicBool, ) -> Result<Position, Error>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Collection
impl RefUnwindSafe for Collection
impl Send for Collection
impl Sync for Collection
impl Unpin for Collection
impl UnsafeUnpin for Collection
impl UnwindSafe for Collection
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