mirror of
https://gitlab.com/veilid/veilid.git
synced 2025-08-03 12:16:22 -04:00
Trim API surface of unintentional exports
This commit is contained in:
parent
a2b6d74485
commit
17f48870b6
6 changed files with 18 additions and 14 deletions
|
@ -324,10 +324,12 @@ impl Envelope {
|
|||
self.timestamp
|
||||
}
|
||||
|
||||
#[expect(dead_code)]
|
||||
pub fn get_nonce(&self) -> Nonce {
|
||||
self.nonce
|
||||
}
|
||||
|
||||
#[expect(dead_code)]
|
||||
pub fn get_sender_id(&self) -> NodeId {
|
||||
self.sender_id
|
||||
}
|
||||
|
@ -336,6 +338,7 @@ impl Envelope {
|
|||
TypedNodeId::new(self.crypto_kind, self.sender_id)
|
||||
}
|
||||
|
||||
#[expect(dead_code)]
|
||||
pub fn get_recipient_id(&self) -> NodeId {
|
||||
self.recipient_id
|
||||
}
|
||||
|
|
|
@ -7,24 +7,24 @@ mod types;
|
|||
|
||||
pub mod crypto_system;
|
||||
#[cfg(feature = "enable-crypto-none")]
|
||||
pub mod none;
|
||||
pub(crate) mod none;
|
||||
#[doc(hidden)]
|
||||
pub mod tests;
|
||||
#[cfg(feature = "enable-crypto-vld0")]
|
||||
pub mod vld0;
|
||||
pub(crate) mod vld0;
|
||||
|
||||
pub use blake3digest512::*;
|
||||
|
||||
pub use crypto_system::*;
|
||||
pub use envelope::*;
|
||||
pub(crate) use envelope::*;
|
||||
pub use guard::*;
|
||||
pub use receipt::*;
|
||||
pub(crate) use receipt::*;
|
||||
pub use types::*;
|
||||
|
||||
#[cfg(feature = "enable-crypto-none")]
|
||||
pub use none::*;
|
||||
pub(crate) use none::*;
|
||||
#[cfg(feature = "enable-crypto-vld0")]
|
||||
pub use vld0::*;
|
||||
pub(crate) use vld0::*;
|
||||
|
||||
use super::*;
|
||||
use core::convert::TryInto;
|
||||
|
|
|
@ -195,11 +195,12 @@ impl Receipt {
|
|||
Ok(data)
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
#[expect(dead_code)]
|
||||
pub fn get_version(&self) -> u8 {
|
||||
self.version
|
||||
}
|
||||
|
||||
#[expect(dead_code)]
|
||||
pub fn get_crypto_kind(&self) -> CryptoKind {
|
||||
self.crypto_kind
|
||||
}
|
||||
|
@ -208,10 +209,12 @@ impl Receipt {
|
|||
self.nonce
|
||||
}
|
||||
|
||||
#[expect(dead_code)]
|
||||
pub fn get_sender_id(&self) -> NodeId {
|
||||
self.sender_id
|
||||
}
|
||||
|
||||
#[expect(dead_code)]
|
||||
pub fn get_sender_typed_id(&self) -> TypedNodeId {
|
||||
TypedNodeId::new(self.crypto_kind, self.sender_id)
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ fn secret_to_x25519_sk(secret: &SecretKey) -> VeilidAPIResult<xd::StaticSecret>
|
|||
Ok(xd::StaticSecret::from(output))
|
||||
}
|
||||
|
||||
pub fn vld0_generate_keypair() -> KeyPair {
|
||||
pub(crate) fn vld0_generate_keypair() -> KeyPair {
|
||||
let mut csprng = VeilidRng {};
|
||||
let signing_key = ed::SigningKey::generate(&mut csprng);
|
||||
let verifying_key = signing_key.verifying_key();
|
||||
|
@ -47,7 +47,7 @@ pub fn vld0_generate_keypair() -> KeyPair {
|
|||
}
|
||||
|
||||
/// V0 CryptoSystem
|
||||
pub struct CryptoSystemVLD0 {
|
||||
pub(crate) struct CryptoSystemVLD0 {
|
||||
registry: VeilidComponentRegistry,
|
||||
}
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ pub(crate) use self::component::*;
|
|||
pub(crate) use self::core_context::RegisteredComponents;
|
||||
pub(crate) use self::stats_accounting::*;
|
||||
|
||||
pub use self::component::VeilidComponentGuard;
|
||||
pub(crate) use self::component::VeilidComponentGuard;
|
||||
pub use self::core_context::{api_startup, api_startup_config, api_startup_json, UpdateCallback};
|
||||
pub use self::logging::{
|
||||
ApiTracingLayer, FmtStripFields, VeilidLayerFilter, VeilidLayerLogKeyFilter,
|
||||
|
@ -72,7 +72,7 @@ pub use self::veilid_config::*;
|
|||
pub use veilid_tools as tools;
|
||||
|
||||
/// The on-the-wire serialization format for Veilid RPC.
|
||||
pub mod veilid_capnp {
|
||||
pub(crate) mod veilid_capnp {
|
||||
#![allow(
|
||||
clippy::all,
|
||||
clippy::must_use_candidate,
|
||||
|
|
|
@ -14,9 +14,7 @@ pub enum Target {
|
|||
PrivateRoute(RouteId),
|
||||
}
|
||||
|
||||
pub struct RoutingContextInner {}
|
||||
|
||||
pub struct RoutingContextUnlockedInner {
|
||||
pub(crate) struct RoutingContextUnlockedInner {
|
||||
/// Safety routing requirements.
|
||||
safety_selection: SafetySelection,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue