add r
prefixes to avoid confusion
This commit is contained in:
parent
13932f098c
commit
45923c401e
@ -1,4 +1,4 @@
|
||||
//! Data structures and algorithms, independent of [`crate::core`] concepts.
|
||||
//! Data structures and algorithms, independent of [`crate::rcore`] concepts.
|
||||
|
||||
pub mod binary;
|
||||
pub mod traversible;
|
||||
|
@ -173,7 +173,7 @@ impl<'a, T: 'a + Monad, A: 'a> UnbalancedConstructor<'a, T, A> {
|
||||
mod tests {
|
||||
use rand::{Rng, SeedableRng};
|
||||
|
||||
use crate::std::tracing::*;
|
||||
use crate::rstd::tracing::*;
|
||||
|
||||
use super::{algorithms::contains::*, algorithms::subset::*, *};
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
//! # RADN
|
||||
//! Rainbow something something Network.
|
||||
|
||||
pub mod core;
|
||||
pub mod flow;
|
||||
pub mod func;
|
||||
pub mod std;
|
||||
pub mod rcore;
|
||||
pub mod rstd;
|
||||
#[cfg(test)]
|
||||
mod testing;
|
||||
|
@ -81,7 +81,7 @@ pub type ParseResult<'a, Ctx, F> =
|
||||
Result<<F as Factory<'a, Ctx>>::Mtbl, <F as Factory<'a, Ctx>>::ParseError>;
|
||||
|
||||
/// Trait representing deserialisation rules for [Mentionable]s.
|
||||
/// Crucial for [`crate::std::typeless`].
|
||||
/// Crucial for [`crate::rstd::typeless`].
|
||||
pub trait Factory<'a, Ctx: 'a + Context>: 'a + Send + Sync + Clone {
|
||||
/// Type of the associated objects.
|
||||
type Mtbl: Mentionable<'a, Ctx, Fctr = Self>;
|
@ -67,7 +67,7 @@ impl<'a, Ctx: 'a + Context, F: Factory<'a, Ctx>> ExtFactory<'a, Ctx> for F {
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use crate::core::*;
|
||||
use crate::rcore::*;
|
||||
|
||||
#[test]
|
||||
fn can_read_one_address() {
|
@ -5,7 +5,7 @@ use super::*;
|
||||
pub const HASH_SIZE: usize = 32;
|
||||
|
||||
/// Zeroed out array of the same length as [`type@Hash`].
|
||||
/// Used in [`crate::std::nullable`].
|
||||
/// Used in [`crate::rstd::nullable`].
|
||||
pub const HASH_ZEROS: [u8; HASH_SIZE] = [0; HASH_SIZE];
|
||||
|
||||
/// For use in [`Point`]/[`Address`].
|
@ -8,7 +8,7 @@ use super::*;
|
||||
pub trait Serializer {
|
||||
/// Writes bytes from a slice. Should advance value of [`Serializer::tell()`] by `buf.len()`.
|
||||
fn write(&mut self, buf: &[u8]);
|
||||
/// Current position of the stream. Used by [`crate::std::inlining::CheckedSerialize`].
|
||||
/// Current position of the stream. Used by [`crate::rstd::inlining::CheckedSerialize`].
|
||||
fn tell(&self) -> usize;
|
||||
}
|
||||
|
||||
@ -36,7 +36,7 @@ pub trait Deserializer {
|
||||
fn read_n(&mut self, n: usize) -> &[u8];
|
||||
/// Read til the end of the stream.
|
||||
fn read_all(&mut self) -> &[u8];
|
||||
/// Current position of the stream. Used by [`crate::std::inlining::CheckedParse`].
|
||||
/// Current position of the stream. Used by [`crate::rstd::inlining::CheckedParse`].
|
||||
fn tell(&self) -> usize;
|
||||
}
|
||||
|
@ -2,7 +2,7 @@ use std::cmp::min;
|
||||
|
||||
use super::*;
|
||||
|
||||
/// [Deserializer] for slices. Used in [`ExtFactory::parse_slice`] and [`crate::std::atomic::ExtAtomic::parse_slice`].
|
||||
/// [Deserializer] for slices. Used in [`ExtFactory::parse_slice`] and [`crate::rstd::atomic::ExtAtomic::parse_slice`].
|
||||
pub struct SliceDeserializer<'a> {
|
||||
slice: &'a [u8],
|
||||
pos: usize,
|
@ -1,4 +1,4 @@
|
||||
//! Standard extensions to [`crate::core`].
|
||||
//! Standard extensions to [`crate::rcore`].
|
||||
|
||||
pub mod atomic;
|
||||
pub mod cast;
|
||||
@ -14,8 +14,8 @@ mod wrapped_origin;
|
||||
|
||||
use std::{error::Error, fmt::Display, rc::Rc};
|
||||
|
||||
use crate::core::*;
|
||||
use crate::func::*;
|
||||
use crate::rcore::*;
|
||||
|
||||
impl Display for Address {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
@ -7,7 +7,7 @@ pub mod plain;
|
||||
|
||||
use std::marker::PhantomData;
|
||||
|
||||
use crate::core::*;
|
||||
use crate::rcore::*;
|
||||
|
||||
use super::*;
|
||||
|
@ -1,4 +1,4 @@
|
||||
use crate::std::inlining::*;
|
||||
use crate::rstd::inlining::*;
|
||||
|
||||
use super::*;
|
||||
|
@ -58,7 +58,7 @@ impl Plain {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::std::*;
|
||||
use crate::rstd::*;
|
||||
|
||||
#[test]
|
||||
fn can_parse_plain_slice() -> Result<(), PlainParseError> {
|
@ -1,11 +1,11 @@
|
||||
//! Utilities to convert from typeless instances defined in [`crate::core`].
|
||||
//! Utilities to convert from typeless instances defined in [`crate::rcore`].
|
||||
//! See [`TypelessMentionable::cast`]/[`Point::cast`].
|
||||
//!
|
||||
//! p.s. the implementation is horrific.
|
||||
|
||||
use std::convert::identity;
|
||||
|
||||
use crate::core::*;
|
||||
use crate::rcore::*;
|
||||
|
||||
use super::{typeless::*, wrapped_origin::*, *};
|
||||
|
@ -3,8 +3,8 @@
|
||||
use std::error::Error;
|
||||
use std::fmt::Display;
|
||||
|
||||
use crate::core::*;
|
||||
use crate::std::inlining::{static_pair::*, *};
|
||||
use crate::rcore::*;
|
||||
use crate::rstd::inlining::{static_pair::*, *};
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct Pair<A, B> {
|
@ -2,8 +2,8 @@ pub mod subset;
|
||||
|
||||
use std::{error::Error, fmt::Display, rc::Rc};
|
||||
|
||||
use crate::core::*;
|
||||
use crate::std::{
|
||||
use crate::rcore::*;
|
||||
use crate::rstd::{
|
||||
atomic::{boolean::*, *},
|
||||
nullable::*,
|
||||
point::*,
|
@ -2,7 +2,7 @@ use std::rc::Rc;
|
||||
|
||||
use crate::flow::traversible::*;
|
||||
use crate::func::*;
|
||||
use crate::std::{fallible::*, *};
|
||||
use crate::rstd::{fallible::*, *};
|
||||
|
||||
use super::*;
|
||||
|
@ -1,7 +1,7 @@
|
||||
//! Basic implementation of a stack/linked list.
|
||||
|
||||
use crate::core::*;
|
||||
use crate::std::{inlining::*, nullable::*, point::*, *};
|
||||
use crate::rcore::*;
|
||||
use crate::rstd::{inlining::*, nullable::*, point::*, *};
|
||||
|
||||
/// Node containing a (nullable) reference to the next node and an element.
|
||||
pub struct StackNode<'a, Ctx: 'a + Context, A: Mentionable<'a, Ctx>> {
|
||||
@ -205,7 +205,7 @@ where
|
||||
mod tests {
|
||||
use std::rc::Rc;
|
||||
|
||||
use crate::std::{
|
||||
use crate::rstd::{
|
||||
atomic::{atomic_object::*, plain::*},
|
||||
tracing::*,
|
||||
};
|
@ -2,7 +2,7 @@
|
||||
|
||||
pub mod static_pair;
|
||||
|
||||
use crate::core::*;
|
||||
use crate::rcore::*;
|
||||
|
||||
use super::{
|
||||
atomic::{atomic_object::*, *},
|
@ -3,7 +3,7 @@
|
||||
|
||||
use std::ops::Deref;
|
||||
|
||||
use crate::std::*;
|
||||
use crate::rstd::*;
|
||||
|
||||
use super::*;
|
||||
|
@ -1,6 +1,6 @@
|
||||
use std::rc::Rc;
|
||||
|
||||
use crate::core::*;
|
||||
use crate::rcore::*;
|
||||
|
||||
use super::*;
|
||||
|
@ -1,6 +1,6 @@
|
||||
//! This module introduces [`Option`]-like concepts into RADN typesystem using [`Nullable`].
|
||||
|
||||
use crate::core::*;
|
||||
use crate::rcore::*;
|
||||
|
||||
use super::{inlining::*, point::*, *};
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
use std::{error::Error, fmt::Display, rc::Rc};
|
||||
|
||||
use crate::core::*;
|
||||
use crate::rcore::*;
|
||||
|
||||
impl<'a, Ctx: 'a + Context, A: Mentionable<'a, Ctx>> Serializable for Point<'a, Ctx, A> {
|
||||
fn serialize(&self, serializer: &mut dyn Serializer) {
|
@ -6,7 +6,7 @@ mod trace;
|
||||
mod traceable;
|
||||
mod traced;
|
||||
|
||||
use crate::core::*;
|
||||
use crate::rcore::*;
|
||||
|
||||
use super::*;
|
||||
|
@ -1,9 +1,9 @@
|
||||
use std::cmp::max;
|
||||
|
||||
#[cfg(doc)]
|
||||
use crate::core::*;
|
||||
#[cfg(doc)]
|
||||
use crate::func::*;
|
||||
#[cfg(doc)]
|
||||
use crate::rcore::*;
|
||||
|
||||
#[cfg(doc)]
|
||||
use super::*;
|
@ -1,4 +1,4 @@
|
||||
use crate::std::tracing::{rendered::*, *};
|
||||
use crate::rstd::tracing::{rendered::*, *};
|
||||
|
||||
use super::*;
|
||||
|
@ -1,4 +1,4 @@
|
||||
use crate::std::{cast::*, typeless::*};
|
||||
use crate::rstd::{cast::*, typeless::*};
|
||||
|
||||
use super::*;
|
||||
|
@ -1,4 +1,4 @@
|
||||
//! Previously part of [`crate::core`].
|
||||
//! Previously part of [`crate::rcore`].
|
||||
|
||||
use super::{wrapped_origin::*, *};
|
||||
|
@ -5,10 +5,10 @@ use std::{error::Error, fmt::Display, rc::Rc};
|
||||
|
||||
use sha2::{Digest, Sha256};
|
||||
|
||||
use crate::core::*;
|
||||
use crate::func::*;
|
||||
use crate::std::cast::*;
|
||||
use crate::std::typeless::*;
|
||||
use crate::rcore::*;
|
||||
use crate::rstd::cast::*;
|
||||
use crate::rstd::typeless::*;
|
||||
|
||||
pub struct NoDiagnostic;
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
use std::cmp::max;
|
||||
|
||||
use crate::core::*;
|
||||
use crate::func::*;
|
||||
use crate::std::typeless::*;
|
||||
use crate::rcore::*;
|
||||
use crate::rstd::typeless::*;
|
||||
|
||||
use super::*;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
use crate::core::*;
|
||||
use crate::std::tracing::*;
|
||||
use crate::rcore::*;
|
||||
use crate::rstd::tracing::*;
|
||||
|
||||
use super::*;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user