diff --git a/src/rcore.rs b/src/rcore.rs index d975922..6e3ac0d 100644 --- a/src/rcore.rs +++ b/src/rcore.rs @@ -22,7 +22,7 @@ use std::{error::Error, rc::Rc}; use crate::func::context::*; use crate::func::*; -pub use self::addresses::{Addresses, InliningAddresses}; +use self::addresses::{Addresses, InliningAddresses}; pub use self::context::Context; use self::dectx::{DeCtx, DeCtxT}; pub use self::diagnostic::Diagnostic; diff --git a/src/rcore/addresses.rs b/src/rcore/addresses.rs index 19e9061..584cab3 100644 --- a/src/rcore/addresses.rs +++ b/src/rcore/addresses.rs @@ -1,7 +1,7 @@ use super::*; /// Preferred way to parse [Point]s off of a [Serializer]. -pub struct Addresses { +pub(super) struct Addresses { current: usize, } @@ -20,27 +20,13 @@ impl Addresses { Ok(address) } - /// Read the next [Point]. - pub fn next_point<'a, 'b, Ctx: Context<'a>, A: Mentionable<'a, Ctx>>( - &mut self, - deserializer: &'b mut dyn Deserializer, - resolver: Rc>, - factory: A::Fctr, - ) -> Result, &'b [u8]> { - Ok(Point::from_address( - self.next(deserializer)?, - factory, - resolver, - )) - } - /// Start reading the [Address]es. fn start() -> Self { Addresses { current: 0 } } } -pub trait InliningAddresses: Inlining { +pub(super) trait InliningAddresses: Inlining { fn inext_address( self, addresses: &mut Addresses, diff --git a/src/rcore/inctx.rs b/src/rcore/inctx.rs index 13342f2..9f6b864 100644 --- a/src/rcore/inctx.rs +++ b/src/rcore/inctx.rs @@ -2,10 +2,10 @@ use super::*; /// [Inlining] context. pub trait InCtx<'a, Ctx: Context<'a>>: Inlining { - /// [Inlining] equivalent for [`Addresses::next`]. + /// Read the next [Address]. fn icnext_address(self, err: impl FnOnce(&[u8]) -> E) -> Result<(Address, Self), E>; - /// [Inlining] equivalent for [`Addresses::next_point`]. + /// Read the next [Point]. fn icnext_point<'b, A: Mentionable<'a, Ctx>, E>( self, factory: A::Fctr,