mirror of
https://gitlab.com/veilid/veilid.git
synced 2026-10-12 17:32:09 -05:00
strip out get-size2, fix mocks
This commit is contained in:
1 parent
f8702925c6
commit
68caef2eeb
44 files changed
+357
-757
No files matched your search
@@ -25,6 +25,7 @@
|
||||
`VeilidAPI` that performs no network access, and uses in-memory maps for all API functionality. Integration tests should use this
|
||||
so network access does not have to be performed in CI tests for repeatability. It also completely eliminated network latency and
|
||||
returns results immediately, so your tests will complete faster too.
|
||||
- Strip out 'get-size2' crate and simplify StorageManager calculation of data sizes
|
||||
|
||||
- veilid-flutter:
|
||||
- Full conversion to Native Assets and rust build hooks. Apps must drop any extra build steps for building veilid-flutter and linking its output; Flutter handles it.
|
||||
|
||||
Generated
-130
@@ -533,36 +533,6 @@ version = "1.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0"
|
||||
|
||||
[[package]]
|
||||
name = "attribute-derive"
|
||||
version = "0.10.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "05832cdddc8f2650cc2cc187cc2e952b8c133a48eb055f35211f61ee81502d77"
|
||||
dependencies = [
|
||||
"attribute-derive-macro",
|
||||
"derive-where",
|
||||
"manyhow",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.119",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "attribute-derive-macro"
|
||||
version = "0.10.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0a7cdbbd4bd005c5d3e2e9c885e6fa575db4f4a3572335b974d8db853b6beb61"
|
||||
dependencies = [
|
||||
"collection_literals",
|
||||
"interpolator",
|
||||
"manyhow",
|
||||
"proc-macro-utils",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"quote-use",
|
||||
"syn 2.0.119",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "autocfg"
|
||||
version = "1.5.1"
|
||||
@@ -1032,12 +1002,6 @@ dependencies = [
|
||||
"thiserror 2.0.20",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "collection_literals"
|
||||
version = "1.0.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2550f75b8cfac212855f6b1885455df8eaee8fe8e246b647d69146142e016084"
|
||||
|
||||
[[package]]
|
||||
name = "color-eyre"
|
||||
version = "0.6.5"
|
||||
@@ -1632,17 +1596,6 @@ version = "0.5.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c"
|
||||
|
||||
[[package]]
|
||||
name = "derive-where"
|
||||
version = "1.6.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d08b3a0bcc0d079199cd476b2cae8435016ec11d1c0986c6901c5ac223041534"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.119",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "derive_more"
|
||||
version = "2.1.1"
|
||||
@@ -2247,26 +2200,6 @@ dependencies = [
|
||||
"version_check",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "get-size-derive2"
|
||||
version = "0.10.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c736d226c32e496b8377813b52269e11ad3a48d8373b68862d0364f04fd1229d"
|
||||
dependencies = [
|
||||
"attribute-derive",
|
||||
"quote",
|
||||
"syn 2.0.119",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "get-size2"
|
||||
version = "0.10.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b411f34418305908ab15a82ff78958c2a9aee9a272b2a2e663836b20a4e4b9d3"
|
||||
dependencies = [
|
||||
"get-size-derive2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "gethostname"
|
||||
version = "1.1.0"
|
||||
@@ -2967,12 +2900,6 @@ dependencies = [
|
||||
"hybrid-array",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "interpolator"
|
||||
version = "0.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "71dd52191aae121e8611f1e8dc3e324dd0dd1dee1e6dd91d10ee07a3cfb4d9d8"
|
||||
|
||||
[[package]]
|
||||
name = "ipconfig"
|
||||
version = "0.3.4"
|
||||
@@ -3385,29 +3312,6 @@ version = "0.2.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fc04a4c58212d57930a24bf47d3fa87485264a3a054e9c10e042eb373573ad3c"
|
||||
|
||||
[[package]]
|
||||
name = "manyhow"
|
||||
version = "0.11.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b33efb3ca6d3b07393750d4030418d594ab1139cee518f0dc88db70fec873587"
|
||||
dependencies = [
|
||||
"manyhow-macros",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.119",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "manyhow-macros"
|
||||
version = "0.11.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "46fce34d199b78b6e6073abf984c9cf5fd3e9330145a93ee0738a7443e371495"
|
||||
dependencies = [
|
||||
"proc-macro-utils",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "matchers"
|
||||
version = "0.2.0"
|
||||
@@ -4242,17 +4146,6 @@ dependencies = [
|
||||
"syn 3.0.3",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro-utils"
|
||||
version = "0.10.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "eeaf08a13de400bc215877b5bdc088f241b12eb42f0a548d3390dc1c56bb7071"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"smallvec",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro2"
|
||||
version = "1.0.107"
|
||||
@@ -4383,28 +4276,6 @@ dependencies = [
|
||||
"proc-macro2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "quote-use"
|
||||
version = "0.8.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9619db1197b497a36178cfc736dc96b271fe918875fbf1344c436a7e93d0321e"
|
||||
dependencies = [
|
||||
"quote",
|
||||
"quote-use-macros",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "quote-use-macros"
|
||||
version = "0.8.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "82ebfb7faafadc06a7ab141a6f67bcfb24cb8beb158c6fe933f2f035afa99f35"
|
||||
dependencies = [
|
||||
"proc-macro-utils",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.119",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "r-efi"
|
||||
version = "5.3.0"
|
||||
@@ -6179,7 +6050,6 @@ dependencies = [
|
||||
"flume",
|
||||
"futures-rustls",
|
||||
"futures-util",
|
||||
"get-size2",
|
||||
"getrandom 0.4.3",
|
||||
"glob",
|
||||
"gloo-events",
|
||||
|
||||
+74
-21
@@ -1,8 +1,32 @@
|
||||
#!/bin/bash
|
||||
set -eou pipefail
|
||||
# Local pre-push gate: format check, lints, builds, docs and tests, in that order.
|
||||
# Every command's status is checked explicitly and the first failure exits with that
|
||||
# command's own exit code, so this is safe to wire up as a git pre-push hook.
|
||||
|
||||
SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||
pushd $SCRIPTDIR/.. >/dev/null
|
||||
if [ -z "$SCRIPTDIR" ]; then
|
||||
echo "check_all: could not resolve script directory" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
fail() {
|
||||
echo "check_all: $*" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Run a command, announce it, and propagate its exit code on failure
|
||||
step() {
|
||||
local rc
|
||||
echo "==> $*"
|
||||
"$@"
|
||||
rc=$?
|
||||
if [ $rc -ne 0 ]; then
|
||||
echo "check_all: FAILED (exit $rc): $*" >&2
|
||||
exit $rc
|
||||
fi
|
||||
}
|
||||
|
||||
cd "$SCRIPTDIR/.." || fail "could not change to the repository root"
|
||||
|
||||
if [ $# -ge 1 ] && [ "$1" = "--cleanup" ] ; then
|
||||
CLEANUP="--cleanup"
|
||||
@@ -14,9 +38,8 @@ fi
|
||||
# Pin every sub-script's bare cargo/cargo-zigbuild to the CI toolchain so lints match CI.
|
||||
# Explicit `+nightly` invocations (docs, nightly unit tests) still override this.
|
||||
RUST_VERSION="$(. "$SCRIPTDIR/../.dagger/versions.env" && echo "$RUST_VERSION")"
|
||||
if [ -z "$RUST_VERSION" ]; then
|
||||
echo "Could not read RUST_VERSION from .dagger/versions.env"
|
||||
exit 1
|
||||
if [ $? -ne 0 ] || [ -z "$RUST_VERSION" ]; then
|
||||
fail "could not read RUST_VERSION from .dagger/versions.env"
|
||||
fi
|
||||
if ! rustup toolchain list | grep -q "^${RUST_VERSION}-"; then
|
||||
echo "CI-pinned Rust toolchain $RUST_VERSION is not installed. Install it with:"
|
||||
@@ -26,18 +49,34 @@ fi
|
||||
export RUSTUP_TOOLCHAIN="$RUST_VERSION"
|
||||
echo "Using CI-pinned Rust toolchain $RUST_VERSION."
|
||||
|
||||
# The lint and format steps need these components; a --profile minimal install has neither
|
||||
INSTALLED_COMPONENTS="$(rustup component list --toolchain "$RUST_VERSION" --installed)"
|
||||
if [ $? -ne 0 ]; then
|
||||
fail "could not list the installed Rust components for $RUST_VERSION"
|
||||
fi
|
||||
for cmp in clippy rustfmt; do
|
||||
if ! echo "$INSTALLED_COMPONENTS" | grep -q "^${cmp}"; then
|
||||
echo "Installing missing Rust component $cmp for $RUST_VERSION..."
|
||||
step rustup component add --toolchain "$RUST_VERSION" "$cmp"
|
||||
fi
|
||||
done
|
||||
|
||||
# The sub-scripts cross-compile (cargo-zigbuild) and check for these targets; install any the
|
||||
# pinned toolchain is missing, else the build fails with "can't find crate for core".
|
||||
INSTALLED_TARGETS="$(rustup target list --installed)"
|
||||
if [ $? -ne 0 ]; then
|
||||
fail "could not list the installed Rust targets for $RUST_VERSION"
|
||||
fi
|
||||
for tgt in aarch64-apple-darwin x86_64-unknown-linux-gnu x86_64-pc-windows-gnu wasm32-unknown-unknown; do
|
||||
if ! rustup target list --installed | grep -qx "$tgt"; then
|
||||
if ! echo "$INSTALLED_TARGETS" | grep -qx "$tgt"; then
|
||||
echo "Installing missing Rust target $tgt for $RUST_VERSION..."
|
||||
rustup target add "$tgt"
|
||||
step rustup target add "$tgt"
|
||||
fi
|
||||
done
|
||||
|
||||
# docs.rs and the public-api check use the latest rolling nightly; require it up to date so
|
||||
# nightly-only lint/rustdoc drift is caught here rather than in CI.
|
||||
NIGHTLY_CHECK="$(rustup check 2>/dev/null | grep '^nightly-' || true)"
|
||||
NIGHTLY_CHECK="$(rustup check 2>/dev/null | grep '^nightly-')"
|
||||
if [ -z "$NIGHTLY_CHECK" ]; then
|
||||
echo "Rust nightly is not installed (needed for docs and the public-api check). Install it with:"
|
||||
echo " rustup toolchain install nightly --profile minimal"
|
||||
@@ -49,6 +88,12 @@ if echo "$NIGHTLY_CHECK" | grep -qi "update available"; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Same check CI runs; fail before anything expensive so a reformat is a one-line fix
|
||||
echo "Performing format check..."
|
||||
if ! cargo fmt --all --check; then
|
||||
fail "cargo fmt --all --check found unformatted code. Run 'cargo fmt --all' and commit the result."
|
||||
fi
|
||||
|
||||
# Dagger's ignore patterns are generated from the repo's .gitignore files. Regenerating belongs
|
||||
# with a push, not with CI, which has nothing to commit the result to.
|
||||
if ! command -v uv > /dev/null 2>&1; then
|
||||
@@ -57,10 +102,17 @@ if ! command -v uv > /dev/null 2>&1; then
|
||||
exit 1
|
||||
fi
|
||||
IGNORE_PATTERNS=.dagger/src/veilid/ignore_patterns.py
|
||||
IGNORE_PATTERNS_BEFORE="$(cat $IGNORE_PATTERNS)"
|
||||
IGNORE_PATTERNS_BEFORE="$(cat "$IGNORE_PATTERNS")"
|
||||
if [ $? -ne 0 ]; then
|
||||
fail "could not read $IGNORE_PATTERNS"
|
||||
fi
|
||||
echo "Updating dagger ignore patterns..."
|
||||
./.dagger/update_gitignore_patterns.sh
|
||||
if [ "$IGNORE_PATTERNS_BEFORE" != "$(cat $IGNORE_PATTERNS)" ]; then
|
||||
step ./.dagger/update_gitignore_patterns.sh
|
||||
IGNORE_PATTERNS_AFTER="$(cat "$IGNORE_PATTERNS")"
|
||||
if [ $? -ne 0 ]; then
|
||||
fail "could not read $IGNORE_PATTERNS after regenerating it"
|
||||
fi
|
||||
if [ "$IGNORE_PATTERNS_BEFORE" != "$IGNORE_PATTERNS_AFTER" ]; then
|
||||
echo "NOTE: $IGNORE_PATTERNS was regenerated and needs committing."
|
||||
fi
|
||||
|
||||
@@ -68,14 +120,15 @@ echo "Running all tests..."
|
||||
|
||||
# cargo-public-api (nightly rustdoc) and cargo-msrv (per-crate rust-version) select their own
|
||||
# toolchains; don't force the pin on them.
|
||||
env -u RUSTUP_TOOLCHAIN ./scripts/_check_public_api.sh
|
||||
env -u RUSTUP_TOOLCHAIN ./scripts/_msrv_all.sh
|
||||
./scripts/_lint_all.sh $CLEANUP
|
||||
./scripts/_smoketest_all.sh $CLEANUP --locked
|
||||
./scripts/_check_wasm_builds.sh dart # skip cleanup here because WASM is done first in the clippy script and will clean up there
|
||||
./scripts/_check_wasm_builds.sh js # skip cleanup here because WASM is done first in the clippy script and will clean up there
|
||||
./scripts/_build_docs.sh $CLEANUP
|
||||
./scripts/_unit_tests_all.sh
|
||||
DEFAULT_CARGO_TARGET=wasm32-unknown-unknown ./scripts/_unit_tests_all.sh
|
||||
step env -u RUSTUP_TOOLCHAIN ./scripts/_check_public_api.sh
|
||||
step env -u RUSTUP_TOOLCHAIN ./scripts/_msrv_all.sh
|
||||
step ./scripts/_lint_all.sh $CLEANUP
|
||||
step ./scripts/_smoketest_all.sh $CLEANUP --locked
|
||||
# skip cleanup for WASM here because the clippy script does WASM first and cleans up there
|
||||
step ./scripts/_check_wasm_builds.sh dart
|
||||
step ./scripts/_check_wasm_builds.sh js
|
||||
step ./scripts/_build_docs.sh $CLEANUP
|
||||
step ./scripts/_unit_tests_all.sh
|
||||
step env DEFAULT_CARGO_TARGET=wasm32-unknown-unknown ./scripts/_unit_tests_all.sh
|
||||
|
||||
popd >/dev/null
|
||||
echo "check_all: all checks passed."
|
||||
@@ -128,7 +128,6 @@ num-traits = "0.2.19"
|
||||
cfg-if = "1.0.4"
|
||||
lazy_static = "1.5.0"
|
||||
directories = "6.0.0"
|
||||
get-size2 = { version = "0.10.1", features = ["derive"] }
|
||||
async-trait = "0.1.89"
|
||||
macro_rules_attribute = "0.2.2"
|
||||
clap = { version = "4.5.39", features = ["derive"], optional = true }
|
||||
|
||||
+1
-181
@@ -98,9 +98,6 @@ pub veilid_core::ExpirationState::Dead
|
||||
pub veilid_core::ExpirationState::Live
|
||||
impl core::fmt::Display for veilid_core::ExpirationState
|
||||
pub fn veilid_core::ExpirationState::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result
|
||||
impl get_size2::GetSize for veilid_core::ExpirationState
|
||||
pub fn veilid_core::ExpirationState::get_heap_size(&self) -> usize
|
||||
pub fn veilid_core::ExpirationState::get_heap_size_with_tracker<TRACKER: get_size2::tracker::GetSizeTracker>(&self, TRACKER) -> (usize, TRACKER)
|
||||
pub enum veilid_core::LogOutputKind
|
||||
pub veilid_core::LogOutputKind::Api
|
||||
pub veilid_core::LogOutputKind::File
|
||||
@@ -115,9 +112,6 @@ pub fn veilid_core::SafetySelection::get_hop_count(&self) -> usize
|
||||
pub fn veilid_core::SafetySelection::get_sequencing(&self) -> veilid_core::Sequencing
|
||||
impl core::fmt::Display for veilid_core::SafetySelection
|
||||
pub fn veilid_core::SafetySelection::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result
|
||||
impl get_size2::GetSize for veilid_core::SafetySelection
|
||||
pub fn veilid_core::SafetySelection::get_heap_size(&self) -> usize
|
||||
pub fn veilid_core::SafetySelection::get_heap_size_with_tracker<TRACKER: get_size2::tracker::GetSizeTracker>(&self, TRACKER) -> (usize, TRACKER)
|
||||
pub enum veilid_core::SequenceOrdering
|
||||
pub veilid_core::SequenceOrdering::Ordered = 1
|
||||
pub veilid_core::SequenceOrdering::Unordered = 0
|
||||
@@ -141,9 +135,6 @@ pub fn veilid_core::Sequencing::fmt(&self, &mut core::fmt::Formatter<'_>) -> cor
|
||||
impl core::str::traits::FromStr for veilid_core::Sequencing
|
||||
pub type veilid_core::Sequencing::Err = veilid_core::VeilidAPIError
|
||||
pub fn veilid_core::Sequencing::from_str(&str) -> core::result::Result<Self, Self::Err>
|
||||
impl get_size2::GetSize for veilid_core::Sequencing
|
||||
pub fn veilid_core::Sequencing::get_heap_size(&self) -> usize
|
||||
pub fn veilid_core::Sequencing::get_heap_size_with_tracker<TRACKER: get_size2::tracker::GetSizeTracker>(&self, TRACKER) -> (usize, TRACKER)
|
||||
pub enum veilid_core::Stability
|
||||
pub veilid_core::Stability::LowLatency = 0
|
||||
pub veilid_core::Stability::Reliable = 1
|
||||
@@ -152,9 +143,6 @@ pub fn veilid_core::Stability::fmt(&self, &mut core::fmt::Formatter<'_>) -> core
|
||||
impl core::str::traits::FromStr for veilid_core::Stability
|
||||
pub type veilid_core::Stability::Err = veilid_core::VeilidAPIError
|
||||
pub fn veilid_core::Stability::from_str(&str) -> core::result::Result<Self, Self::Err>
|
||||
impl get_size2::GetSize for veilid_core::Stability
|
||||
pub fn veilid_core::Stability::get_heap_size(&self) -> usize
|
||||
pub fn veilid_core::Stability::get_heap_size_with_tracker<TRACKER: get_size2::tracker::GetSizeTracker>(&self, TRACKER) -> (usize, TRACKER)
|
||||
pub enum veilid_core::StatsOutput
|
||||
pub veilid_core::StatsOutput::Facility
|
||||
pub veilid_core::StatsOutput::File(std::path::PathBuf)
|
||||
@@ -324,9 +312,6 @@ pub fn veilid_core::AlignedU64::fmt(&self, &mut core::fmt::Formatter<'_>) -> cor
|
||||
impl core::str::traits::FromStr for veilid_core::AlignedU64
|
||||
pub type veilid_core::AlignedU64::Err = <u64 as core::str::traits::FromStr>::Err
|
||||
pub fn veilid_core::AlignedU64::from_str(&str) -> core::result::Result<Self, Self::Err>
|
||||
impl get_size2::GetSize for veilid_core::AlignedU64
|
||||
pub fn veilid_core::AlignedU64::get_heap_size(&self) -> usize
|
||||
pub fn veilid_core::AlignedU64::get_heap_size_with_tracker<TRACKER: get_size2::tracker::GetSizeTracker>(&self, TRACKER) -> (usize, TRACKER)
|
||||
impl<Rhs: core::convert::Into<u64>> core::ops::arith::Add<Rhs> for veilid_core::AlignedU64
|
||||
pub type veilid_core::AlignedU64::Output = veilid_core::AlignedU64
|
||||
pub fn veilid_core::AlignedU64::add(self, Rhs) -> Self
|
||||
@@ -435,9 +420,6 @@ impl core::convert::From<veilid_core::Timestamp> for veilid_core::AtomicOptionTi
|
||||
pub fn veilid_core::AtomicOptionTimestamp::from(veilid_core::Timestamp) -> Self
|
||||
impl core::fmt::Display for veilid_core::AtomicOptionTimestamp
|
||||
pub fn veilid_core::AtomicOptionTimestamp::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result
|
||||
impl get_size2::GetSize for veilid_core::AtomicOptionTimestamp
|
||||
pub fn veilid_core::AtomicOptionTimestamp::get_heap_size(&self) -> usize
|
||||
pub fn veilid_core::AtomicOptionTimestamp::get_heap_size_with_tracker<TRACKER: get_size2::tracker::GetSizeTracker>(&self, TRACKER) -> (usize, TRACKER)
|
||||
pub struct veilid_core::AtomicTimestamp(_)
|
||||
impl veilid_core::AtomicTimestamp
|
||||
pub fn veilid_core::AtomicTimestamp::expiration_state(&self, veilid_core::Timestamp, veilid_core::TimestampDuration) -> veilid_core::ExpirationState
|
||||
@@ -460,9 +442,6 @@ impl core::convert::From<veilid_core::Timestamp> for veilid_core::AtomicTimestam
|
||||
pub fn veilid_core::AtomicTimestamp::from(veilid_core::Timestamp) -> Self
|
||||
impl core::fmt::Display for veilid_core::AtomicTimestamp
|
||||
pub fn veilid_core::AtomicTimestamp::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result
|
||||
impl get_size2::GetSize for veilid_core::AtomicTimestamp
|
||||
pub fn veilid_core::AtomicTimestamp::get_heap_size(&self) -> usize
|
||||
pub fn veilid_core::AtomicTimestamp::get_heap_size_with_tracker<TRACKER: get_size2::tracker::GetSizeTracker>(&self, TRACKER) -> (usize, TRACKER)
|
||||
pub struct veilid_core::BareDecapsulationKey
|
||||
impl veilid_core::BareDecapsulationKey
|
||||
pub fn veilid_core::BareDecapsulationKey::bit(&self, usize) -> bool
|
||||
@@ -507,9 +486,6 @@ pub fn veilid_core::BareDecapsulationKey::deref(&self) -> &Self::Target
|
||||
impl core::str::traits::FromStr for veilid_core::BareDecapsulationKey
|
||||
pub type veilid_core::BareDecapsulationKey::Err = veilid_core::VeilidAPIError
|
||||
pub fn veilid_core::BareDecapsulationKey::from_str(&str) -> core::result::Result<Self, Self::Err>
|
||||
impl get_size2::GetSize for veilid_core::BareDecapsulationKey
|
||||
pub fn veilid_core::BareDecapsulationKey::get_heap_size(&self) -> usize
|
||||
pub fn veilid_core::BareDecapsulationKey::get_heap_size_with_tracker<TRACKER: get_size2::tracker::GetSizeTracker>(&self, TRACKER) -> (usize, TRACKER)
|
||||
impl serde_core::ser::Serialize for veilid_core::BareDecapsulationKey
|
||||
pub fn veilid_core::BareDecapsulationKey::serialize<S>(&self, S) -> core::result::Result<<S as serde_core::ser::Serializer>::Ok, <S as serde_core::ser::Serializer>::Error> where S: serde_core::ser::Serializer
|
||||
impl<'de> serde_core::de::Deserialize<'de> for veilid_core::BareDecapsulationKey
|
||||
@@ -558,9 +534,6 @@ pub fn veilid_core::BareEncapsulationKey::deref(&self) -> &Self::Target
|
||||
impl core::str::traits::FromStr for veilid_core::BareEncapsulationKey
|
||||
pub type veilid_core::BareEncapsulationKey::Err = veilid_core::VeilidAPIError
|
||||
pub fn veilid_core::BareEncapsulationKey::from_str(&str) -> core::result::Result<Self, Self::Err>
|
||||
impl get_size2::GetSize for veilid_core::BareEncapsulationKey
|
||||
pub fn veilid_core::BareEncapsulationKey::get_heap_size(&self) -> usize
|
||||
pub fn veilid_core::BareEncapsulationKey::get_heap_size_with_tracker<TRACKER: get_size2::tracker::GetSizeTracker>(&self, TRACKER) -> (usize, TRACKER)
|
||||
impl serde_core::ser::Serialize for veilid_core::BareEncapsulationKey
|
||||
pub fn veilid_core::BareEncapsulationKey::serialize<S>(&self, S) -> core::result::Result<<S as serde_core::ser::Serializer>::Ok, <S as serde_core::ser::Serializer>::Error> where S: serde_core::ser::Serializer
|
||||
impl<'de> serde_core::de::Deserialize<'de> for veilid_core::BareEncapsulationKey
|
||||
@@ -609,9 +582,6 @@ pub fn veilid_core::BareHashDigest::deref(&self) -> &Self::Target
|
||||
impl core::str::traits::FromStr for veilid_core::BareHashDigest
|
||||
pub type veilid_core::BareHashDigest::Err = veilid_core::VeilidAPIError
|
||||
pub fn veilid_core::BareHashDigest::from_str(&str) -> core::result::Result<Self, Self::Err>
|
||||
impl get_size2::GetSize for veilid_core::BareHashDigest
|
||||
pub fn veilid_core::BareHashDigest::get_heap_size(&self) -> usize
|
||||
pub fn veilid_core::BareHashDigest::get_heap_size_with_tracker<TRACKER: get_size2::tracker::GetSizeTracker>(&self, TRACKER) -> (usize, TRACKER)
|
||||
impl serde_core::ser::Serialize for veilid_core::BareHashDigest
|
||||
pub fn veilid_core::BareHashDigest::serialize<S>(&self, S) -> core::result::Result<<S as serde_core::ser::Serializer>::Ok, <S as serde_core::ser::Serializer>::Error> where S: serde_core::ser::Serializer
|
||||
impl veilid_core::ToVeilidAPIErrorArgument for veilid_core::BareHashDigest
|
||||
@@ -648,9 +618,6 @@ pub fn veilid_core::BareKemKeyPair::fmt(&self, &mut core::fmt::Formatter<'_>) ->
|
||||
impl core::str::traits::FromStr for veilid_core::BareKemKeyPair
|
||||
pub type veilid_core::BareKemKeyPair::Err = veilid_core::VeilidAPIError
|
||||
pub fn veilid_core::BareKemKeyPair::from_str(&str) -> core::result::Result<Self, Self::Err>
|
||||
impl get_size2::GetSize for veilid_core::BareKemKeyPair
|
||||
pub fn veilid_core::BareKemKeyPair::get_heap_size(&self) -> usize
|
||||
pub fn veilid_core::BareKemKeyPair::get_heap_size_with_tracker<TRACKER: get_size2::tracker::GetSizeTracker>(&self, TRACKER) -> (usize, TRACKER)
|
||||
impl serde_core::ser::Serialize for veilid_core::BareKemKeyPair
|
||||
pub fn veilid_core::BareKemKeyPair::serialize<S>(&self, S) -> core::result::Result<<S as serde_core::ser::Serializer>::Ok, <S as serde_core::ser::Serializer>::Error> where S: serde_core::ser::Serializer
|
||||
impl<'de> serde_core::de::Deserialize<'de> for veilid_core::BareKemKeyPair
|
||||
@@ -685,9 +652,6 @@ pub fn veilid_core::BareKeyPair::fmt(&self, &mut core::fmt::Formatter<'_>) -> co
|
||||
impl core::str::traits::FromStr for veilid_core::BareKeyPair
|
||||
pub type veilid_core::BareKeyPair::Err = veilid_core::VeilidAPIError
|
||||
pub fn veilid_core::BareKeyPair::from_str(&str) -> core::result::Result<Self, Self::Err>
|
||||
impl get_size2::GetSize for veilid_core::BareKeyPair
|
||||
pub fn veilid_core::BareKeyPair::get_heap_size(&self) -> usize
|
||||
pub fn veilid_core::BareKeyPair::get_heap_size_with_tracker<TRACKER: get_size2::tracker::GetSizeTracker>(&self, TRACKER) -> (usize, TRACKER)
|
||||
impl serde_core::ser::Serialize for veilid_core::BareKeyPair
|
||||
pub fn veilid_core::BareKeyPair::serialize<S>(&self, S) -> core::result::Result<<S as serde_core::ser::Serializer>::Ok, <S as serde_core::ser::Serializer>::Error> where S: serde_core::ser::Serializer
|
||||
impl veilid_core::ToVeilidAPIErrorArgument for veilid_core::BareKeyPair
|
||||
@@ -738,9 +702,6 @@ pub fn veilid_core::BareMemberId::deref(&self) -> &Self::Target
|
||||
impl core::str::traits::FromStr for veilid_core::BareMemberId
|
||||
pub type veilid_core::BareMemberId::Err = veilid_core::VeilidAPIError
|
||||
pub fn veilid_core::BareMemberId::from_str(&str) -> core::result::Result<Self, Self::Err>
|
||||
impl get_size2::GetSize for veilid_core::BareMemberId
|
||||
pub fn veilid_core::BareMemberId::get_heap_size(&self) -> usize
|
||||
pub fn veilid_core::BareMemberId::get_heap_size_with_tracker<TRACKER: get_size2::tracker::GetSizeTracker>(&self, TRACKER) -> (usize, TRACKER)
|
||||
impl serde_core::ser::Serialize for veilid_core::BareMemberId
|
||||
pub fn veilid_core::BareMemberId::serialize<S>(&self, S) -> core::result::Result<<S as serde_core::ser::Serializer>::Ok, <S as serde_core::ser::Serializer>::Error> where S: serde_core::ser::Serializer
|
||||
impl veilid_core::ToVeilidAPIErrorArgument for veilid_core::BareMemberId
|
||||
@@ -791,9 +752,6 @@ pub fn veilid_core::BareNodeId::deref(&self) -> &Self::Target
|
||||
impl core::str::traits::FromStr for veilid_core::BareNodeId
|
||||
pub type veilid_core::BareNodeId::Err = veilid_core::VeilidAPIError
|
||||
pub fn veilid_core::BareNodeId::from_str(&str) -> core::result::Result<Self, Self::Err>
|
||||
impl get_size2::GetSize for veilid_core::BareNodeId
|
||||
pub fn veilid_core::BareNodeId::get_heap_size(&self) -> usize
|
||||
pub fn veilid_core::BareNodeId::get_heap_size_with_tracker<TRACKER: get_size2::tracker::GetSizeTracker>(&self, TRACKER) -> (usize, TRACKER)
|
||||
impl serde_core::ser::Serialize for veilid_core::BareNodeId
|
||||
pub fn veilid_core::BareNodeId::serialize<S>(&self, S) -> core::result::Result<<S as serde_core::ser::Serializer>::Ok, <S as serde_core::ser::Serializer>::Error> where S: serde_core::ser::Serializer
|
||||
impl<'de> serde_core::de::Deserialize<'de> for veilid_core::BareNodeId
|
||||
@@ -842,9 +800,6 @@ pub fn veilid_core::BareOpaqueRecordKey::deref(&self) -> &Self::Target
|
||||
impl core::str::traits::FromStr for veilid_core::BareOpaqueRecordKey
|
||||
pub type veilid_core::BareOpaqueRecordKey::Err = veilid_core::VeilidAPIError
|
||||
pub fn veilid_core::BareOpaqueRecordKey::from_str(&str) -> core::result::Result<Self, Self::Err>
|
||||
impl get_size2::GetSize for veilid_core::BareOpaqueRecordKey
|
||||
pub fn veilid_core::BareOpaqueRecordKey::get_heap_size(&self) -> usize
|
||||
pub fn veilid_core::BareOpaqueRecordKey::get_heap_size_with_tracker<TRACKER: get_size2::tracker::GetSizeTracker>(&self, TRACKER) -> (usize, TRACKER)
|
||||
impl serde_core::ser::Serialize for veilid_core::BareOpaqueRecordKey
|
||||
pub fn veilid_core::BareOpaqueRecordKey::serialize<S>(&self, S) -> core::result::Result<<S as serde_core::ser::Serializer>::Ok, <S as serde_core::ser::Serializer>::Error> where S: serde_core::ser::Serializer
|
||||
impl veilid_core::ToVeilidAPIErrorArgument for veilid_core::BareOpaqueRecordKey
|
||||
@@ -895,9 +850,6 @@ pub fn veilid_core::BarePublicKey::deref(&self) -> &Self::Target
|
||||
impl core::str::traits::FromStr for veilid_core::BarePublicKey
|
||||
pub type veilid_core::BarePublicKey::Err = veilid_core::VeilidAPIError
|
||||
pub fn veilid_core::BarePublicKey::from_str(&str) -> core::result::Result<Self, Self::Err>
|
||||
impl get_size2::GetSize for veilid_core::BarePublicKey
|
||||
pub fn veilid_core::BarePublicKey::get_heap_size(&self) -> usize
|
||||
pub fn veilid_core::BarePublicKey::get_heap_size_with_tracker<TRACKER: get_size2::tracker::GetSizeTracker>(&self, TRACKER) -> (usize, TRACKER)
|
||||
impl serde_core::ser::Serialize for veilid_core::BarePublicKey
|
||||
pub fn veilid_core::BarePublicKey::serialize<S>(&self, S) -> core::result::Result<<S as serde_core::ser::Serializer>::Ok, <S as serde_core::ser::Serializer>::Error> where S: serde_core::ser::Serializer
|
||||
impl veilid_core::ToVeilidAPIErrorArgument for veilid_core::BarePublicKey
|
||||
@@ -933,9 +885,6 @@ pub fn veilid_core::BareRecordKey::fmt(&self, &mut core::fmt::Formatter<'_>) ->
|
||||
impl core::str::traits::FromStr for veilid_core::BareRecordKey
|
||||
pub type veilid_core::BareRecordKey::Err = veilid_core::VeilidAPIError
|
||||
pub fn veilid_core::BareRecordKey::from_str(&str) -> core::result::Result<Self, Self::Err>
|
||||
impl get_size2::GetSize for veilid_core::BareRecordKey
|
||||
pub fn veilid_core::BareRecordKey::get_heap_size(&self) -> usize
|
||||
pub fn veilid_core::BareRecordKey::get_heap_size_with_tracker<TRACKER: get_size2::tracker::GetSizeTracker>(&self, TRACKER) -> (usize, TRACKER)
|
||||
impl serde_core::ser::Serialize for veilid_core::BareRecordKey
|
||||
pub fn veilid_core::BareRecordKey::serialize<S>(&self, S) -> core::result::Result<<S as serde_core::ser::Serializer>::Ok, <S as serde_core::ser::Serializer>::Error> where S: serde_core::ser::Serializer
|
||||
impl veilid_core::ToVeilidAPIErrorArgument for veilid_core::BareRecordKey
|
||||
@@ -986,9 +935,6 @@ pub fn veilid_core::BareRouteId::deref(&self) -> &Self::Target
|
||||
impl core::str::traits::FromStr for veilid_core::BareRouteId
|
||||
pub type veilid_core::BareRouteId::Err = veilid_core::VeilidAPIError
|
||||
pub fn veilid_core::BareRouteId::from_str(&str) -> core::result::Result<Self, Self::Err>
|
||||
impl get_size2::GetSize for veilid_core::BareRouteId
|
||||
pub fn veilid_core::BareRouteId::get_heap_size(&self) -> usize
|
||||
pub fn veilid_core::BareRouteId::get_heap_size_with_tracker<TRACKER: get_size2::tracker::GetSizeTracker>(&self, TRACKER) -> (usize, TRACKER)
|
||||
impl serde_core::ser::Serialize for veilid_core::BareRouteId
|
||||
pub fn veilid_core::BareRouteId::serialize<S>(&self, S) -> core::result::Result<<S as serde_core::ser::Serializer>::Ok, <S as serde_core::ser::Serializer>::Error> where S: serde_core::ser::Serializer
|
||||
impl<'de> serde_core::de::Deserialize<'de> for veilid_core::BareRouteId
|
||||
@@ -1037,9 +983,6 @@ pub fn veilid_core::BareSecretKey::deref(&self) -> &Self::Target
|
||||
impl core::str::traits::FromStr for veilid_core::BareSecretKey
|
||||
pub type veilid_core::BareSecretKey::Err = veilid_core::VeilidAPIError
|
||||
pub fn veilid_core::BareSecretKey::from_str(&str) -> core::result::Result<Self, Self::Err>
|
||||
impl get_size2::GetSize for veilid_core::BareSecretKey
|
||||
pub fn veilid_core::BareSecretKey::get_heap_size(&self) -> usize
|
||||
pub fn veilid_core::BareSecretKey::get_heap_size_with_tracker<TRACKER: get_size2::tracker::GetSizeTracker>(&self, TRACKER) -> (usize, TRACKER)
|
||||
impl serde_core::ser::Serialize for veilid_core::BareSecretKey
|
||||
pub fn veilid_core::BareSecretKey::serialize<S>(&self, S) -> core::result::Result<<S as serde_core::ser::Serializer>::Ok, <S as serde_core::ser::Serializer>::Error> where S: serde_core::ser::Serializer
|
||||
impl veilid_core::ToVeilidAPIErrorArgument for veilid_core::BareSecretKey
|
||||
@@ -1090,9 +1033,6 @@ pub fn veilid_core::BareSharedSecret::deref(&self) -> &Self::Target
|
||||
impl core::str::traits::FromStr for veilid_core::BareSharedSecret
|
||||
pub type veilid_core::BareSharedSecret::Err = veilid_core::VeilidAPIError
|
||||
pub fn veilid_core::BareSharedSecret::from_str(&str) -> core::result::Result<Self, Self::Err>
|
||||
impl get_size2::GetSize for veilid_core::BareSharedSecret
|
||||
pub fn veilid_core::BareSharedSecret::get_heap_size(&self) -> usize
|
||||
pub fn veilid_core::BareSharedSecret::get_heap_size_with_tracker<TRACKER: get_size2::tracker::GetSizeTracker>(&self, TRACKER) -> (usize, TRACKER)
|
||||
impl serde_core::ser::Serialize for veilid_core::BareSharedSecret
|
||||
pub fn veilid_core::BareSharedSecret::serialize<S>(&self, S) -> core::result::Result<<S as serde_core::ser::Serializer>::Ok, <S as serde_core::ser::Serializer>::Error> where S: serde_core::ser::Serializer
|
||||
impl veilid_core::ToVeilidAPIErrorArgument for veilid_core::BareSharedSecret
|
||||
@@ -1143,9 +1083,6 @@ pub fn veilid_core::BareSignature::deref(&self) -> &Self::Target
|
||||
impl core::str::traits::FromStr for veilid_core::BareSignature
|
||||
pub type veilid_core::BareSignature::Err = veilid_core::VeilidAPIError
|
||||
pub fn veilid_core::BareSignature::from_str(&str) -> core::result::Result<Self, Self::Err>
|
||||
impl get_size2::GetSize for veilid_core::BareSignature
|
||||
pub fn veilid_core::BareSignature::get_heap_size(&self) -> usize
|
||||
pub fn veilid_core::BareSignature::get_heap_size_with_tracker<TRACKER: get_size2::tracker::GetSizeTracker>(&self, TRACKER) -> (usize, TRACKER)
|
||||
impl serde_core::ser::Serialize for veilid_core::BareSignature
|
||||
pub fn veilid_core::BareSignature::serialize<S>(&self, S) -> core::result::Result<<S as serde_core::ser::Serializer>::Ok, <S as serde_core::ser::Serializer>::Error> where S: serde_core::ser::Serializer
|
||||
impl veilid_core::ToVeilidAPIErrorArgument for veilid_core::BareSignature
|
||||
@@ -1169,9 +1106,6 @@ pub fn veilid_core::ByteCount::fmt(&self, &mut core::fmt::Formatter<'_>) -> core
|
||||
impl core::str::traits::FromStr for veilid_core::ByteCount
|
||||
pub type veilid_core::ByteCount::Err = <u64 as core::str::traits::FromStr>::Err
|
||||
pub fn veilid_core::ByteCount::from_str(&str) -> core::result::Result<Self, Self::Err>
|
||||
impl get_size2::GetSize for veilid_core::ByteCount
|
||||
pub fn veilid_core::ByteCount::get_heap_size(&self) -> usize
|
||||
pub fn veilid_core::ByteCount::get_heap_size_with_tracker<TRACKER: get_size2::tracker::GetSizeTracker>(&self, TRACKER) -> (usize, TRACKER)
|
||||
impl<Rhs: core::convert::Into<u64>> core::ops::arith::Add<Rhs> for veilid_core::ByteCount
|
||||
pub type veilid_core::ByteCount::Output = veilid_core::ByteCount
|
||||
pub fn veilid_core::ByteCount::add(self, Rhs) -> Self
|
||||
@@ -1248,16 +1182,13 @@ pub fn veilid_core::CryptoKind::fmt(&self, &mut core::fmt::Formatter<'_>) -> cor
|
||||
impl core::str::traits::FromStr for veilid_core::CryptoKind
|
||||
pub type veilid_core::CryptoKind::Err = veilid_core::VeilidAPIError
|
||||
pub fn veilid_core::CryptoKind::from_str(&str) -> core::result::Result<Self, Self::Err>
|
||||
impl get_size2::GetSize for veilid_core::CryptoKind
|
||||
pub fn veilid_core::CryptoKind::get_heap_size(&self) -> usize
|
||||
pub fn veilid_core::CryptoKind::get_heap_size_with_tracker<TRACKER: get_size2::tracker::GetSizeTracker>(&self, TRACKER) -> (usize, TRACKER)
|
||||
impl veilid_core::ToVeilidAPIErrorArgument for veilid_core::CryptoKind
|
||||
pub fn veilid_core::CryptoKind::to_veilid_api_error_argument(&self) -> alloc::string::String
|
||||
pub struct veilid_core::CryptoSystemGuard<'a>
|
||||
impl<'a> veilid_core::CryptoSystemGuard<'a>
|
||||
pub fn veilid_core::CryptoSystemGuard<'a>::as_async(self) -> veilid_core::AsyncCryptoSystemGuard<'a>
|
||||
impl core::ops::deref::Deref for veilid_core::CryptoSystemGuard<'_>
|
||||
pub type veilid_core::CryptoSystemGuard<'_>::Target = (dyn veilid_core::CryptoSystem + core::marker::Send + core::marker::Sync)
|
||||
pub type veilid_core::CryptoSystemGuard<'_>::Target = (dyn veilid_core::CryptoSystem + core::marker::Sync + core::marker::Send)
|
||||
pub fn veilid_core::CryptoSystemGuard<'_>::deref(&self) -> &Self::Target
|
||||
pub struct veilid_core::DHTRecordDescriptor
|
||||
impl veilid_core::DHTRecordDescriptor
|
||||
@@ -1362,9 +1293,6 @@ pub fn veilid_core::DecapsulationKey::fmt(&self, &mut core::fmt::Formatter<'_>)
|
||||
impl core::str::traits::FromStr for veilid_core::DecapsulationKey
|
||||
pub type veilid_core::DecapsulationKey::Err = veilid_core::VeilidAPIError
|
||||
pub fn veilid_core::DecapsulationKey::from_str(&str) -> core::result::Result<Self, Self::Err>
|
||||
impl get_size2::GetSize for veilid_core::DecapsulationKey
|
||||
pub fn veilid_core::DecapsulationKey::get_heap_size(&self) -> usize
|
||||
pub fn veilid_core::DecapsulationKey::get_heap_size_with_tracker<TRACKER: get_size2::tracker::GetSizeTracker>(&self, TRACKER) -> (usize, TRACKER)
|
||||
impl serde_core::ser::Serialize for veilid_core::DecapsulationKey
|
||||
pub fn veilid_core::DecapsulationKey::serialize<S>(&self, S) -> core::result::Result<<S as serde_core::ser::Serializer>::Ok, <S as serde_core::ser::Serializer>::Error> where S: serde_core::ser::Serializer
|
||||
impl<'a> core::convert::TryFrom<&'a [u8]> for veilid_core::DecapsulationKey
|
||||
@@ -1411,9 +1339,6 @@ pub fn veilid_core::DecapsulationKeyGroup::deref(&self) -> &[veilid_core::Decaps
|
||||
impl core::str::traits::FromStr for veilid_core::DecapsulationKeyGroup
|
||||
pub type veilid_core::DecapsulationKeyGroup::Err = veilid_core::VeilidAPIError
|
||||
pub fn veilid_core::DecapsulationKeyGroup::from_str(&str) -> core::result::Result<Self, Self::Err>
|
||||
impl get_size2::GetSize for veilid_core::DecapsulationKeyGroup
|
||||
pub fn veilid_core::DecapsulationKeyGroup::get_heap_size(&self) -> usize
|
||||
pub fn veilid_core::DecapsulationKeyGroup::get_heap_size_with_tracker<TRACKER: get_size2::tracker::GetSizeTracker>(&self, TRACKER) -> (usize, TRACKER)
|
||||
pub struct veilid_core::EncapsulationKey
|
||||
impl veilid_core::EncapsulationKey
|
||||
pub fn veilid_core::EncapsulationKey::into_value(self) -> veilid_core::BareEncapsulationKey
|
||||
@@ -1448,9 +1373,6 @@ pub fn veilid_core::EncapsulationKey::fmt(&self, &mut core::fmt::Formatter<'_>)
|
||||
impl core::str::traits::FromStr for veilid_core::EncapsulationKey
|
||||
pub type veilid_core::EncapsulationKey::Err = veilid_core::VeilidAPIError
|
||||
pub fn veilid_core::EncapsulationKey::from_str(&str) -> core::result::Result<Self, Self::Err>
|
||||
impl get_size2::GetSize for veilid_core::EncapsulationKey
|
||||
pub fn veilid_core::EncapsulationKey::get_heap_size(&self) -> usize
|
||||
pub fn veilid_core::EncapsulationKey::get_heap_size_with_tracker<TRACKER: get_size2::tracker::GetSizeTracker>(&self, TRACKER) -> (usize, TRACKER)
|
||||
impl serde_core::ser::Serialize for veilid_core::EncapsulationKey
|
||||
pub fn veilid_core::EncapsulationKey::serialize<S>(&self, S) -> core::result::Result<<S as serde_core::ser::Serializer>::Ok, <S as serde_core::ser::Serializer>::Error> where S: serde_core::ser::Serializer
|
||||
impl<'a> core::convert::TryFrom<&'a [u8]> for veilid_core::EncapsulationKey
|
||||
@@ -1497,9 +1419,6 @@ pub fn veilid_core::EncapsulationKeyGroup::deref(&self) -> &[veilid_core::Encaps
|
||||
impl core::str::traits::FromStr for veilid_core::EncapsulationKeyGroup
|
||||
pub type veilid_core::EncapsulationKeyGroup::Err = veilid_core::VeilidAPIError
|
||||
pub fn veilid_core::EncapsulationKeyGroup::from_str(&str) -> core::result::Result<Self, Self::Err>
|
||||
impl get_size2::GetSize for veilid_core::EncapsulationKeyGroup
|
||||
pub fn veilid_core::EncapsulationKeyGroup::get_heap_size(&self) -> usize
|
||||
pub fn veilid_core::EncapsulationKeyGroup::get_heap_size_with_tracker<TRACKER: get_size2::tracker::GetSizeTracker>(&self, TRACKER) -> (usize, TRACKER)
|
||||
pub struct veilid_core::FmtStripVeilidFields
|
||||
impl veilid_core::FmtStripVeilidFields
|
||||
pub fn veilid_core::FmtStripVeilidFields::mapper() -> alloc::boxed::Box<dyn core::ops::function::FnOnce(tracing_subscriber::fmt::format::DefaultFields) -> veilid_core::FmtStripVeilidFields>
|
||||
@@ -1539,9 +1458,6 @@ pub fn veilid_core::HashDigest::fmt(&self, &mut core::fmt::Formatter<'_>) -> cor
|
||||
impl core::str::traits::FromStr for veilid_core::HashDigest
|
||||
pub type veilid_core::HashDigest::Err = veilid_core::VeilidAPIError
|
||||
pub fn veilid_core::HashDigest::from_str(&str) -> core::result::Result<Self, Self::Err>
|
||||
impl get_size2::GetSize for veilid_core::HashDigest
|
||||
pub fn veilid_core::HashDigest::get_heap_size(&self) -> usize
|
||||
pub fn veilid_core::HashDigest::get_heap_size_with_tracker<TRACKER: get_size2::tracker::GetSizeTracker>(&self, TRACKER) -> (usize, TRACKER)
|
||||
impl serde_core::ser::Serialize for veilid_core::HashDigest
|
||||
pub fn veilid_core::HashDigest::serialize<S>(&self, S) -> core::result::Result<<S as serde_core::ser::Serializer>::Ok, <S as serde_core::ser::Serializer>::Error> where S: serde_core::ser::Serializer
|
||||
impl veilid_core::ToVeilidAPIErrorArgument for veilid_core::HashDigest
|
||||
@@ -1590,9 +1506,6 @@ pub fn veilid_core::HashDigestGroup::deref(&self) -> &[veilid_core::HashDigest]
|
||||
impl core::str::traits::FromStr for veilid_core::HashDigestGroup
|
||||
pub type veilid_core::HashDigestGroup::Err = veilid_core::VeilidAPIError
|
||||
pub fn veilid_core::HashDigestGroup::from_str(&str) -> core::result::Result<Self, Self::Err>
|
||||
impl get_size2::GetSize for veilid_core::HashDigestGroup
|
||||
pub fn veilid_core::HashDigestGroup::get_heap_size(&self) -> usize
|
||||
pub fn veilid_core::HashDigestGroup::get_heap_size_with_tracker<TRACKER: get_size2::tracker::GetSizeTracker>(&self, TRACKER) -> (usize, TRACKER)
|
||||
pub struct veilid_core::KemKeyPair
|
||||
impl veilid_core::KemKeyPair
|
||||
pub fn veilid_core::KemKeyPair::bare_secret(&self) -> veilid_core::BareDecapsulationKey
|
||||
@@ -1628,9 +1541,6 @@ pub fn veilid_core::KemKeyPair::fmt(&self, &mut core::fmt::Formatter<'_>) -> cor
|
||||
impl core::str::traits::FromStr for veilid_core::KemKeyPair
|
||||
pub type veilid_core::KemKeyPair::Err = veilid_core::VeilidAPIError
|
||||
pub fn veilid_core::KemKeyPair::from_str(&str) -> core::result::Result<Self, Self::Err>
|
||||
impl get_size2::GetSize for veilid_core::KemKeyPair
|
||||
pub fn veilid_core::KemKeyPair::get_heap_size(&self) -> usize
|
||||
pub fn veilid_core::KemKeyPair::get_heap_size_with_tracker<TRACKER: get_size2::tracker::GetSizeTracker>(&self, TRACKER) -> (usize, TRACKER)
|
||||
impl serde_core::ser::Serialize for veilid_core::KemKeyPair
|
||||
pub fn veilid_core::KemKeyPair::serialize<S>(&self, S) -> core::result::Result<<S as serde_core::ser::Serializer>::Ok, <S as serde_core::ser::Serializer>::Error> where S: serde_core::ser::Serializer
|
||||
impl<'de> serde_core::de::Deserialize<'de> for veilid_core::KemKeyPair
|
||||
@@ -1674,9 +1584,6 @@ pub fn veilid_core::KemKeyPairGroup::deref(&self) -> &[veilid_core::KemKeyPair]
|
||||
impl core::str::traits::FromStr for veilid_core::KemKeyPairGroup
|
||||
pub type veilid_core::KemKeyPairGroup::Err = veilid_core::VeilidAPIError
|
||||
pub fn veilid_core::KemKeyPairGroup::from_str(&str) -> core::result::Result<Self, Self::Err>
|
||||
impl get_size2::GetSize for veilid_core::KemKeyPairGroup
|
||||
pub fn veilid_core::KemKeyPairGroup::get_heap_size(&self) -> usize
|
||||
pub fn veilid_core::KemKeyPairGroup::get_heap_size_with_tracker<TRACKER: get_size2::tracker::GetSizeTracker>(&self, TRACKER) -> (usize, TRACKER)
|
||||
pub struct veilid_core::KeyPair
|
||||
impl veilid_core::KeyPair
|
||||
pub fn veilid_core::KeyPair::bare_secret(&self) -> veilid_core::BareSecretKey
|
||||
@@ -1712,9 +1619,6 @@ pub fn veilid_core::KeyPair::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::
|
||||
impl core::str::traits::FromStr for veilid_core::KeyPair
|
||||
pub type veilid_core::KeyPair::Err = veilid_core::VeilidAPIError
|
||||
pub fn veilid_core::KeyPair::from_str(&str) -> core::result::Result<Self, Self::Err>
|
||||
impl get_size2::GetSize for veilid_core::KeyPair
|
||||
pub fn veilid_core::KeyPair::get_heap_size(&self) -> usize
|
||||
pub fn veilid_core::KeyPair::get_heap_size_with_tracker<TRACKER: get_size2::tracker::GetSizeTracker>(&self, TRACKER) -> (usize, TRACKER)
|
||||
impl serde_core::ser::Serialize for veilid_core::KeyPair
|
||||
pub fn veilid_core::KeyPair::serialize<S>(&self, S) -> core::result::Result<<S as serde_core::ser::Serializer>::Ok, <S as serde_core::ser::Serializer>::Error> where S: serde_core::ser::Serializer
|
||||
impl veilid_core::ToVeilidAPIErrorArgument for veilid_core::KeyPair
|
||||
@@ -1760,9 +1664,6 @@ pub fn veilid_core::KeyPairGroup::deref(&self) -> &[veilid_core::KeyPair]
|
||||
impl core::str::traits::FromStr for veilid_core::KeyPairGroup
|
||||
pub type veilid_core::KeyPairGroup::Err = veilid_core::VeilidAPIError
|
||||
pub fn veilid_core::KeyPairGroup::from_str(&str) -> core::result::Result<Self, Self::Err>
|
||||
impl get_size2::GetSize for veilid_core::KeyPairGroup
|
||||
pub fn veilid_core::KeyPairGroup::get_heap_size(&self) -> usize
|
||||
pub fn veilid_core::KeyPairGroup::get_heap_size_with_tracker<TRACKER: get_size2::tracker::GetSizeTracker>(&self, TRACKER) -> (usize, TRACKER)
|
||||
pub struct veilid_core::LatencyStats
|
||||
pub veilid_core::LatencyStats::average: veilid_core::TimestampDuration
|
||||
pub veilid_core::LatencyStats::fastest: veilid_core::TimestampDuration
|
||||
@@ -1816,9 +1717,6 @@ pub fn veilid_core::MemberId::fmt(&self, &mut core::fmt::Formatter<'_>) -> core:
|
||||
impl core::str::traits::FromStr for veilid_core::MemberId
|
||||
pub type veilid_core::MemberId::Err = veilid_core::VeilidAPIError
|
||||
pub fn veilid_core::MemberId::from_str(&str) -> core::result::Result<Self, Self::Err>
|
||||
impl get_size2::GetSize for veilid_core::MemberId
|
||||
pub fn veilid_core::MemberId::get_heap_size(&self) -> usize
|
||||
pub fn veilid_core::MemberId::get_heap_size_with_tracker<TRACKER: get_size2::tracker::GetSizeTracker>(&self, TRACKER) -> (usize, TRACKER)
|
||||
impl serde_core::ser::Serialize for veilid_core::MemberId
|
||||
pub fn veilid_core::MemberId::serialize<S>(&self, S) -> core::result::Result<<S as serde_core::ser::Serializer>::Ok, <S as serde_core::ser::Serializer>::Error> where S: serde_core::ser::Serializer
|
||||
impl veilid_core::ToVeilidAPIErrorArgument for veilid_core::MemberId
|
||||
@@ -1867,9 +1765,6 @@ pub fn veilid_core::MemberIdGroup::deref(&self) -> &[veilid_core::MemberId]
|
||||
impl core::str::traits::FromStr for veilid_core::MemberIdGroup
|
||||
pub type veilid_core::MemberIdGroup::Err = veilid_core::VeilidAPIError
|
||||
pub fn veilid_core::MemberIdGroup::from_str(&str) -> core::result::Result<Self, Self::Err>
|
||||
impl get_size2::GetSize for veilid_core::MemberIdGroup
|
||||
pub fn veilid_core::MemberIdGroup::get_heap_size(&self) -> usize
|
||||
pub fn veilid_core::MemberIdGroup::get_heap_size_with_tracker<TRACKER: get_size2::tracker::GetSizeTracker>(&self, TRACKER) -> (usize, TRACKER)
|
||||
#[repr(C, align(8))] pub struct veilid_core::NodeCount(_)
|
||||
impl veilid_core::NodeCount
|
||||
pub const fn veilid_core::NodeCount::as_u64(self) -> u64
|
||||
@@ -1887,9 +1782,6 @@ pub fn veilid_core::NodeCount::fmt(&self, &mut core::fmt::Formatter<'_>) -> core
|
||||
impl core::str::traits::FromStr for veilid_core::NodeCount
|
||||
pub type veilid_core::NodeCount::Err = <u64 as core::str::traits::FromStr>::Err
|
||||
pub fn veilid_core::NodeCount::from_str(&str) -> core::result::Result<Self, Self::Err>
|
||||
impl get_size2::GetSize for veilid_core::NodeCount
|
||||
pub fn veilid_core::NodeCount::get_heap_size(&self) -> usize
|
||||
pub fn veilid_core::NodeCount::get_heap_size_with_tracker<TRACKER: get_size2::tracker::GetSizeTracker>(&self, TRACKER) -> (usize, TRACKER)
|
||||
impl<Rhs: core::convert::Into<u64>> core::ops::arith::Add<Rhs> for veilid_core::NodeCount
|
||||
pub type veilid_core::NodeCount::Output = veilid_core::NodeCount
|
||||
pub fn veilid_core::NodeCount::add(self, Rhs) -> Self
|
||||
@@ -1944,9 +1836,6 @@ pub fn veilid_core::NodeId::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::r
|
||||
impl core::str::traits::FromStr for veilid_core::NodeId
|
||||
pub type veilid_core::NodeId::Err = veilid_core::VeilidAPIError
|
||||
pub fn veilid_core::NodeId::from_str(&str) -> core::result::Result<Self, Self::Err>
|
||||
impl get_size2::GetSize for veilid_core::NodeId
|
||||
pub fn veilid_core::NodeId::get_heap_size(&self) -> usize
|
||||
pub fn veilid_core::NodeId::get_heap_size_with_tracker<TRACKER: get_size2::tracker::GetSizeTracker>(&self, TRACKER) -> (usize, TRACKER)
|
||||
impl serde_core::ser::Serialize for veilid_core::NodeId
|
||||
pub fn veilid_core::NodeId::serialize<S>(&self, S) -> core::result::Result<<S as serde_core::ser::Serializer>::Ok, <S as serde_core::ser::Serializer>::Error> where S: serde_core::ser::Serializer
|
||||
impl veilid_core::ToVeilidAPIErrorArgument for veilid_core::NodeId
|
||||
@@ -1995,9 +1884,6 @@ pub fn veilid_core::NodeIdGroup::deref(&self) -> &[veilid_core::NodeId]
|
||||
impl core::str::traits::FromStr for veilid_core::NodeIdGroup
|
||||
pub type veilid_core::NodeIdGroup::Err = veilid_core::VeilidAPIError
|
||||
pub fn veilid_core::NodeIdGroup::from_str(&str) -> core::result::Result<Self, Self::Err>
|
||||
impl get_size2::GetSize for veilid_core::NodeIdGroup
|
||||
pub fn veilid_core::NodeIdGroup::get_heap_size(&self) -> usize
|
||||
pub fn veilid_core::NodeIdGroup::get_heap_size_with_tracker<TRACKER: get_size2::tracker::GetSizeTracker>(&self, TRACKER) -> (usize, TRACKER)
|
||||
pub struct veilid_core::Nonce
|
||||
impl veilid_core::Nonce
|
||||
pub fn veilid_core::Nonce::bit(&self, usize) -> bool
|
||||
@@ -2044,9 +1930,6 @@ pub fn veilid_core::Nonce::deref(&self) -> &Self::Target
|
||||
impl core::str::traits::FromStr for veilid_core::Nonce
|
||||
pub type veilid_core::Nonce::Err = veilid_core::VeilidAPIError
|
||||
pub fn veilid_core::Nonce::from_str(&str) -> core::result::Result<Self, Self::Err>
|
||||
impl get_size2::GetSize for veilid_core::Nonce
|
||||
pub fn veilid_core::Nonce::get_heap_size(&self) -> usize
|
||||
pub fn veilid_core::Nonce::get_heap_size_with_tracker<TRACKER: get_size2::tracker::GetSizeTracker>(&self, TRACKER) -> (usize, TRACKER)
|
||||
impl serde_core::ser::Serialize for veilid_core::Nonce
|
||||
pub fn veilid_core::Nonce::serialize<S>(&self, S) -> core::result::Result<<S as serde_core::ser::Serializer>::Ok, <S as serde_core::ser::Serializer>::Error> where S: serde_core::ser::Serializer
|
||||
impl<'de> serde_core::de::Deserialize<'de> for veilid_core::Nonce
|
||||
@@ -2085,9 +1968,6 @@ pub fn veilid_core::OpaqueRecordKey::fmt(&self, &mut core::fmt::Formatter<'_>) -
|
||||
impl core::str::traits::FromStr for veilid_core::OpaqueRecordKey
|
||||
pub type veilid_core::OpaqueRecordKey::Err = veilid_core::VeilidAPIError
|
||||
pub fn veilid_core::OpaqueRecordKey::from_str(&str) -> core::result::Result<Self, Self::Err>
|
||||
impl get_size2::GetSize for veilid_core::OpaqueRecordKey
|
||||
pub fn veilid_core::OpaqueRecordKey::get_heap_size(&self) -> usize
|
||||
pub fn veilid_core::OpaqueRecordKey::get_heap_size_with_tracker<TRACKER: get_size2::tracker::GetSizeTracker>(&self, TRACKER) -> (usize, TRACKER)
|
||||
impl serde_core::ser::Serialize for veilid_core::OpaqueRecordKey
|
||||
pub fn veilid_core::OpaqueRecordKey::serialize<S>(&self, S) -> core::result::Result<<S as serde_core::ser::Serializer>::Ok, <S as serde_core::ser::Serializer>::Error> where S: serde_core::ser::Serializer
|
||||
impl veilid_core::ToVeilidAPIErrorArgument for veilid_core::OpaqueRecordKey
|
||||
@@ -2136,9 +2016,6 @@ pub fn veilid_core::OpaqueRecordKeyGroup::deref(&self) -> &[veilid_core::OpaqueR
|
||||
impl core::str::traits::FromStr for veilid_core::OpaqueRecordKeyGroup
|
||||
pub type veilid_core::OpaqueRecordKeyGroup::Err = veilid_core::VeilidAPIError
|
||||
pub fn veilid_core::OpaqueRecordKeyGroup::from_str(&str) -> core::result::Result<Self, Self::Err>
|
||||
impl get_size2::GetSize for veilid_core::OpaqueRecordKeyGroup
|
||||
pub fn veilid_core::OpaqueRecordKeyGroup::get_heap_size(&self) -> usize
|
||||
pub fn veilid_core::OpaqueRecordKeyGroup::get_heap_size_with_tracker<TRACKER: get_size2::tracker::GetSizeTracker>(&self, TRACKER) -> (usize, TRACKER)
|
||||
#[repr(C, align(8))] pub struct veilid_core::OperationId(_)
|
||||
impl veilid_core::OperationId
|
||||
pub const fn veilid_core::OperationId::as_u64(self) -> u64
|
||||
@@ -2154,9 +2031,6 @@ pub fn veilid_core::OperationId::fmt(&self, &mut core::fmt::Formatter<'_>) -> co
|
||||
impl core::str::traits::FromStr for veilid_core::OperationId
|
||||
pub type veilid_core::OperationId::Err = <u64 as core::str::traits::FromStr>::Err
|
||||
pub fn veilid_core::OperationId::from_str(&str) -> core::result::Result<Self, Self::Err>
|
||||
impl get_size2::GetSize for veilid_core::OperationId
|
||||
pub fn veilid_core::OperationId::get_heap_size(&self) -> usize
|
||||
pub fn veilid_core::OperationId::get_heap_size_with_tracker<TRACKER: get_size2::tracker::GetSizeTracker>(&self, TRACKER) -> (usize, TRACKER)
|
||||
pub struct veilid_core::PeerStats
|
||||
pub veilid_core::PeerStats::latency: core::option::Option<veilid_core::LatencyStats>
|
||||
pub veilid_core::PeerStats::transfer: veilid_core::TransferStatsDownUp
|
||||
@@ -2175,9 +2049,6 @@ pub veilid_core::PrivateSpec::sequencing: veilid_core::Sequencing
|
||||
pub veilid_core::PrivateSpec::stability: veilid_core::Stability
|
||||
impl core::fmt::Display for veilid_core::PrivateSpec
|
||||
pub fn veilid_core::PrivateSpec::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result
|
||||
impl get_size2::GetSize for veilid_core::PrivateSpec
|
||||
pub fn veilid_core::PrivateSpec::get_heap_size(&self) -> usize
|
||||
pub fn veilid_core::PrivateSpec::get_heap_size_with_tracker<TRACKER: get_size2::tracker::GetSizeTracker>(&self, TRACKER) -> (usize, TRACKER)
|
||||
pub struct veilid_core::PublicKey
|
||||
impl veilid_core::PublicKey
|
||||
pub fn veilid_core::PublicKey::into_value(self) -> veilid_core::BarePublicKey
|
||||
@@ -2212,9 +2083,6 @@ pub fn veilid_core::PublicKey::fmt(&self, &mut core::fmt::Formatter<'_>) -> core
|
||||
impl core::str::traits::FromStr for veilid_core::PublicKey
|
||||
pub type veilid_core::PublicKey::Err = veilid_core::VeilidAPIError
|
||||
pub fn veilid_core::PublicKey::from_str(&str) -> core::result::Result<Self, Self::Err>
|
||||
impl get_size2::GetSize for veilid_core::PublicKey
|
||||
pub fn veilid_core::PublicKey::get_heap_size(&self) -> usize
|
||||
pub fn veilid_core::PublicKey::get_heap_size_with_tracker<TRACKER: get_size2::tracker::GetSizeTracker>(&self, TRACKER) -> (usize, TRACKER)
|
||||
impl serde_core::ser::Serialize for veilid_core::PublicKey
|
||||
pub fn veilid_core::PublicKey::serialize<S>(&self, S) -> core::result::Result<<S as serde_core::ser::Serializer>::Ok, <S as serde_core::ser::Serializer>::Error> where S: serde_core::ser::Serializer
|
||||
impl veilid_core::ToVeilidAPIErrorArgument for veilid_core::PublicKey
|
||||
@@ -2263,9 +2131,6 @@ pub fn veilid_core::PublicKeyGroup::deref(&self) -> &[veilid_core::PublicKey]
|
||||
impl core::str::traits::FromStr for veilid_core::PublicKeyGroup
|
||||
pub type veilid_core::PublicKeyGroup::Err = veilid_core::VeilidAPIError
|
||||
pub fn veilid_core::PublicKeyGroup::from_str(&str) -> core::result::Result<Self, Self::Err>
|
||||
impl get_size2::GetSize for veilid_core::PublicKeyGroup
|
||||
pub fn veilid_core::PublicKeyGroup::get_heap_size(&self) -> usize
|
||||
pub fn veilid_core::PublicKeyGroup::get_heap_size_with_tracker<TRACKER: get_size2::tracker::GetSizeTracker>(&self, TRACKER) -> (usize, TRACKER)
|
||||
pub struct veilid_core::RecordKey
|
||||
impl veilid_core::RecordKey
|
||||
pub fn veilid_core::RecordKey::encryption_key(&self) -> core::option::Option<veilid_core::SharedSecret>
|
||||
@@ -2299,9 +2164,6 @@ pub fn veilid_core::RecordKey::fmt(&self, &mut core::fmt::Formatter<'_>) -> core
|
||||
impl core::str::traits::FromStr for veilid_core::RecordKey
|
||||
pub type veilid_core::RecordKey::Err = veilid_core::VeilidAPIError
|
||||
pub fn veilid_core::RecordKey::from_str(&str) -> core::result::Result<Self, Self::Err>
|
||||
impl get_size2::GetSize for veilid_core::RecordKey
|
||||
pub fn veilid_core::RecordKey::get_heap_size(&self) -> usize
|
||||
pub fn veilid_core::RecordKey::get_heap_size_with_tracker<TRACKER: get_size2::tracker::GetSizeTracker>(&self, TRACKER) -> (usize, TRACKER)
|
||||
impl serde_core::ser::Serialize for veilid_core::RecordKey
|
||||
pub fn veilid_core::RecordKey::serialize<S>(&self, S) -> core::result::Result<<S as serde_core::ser::Serializer>::Ok, <S as serde_core::ser::Serializer>::Error> where S: serde_core::ser::Serializer
|
||||
impl veilid_core::ToVeilidAPIErrorArgument for veilid_core::RecordKey
|
||||
@@ -2347,9 +2209,6 @@ pub fn veilid_core::RecordKeyGroup::deref(&self) -> &[veilid_core::RecordKey]
|
||||
impl core::str::traits::FromStr for veilid_core::RecordKeyGroup
|
||||
pub type veilid_core::RecordKeyGroup::Err = veilid_core::VeilidAPIError
|
||||
pub fn veilid_core::RecordKeyGroup::from_str(&str) -> core::result::Result<Self, Self::Err>
|
||||
impl get_size2::GetSize for veilid_core::RecordKeyGroup
|
||||
pub fn veilid_core::RecordKeyGroup::get_heap_size(&self) -> usize
|
||||
pub fn veilid_core::RecordKeyGroup::get_heap_size_with_tracker<TRACKER: get_size2::tracker::GetSizeTracker>(&self, TRACKER) -> (usize, TRACKER)
|
||||
pub struct veilid_core::RouteBlob
|
||||
pub veilid_core::RouteBlob::blob: alloc::vec::Vec<u8>
|
||||
pub veilid_core::RouteBlob::route_id: veilid_core::RouteId
|
||||
@@ -2387,9 +2246,6 @@ pub fn veilid_core::RouteId::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::
|
||||
impl core::str::traits::FromStr for veilid_core::RouteId
|
||||
pub type veilid_core::RouteId::Err = veilid_core::VeilidAPIError
|
||||
pub fn veilid_core::RouteId::from_str(&str) -> core::result::Result<Self, Self::Err>
|
||||
impl get_size2::GetSize for veilid_core::RouteId
|
||||
pub fn veilid_core::RouteId::get_heap_size(&self) -> usize
|
||||
pub fn veilid_core::RouteId::get_heap_size_with_tracker<TRACKER: get_size2::tracker::GetSizeTracker>(&self, TRACKER) -> (usize, TRACKER)
|
||||
impl serde_core::ser::Serialize for veilid_core::RouteId
|
||||
pub fn veilid_core::RouteId::serialize<S>(&self, S) -> core::result::Result<<S as serde_core::ser::Serializer>::Ok, <S as serde_core::ser::Serializer>::Error> where S: serde_core::ser::Serializer
|
||||
impl veilid_core::ToVeilidAPIErrorArgument for veilid_core::RouteId
|
||||
@@ -2438,9 +2294,6 @@ pub fn veilid_core::RouteIdGroup::deref(&self) -> &[veilid_core::RouteId]
|
||||
impl core::str::traits::FromStr for veilid_core::RouteIdGroup
|
||||
pub type veilid_core::RouteIdGroup::Err = veilid_core::VeilidAPIError
|
||||
pub fn veilid_core::RouteIdGroup::from_str(&str) -> core::result::Result<Self, Self::Err>
|
||||
impl get_size2::GetSize for veilid_core::RouteIdGroup
|
||||
pub fn veilid_core::RouteIdGroup::get_heap_size(&self) -> usize
|
||||
pub fn veilid_core::RouteIdGroup::get_heap_size_with_tracker<TRACKER: get_size2::tracker::GetSizeTracker>(&self, TRACKER) -> (usize, TRACKER)
|
||||
pub struct veilid_core::RoutingContext
|
||||
impl veilid_core::RoutingContext
|
||||
pub fn veilid_core::RoutingContext::api(&self) -> veilid_core::VeilidAPI
|
||||
@@ -2470,9 +2323,6 @@ pub veilid_core::SafetySpec::sequencing: veilid_core::Sequencing
|
||||
pub veilid_core::SafetySpec::stability: veilid_core::Stability
|
||||
impl core::fmt::Display for veilid_core::SafetySpec
|
||||
pub fn veilid_core::SafetySpec::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result
|
||||
impl get_size2::GetSize for veilid_core::SafetySpec
|
||||
pub fn veilid_core::SafetySpec::get_heap_size(&self) -> usize
|
||||
pub fn veilid_core::SafetySpec::get_heap_size_with_tracker<TRACKER: get_size2::tracker::GetSizeTracker>(&self, TRACKER) -> (usize, TRACKER)
|
||||
pub struct veilid_core::SecretKey
|
||||
impl veilid_core::SecretKey
|
||||
pub fn veilid_core::SecretKey::into_value(self) -> veilid_core::BareSecretKey
|
||||
@@ -2507,9 +2357,6 @@ pub fn veilid_core::SecretKey::fmt(&self, &mut core::fmt::Formatter<'_>) -> core
|
||||
impl core::str::traits::FromStr for veilid_core::SecretKey
|
||||
pub type veilid_core::SecretKey::Err = veilid_core::VeilidAPIError
|
||||
pub fn veilid_core::SecretKey::from_str(&str) -> core::result::Result<Self, Self::Err>
|
||||
impl get_size2::GetSize for veilid_core::SecretKey
|
||||
pub fn veilid_core::SecretKey::get_heap_size(&self) -> usize
|
||||
pub fn veilid_core::SecretKey::get_heap_size_with_tracker<TRACKER: get_size2::tracker::GetSizeTracker>(&self, TRACKER) -> (usize, TRACKER)
|
||||
impl serde_core::ser::Serialize for veilid_core::SecretKey
|
||||
pub fn veilid_core::SecretKey::serialize<S>(&self, S) -> core::result::Result<<S as serde_core::ser::Serializer>::Ok, <S as serde_core::ser::Serializer>::Error> where S: serde_core::ser::Serializer
|
||||
impl veilid_core::ToVeilidAPIErrorArgument for veilid_core::SecretKey
|
||||
@@ -2558,9 +2405,6 @@ pub fn veilid_core::SecretKeyGroup::deref(&self) -> &[veilid_core::SecretKey]
|
||||
impl core::str::traits::FromStr for veilid_core::SecretKeyGroup
|
||||
pub type veilid_core::SecretKeyGroup::Err = veilid_core::VeilidAPIError
|
||||
pub fn veilid_core::SecretKeyGroup::from_str(&str) -> core::result::Result<Self, Self::Err>
|
||||
impl get_size2::GetSize for veilid_core::SecretKeyGroup
|
||||
pub fn veilid_core::SecretKeyGroup::get_heap_size(&self) -> usize
|
||||
pub fn veilid_core::SecretKeyGroup::get_heap_size_with_tracker<TRACKER: get_size2::tracker::GetSizeTracker>(&self, TRACKER) -> (usize, TRACKER)
|
||||
pub struct veilid_core::SetDHTValueOptions
|
||||
pub veilid_core::SetDHTValueOptions::allow_offline: core::option::Option<veilid_core::AllowOffline>
|
||||
pub veilid_core::SetDHTValueOptions::min_seqnum: core::option::Option<veilid_core::ValueSeqNum>
|
||||
@@ -2601,9 +2445,6 @@ pub fn veilid_core::SharedSecret::fmt(&self, &mut core::fmt::Formatter<'_>) -> c
|
||||
impl core::str::traits::FromStr for veilid_core::SharedSecret
|
||||
pub type veilid_core::SharedSecret::Err = veilid_core::VeilidAPIError
|
||||
pub fn veilid_core::SharedSecret::from_str(&str) -> core::result::Result<Self, Self::Err>
|
||||
impl get_size2::GetSize for veilid_core::SharedSecret
|
||||
pub fn veilid_core::SharedSecret::get_heap_size(&self) -> usize
|
||||
pub fn veilid_core::SharedSecret::get_heap_size_with_tracker<TRACKER: get_size2::tracker::GetSizeTracker>(&self, TRACKER) -> (usize, TRACKER)
|
||||
impl serde_core::ser::Serialize for veilid_core::SharedSecret
|
||||
pub fn veilid_core::SharedSecret::serialize<S>(&self, S) -> core::result::Result<<S as serde_core::ser::Serializer>::Ok, <S as serde_core::ser::Serializer>::Error> where S: serde_core::ser::Serializer
|
||||
impl veilid_core::ToVeilidAPIErrorArgument for veilid_core::SharedSecret
|
||||
@@ -2652,9 +2493,6 @@ pub fn veilid_core::SharedSecretGroup::deref(&self) -> &[veilid_core::SharedSecr
|
||||
impl core::str::traits::FromStr for veilid_core::SharedSecretGroup
|
||||
pub type veilid_core::SharedSecretGroup::Err = veilid_core::VeilidAPIError
|
||||
pub fn veilid_core::SharedSecretGroup::from_str(&str) -> core::result::Result<Self, Self::Err>
|
||||
impl get_size2::GetSize for veilid_core::SharedSecretGroup
|
||||
pub fn veilid_core::SharedSecretGroup::get_heap_size(&self) -> usize
|
||||
pub fn veilid_core::SharedSecretGroup::get_heap_size_with_tracker<TRACKER: get_size2::tracker::GetSizeTracker>(&self, TRACKER) -> (usize, TRACKER)
|
||||
pub struct veilid_core::Signature
|
||||
impl veilid_core::Signature
|
||||
pub fn veilid_core::Signature::into_value(self) -> veilid_core::BareSignature
|
||||
@@ -2689,9 +2527,6 @@ pub fn veilid_core::Signature::fmt(&self, &mut core::fmt::Formatter<'_>) -> core
|
||||
impl core::str::traits::FromStr for veilid_core::Signature
|
||||
pub type veilid_core::Signature::Err = veilid_core::VeilidAPIError
|
||||
pub fn veilid_core::Signature::from_str(&str) -> core::result::Result<Self, Self::Err>
|
||||
impl get_size2::GetSize for veilid_core::Signature
|
||||
pub fn veilid_core::Signature::get_heap_size(&self) -> usize
|
||||
pub fn veilid_core::Signature::get_heap_size_with_tracker<TRACKER: get_size2::tracker::GetSizeTracker>(&self, TRACKER) -> (usize, TRACKER)
|
||||
impl serde_core::ser::Serialize for veilid_core::Signature
|
||||
pub fn veilid_core::Signature::serialize<S>(&self, S) -> core::result::Result<<S as serde_core::ser::Serializer>::Ok, <S as serde_core::ser::Serializer>::Error> where S: serde_core::ser::Serializer
|
||||
impl veilid_core::ToVeilidAPIErrorArgument for veilid_core::Signature
|
||||
@@ -2740,9 +2575,6 @@ pub fn veilid_core::SignatureGroup::deref(&self) -> &[veilid_core::Signature]
|
||||
impl core::str::traits::FromStr for veilid_core::SignatureGroup
|
||||
pub type veilid_core::SignatureGroup::Err = veilid_core::VeilidAPIError
|
||||
pub fn veilid_core::SignatureGroup::from_str(&str) -> core::result::Result<Self, Self::Err>
|
||||
impl get_size2::GetSize for veilid_core::SignatureGroup
|
||||
pub fn veilid_core::SignatureGroup::get_heap_size(&self) -> usize
|
||||
pub fn veilid_core::SignatureGroup::get_heap_size_with_tracker<TRACKER: get_size2::tracker::GetSizeTracker>(&self, TRACKER) -> (usize, TRACKER)
|
||||
pub struct veilid_core::StatsManager
|
||||
impl veilid_core::StatsManager
|
||||
pub fn veilid_core::StatsManager::init(core::option::Option<veilid_core::VeilidLogKey>, veilid_core::StatsSettings)
|
||||
@@ -2810,9 +2642,6 @@ pub fn veilid_core::Timestamp::fmt(&self, &mut core::fmt::Formatter<'_>) -> core
|
||||
impl core::str::traits::FromStr for veilid_core::Timestamp
|
||||
pub type veilid_core::Timestamp::Err = <u64 as core::str::traits::FromStr>::Err
|
||||
pub fn veilid_core::Timestamp::from_str(&str) -> core::result::Result<Self, Self::Err>
|
||||
impl get_size2::GetSize for veilid_core::Timestamp
|
||||
pub fn veilid_core::Timestamp::get_heap_size(&self) -> usize
|
||||
pub fn veilid_core::Timestamp::get_heap_size_with_tracker<TRACKER: get_size2::tracker::GetSizeTracker>(&self, TRACKER) -> (usize, TRACKER)
|
||||
impl veilid_core::ToVeilidAPIErrorArgument for veilid_core::Timestamp
|
||||
pub fn veilid_core::Timestamp::to_veilid_api_error_argument(&self) -> alloc::string::String
|
||||
#[repr(C, align(8))] pub struct veilid_core::TimestampDuration(_)
|
||||
@@ -2852,9 +2681,6 @@ pub fn veilid_core::TimestampDuration::fmt(&self, &mut core::fmt::Formatter<'_>)
|
||||
impl core::str::traits::FromStr for veilid_core::TimestampDuration
|
||||
pub type veilid_core::TimestampDuration::Err = <u64 as core::str::traits::FromStr>::Err
|
||||
pub fn veilid_core::TimestampDuration::from_str(&str) -> core::result::Result<Self, Self::Err>
|
||||
impl get_size2::GetSize for veilid_core::TimestampDuration
|
||||
pub fn veilid_core::TimestampDuration::get_heap_size(&self) -> usize
|
||||
pub fn veilid_core::TimestampDuration::get_heap_size_with_tracker<TRACKER: get_size2::tracker::GetSizeTracker>(&self, TRACKER) -> (usize, TRACKER)
|
||||
impl veilid_core::ToVeilidAPIErrorArgument for veilid_core::TimestampDuration
|
||||
pub fn veilid_core::TimestampDuration::to_veilid_api_error_argument(&self) -> alloc::string::String
|
||||
pub struct veilid_core::TransactDHTRecordsOptions
|
||||
@@ -2944,9 +2770,6 @@ pub fn veilid_core::ValueSubkeyRangeSet::deref_mut(&mut self) -> &mut Self::Targ
|
||||
impl core::str::traits::FromStr for veilid_core::ValueSubkeyRangeSet
|
||||
pub type veilid_core::ValueSubkeyRangeSet::Err = veilid_core::VeilidAPIError
|
||||
pub fn veilid_core::ValueSubkeyRangeSet::from_str(&str) -> core::result::Result<Self, Self::Err>
|
||||
impl get_size2::GetSize for veilid_core::ValueSubkeyRangeSet
|
||||
pub fn veilid_core::ValueSubkeyRangeSet::get_heap_size(&self) -> usize
|
||||
pub fn veilid_core::ValueSubkeyRangeSet::get_heap_size_with_tracker<TRACKER: get_size2::tracker::GetSizeTracker>(&self, TRACKER) -> (usize, TRACKER)
|
||||
impl veilid_core::ToVeilidAPIErrorArgument for veilid_core::ValueSubkeyRangeSet
|
||||
pub fn veilid_core::ValueSubkeyRangeSet::to_veilid_api_error_argument(&self) -> alloc::string::String
|
||||
pub struct veilid_core::VeilidAPI
|
||||
@@ -3020,9 +2843,6 @@ pub fn veilid_core::VeilidCapability::fmt(&self, &mut core::fmt::Formatter<'_>)
|
||||
impl core::str::traits::FromStr for veilid_core::VeilidCapability
|
||||
pub type veilid_core::VeilidCapability::Err = veilid_core::VeilidAPIError
|
||||
pub fn veilid_core::VeilidCapability::from_str(&str) -> core::result::Result<Self, Self::Err>
|
||||
impl get_size2::GetSize for veilid_core::VeilidCapability
|
||||
pub fn veilid_core::VeilidCapability::get_heap_size(&self) -> usize
|
||||
pub fn veilid_core::VeilidCapability::get_heap_size_with_tracker<TRACKER: get_size2::tracker::GetSizeTracker>(&self, TRACKER) -> (usize, TRACKER)
|
||||
impl veilid_core::ToVeilidAPIErrorArgument for veilid_core::VeilidCapability
|
||||
pub fn veilid_core::VeilidCapability::to_veilid_api_error_argument(&self) -> alloc::string::String
|
||||
pub struct veilid_core::VeilidComponentGuard<'a, T: core::marker::Send + core::marker::Sync + 'static>
|
||||
|
||||
Generated
+2
-132
@@ -372,36 +372,6 @@ version = "1.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0"
|
||||
|
||||
[[package]]
|
||||
name = "attribute-derive"
|
||||
version = "0.10.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "05832cdddc8f2650cc2cc187cc2e952b8c133a48eb055f35211f61ee81502d77"
|
||||
dependencies = [
|
||||
"attribute-derive-macro",
|
||||
"derive-where",
|
||||
"manyhow",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.119",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "attribute-derive-macro"
|
||||
version = "0.10.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0a7cdbbd4bd005c5d3e2e9c885e6fa575db4f4a3572335b974d8db853b6beb61"
|
||||
dependencies = [
|
||||
"collection_literals",
|
||||
"interpolator",
|
||||
"manyhow",
|
||||
"proc-macro-utils",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"quote-use",
|
||||
"syn 2.0.119",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "autocfg"
|
||||
version = "1.5.1"
|
||||
@@ -728,12 +698,6 @@ version = "0.5.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0c9ea0ac24bc397ab3c98583a3c9ba74fa56b09a4449bbe172b9b1ddb016027a"
|
||||
|
||||
[[package]]
|
||||
name = "collection_literals"
|
||||
version = "1.0.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2550f75b8cfac212855f6b1885455df8eaee8fe8e246b647d69146142e016084"
|
||||
|
||||
[[package]]
|
||||
name = "colorchoice"
|
||||
version = "1.0.5"
|
||||
@@ -996,17 +960,6 @@ version = "0.5.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c"
|
||||
|
||||
[[package]]
|
||||
name = "derive-where"
|
||||
version = "1.6.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d08b3a0bcc0d079199cd476b2cae8435016ec11d1c0986c6901c5ac223041534"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.119",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "digest"
|
||||
version = "0.10.7"
|
||||
@@ -1434,26 +1387,6 @@ dependencies = [
|
||||
"version_check",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "get-size-derive2"
|
||||
version = "0.10.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c736d226c32e496b8377813b52269e11ad3a48d8373b68862d0364f04fd1229d"
|
||||
dependencies = [
|
||||
"attribute-derive",
|
||||
"quote",
|
||||
"syn 2.0.119",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "get-size2"
|
||||
version = "0.10.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b411f34418305908ab15a82ff78958c2a9aee9a272b2a2e663836b20a4e4b9d3"
|
||||
dependencies = [
|
||||
"get-size-derive2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "getrandom"
|
||||
version = "0.2.17"
|
||||
@@ -1864,12 +1797,6 @@ dependencies = [
|
||||
"hybrid-array",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "interpolator"
|
||||
version = "0.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "71dd52191aae121e8611f1e8dc3e324dd0dd1dee1e6dd91d10ee07a3cfb4d9d8"
|
||||
|
||||
[[package]]
|
||||
name = "ipconfig"
|
||||
version = "0.3.4"
|
||||
@@ -2147,29 +2074,6 @@ version = "0.2.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fc04a4c58212d57930a24bf47d3fa87485264a3a054e9c10e042eb373573ad3c"
|
||||
|
||||
[[package]]
|
||||
name = "manyhow"
|
||||
version = "0.11.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b33efb3ca6d3b07393750d4030418d594ab1139cee518f0dc88db70fec873587"
|
||||
dependencies = [
|
||||
"manyhow-macros",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.119",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "manyhow-macros"
|
||||
version = "0.11.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "46fce34d199b78b6e6073abf984c9cf5fd3e9330145a93ee0738a7443e371495"
|
||||
dependencies = [
|
||||
"proc-macro-utils",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "memchr"
|
||||
version = "2.8.3"
|
||||
@@ -2683,17 +2587,6 @@ dependencies = [
|
||||
"zerocopy",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro-utils"
|
||||
version = "0.10.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "eeaf08a13de400bc215877b5bdc088f241b12eb42f0a548d3390dc1c56bb7071"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"smallvec",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro2"
|
||||
version = "1.0.107"
|
||||
@@ -2712,28 +2605,6 @@ dependencies = [
|
||||
"proc-macro2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "quote-use"
|
||||
version = "0.8.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9619db1197b497a36178cfc736dc96b271fe918875fbf1344c436a7e93d0321e"
|
||||
dependencies = [
|
||||
"quote",
|
||||
"quote-use-macros",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "quote-use-macros"
|
||||
version = "0.8.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "82ebfb7faafadc06a7ab141a6f67bcfb24cb8beb158c6fe933f2f035afa99f35"
|
||||
dependencies = [
|
||||
"proc-macro-utils",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.119",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "r-efi"
|
||||
version = "5.3.0"
|
||||
@@ -3717,7 +3588,6 @@ dependencies = [
|
||||
"flume",
|
||||
"futures-rustls",
|
||||
"futures-util",
|
||||
"get-size2",
|
||||
"getrandom 0.4.3",
|
||||
"glob",
|
||||
"gloo-events",
|
||||
@@ -4363,9 +4233,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "zerovec-derive"
|
||||
version = "0.11.4"
|
||||
version = "0.11.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "47402523226a02bfe5230160dc3ccc089aa6f6f19e7fcbb4e6f824bbb1b4aa62"
|
||||
checksum = "9f212a141d820099d57ffafb9569be9617a6f27d3dc881fbee8fb56642f917a9"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
|
||||
@@ -9,10 +9,6 @@ use data_encoding::BASE64URL_NOPAD;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
fn bytes_size_helper(bytes: &Bytes) -> usize {
|
||||
bytes.len()
|
||||
}
|
||||
|
||||
macro_rules! byte_array_type {
|
||||
($visibility:vis $name:ident) => {
|
||||
|
||||
@@ -20,10 +16,9 @@ macro_rules! byte_array_type {
|
||||
///
|
||||
/// Serializes as a base64url-nopad string. Ordering, hashing, and equality are over the raw bytes.
|
||||
#[cfg_attr(all(target_arch = "wasm32", target_os = "unknown"), wasm_bindgen)]
|
||||
#[derive(Clone, Hash, Default, PartialOrd, Ord, PartialEq, Eq, GetSize)]
|
||||
#[derive(Clone, Hash, Default, PartialOrd, Ord, PartialEq, Eq)]
|
||||
#[must_use]
|
||||
$visibility struct $name {
|
||||
#[get_size(size_fn = bytes_size_helper)]
|
||||
bytes: Bytes,
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ macro_rules! impl_crypto_typed {
|
||||
pastey::paste! {
|
||||
|
||||
#[cfg_attr(all(target_arch = "wasm32", target_os = "unknown"), wasm_bindgen)]
|
||||
#[derive(Clone, PartialEq, Eq, Hash, GetSize)]
|
||||
#[derive(Clone, PartialEq, Eq, Hash)]
|
||||
#[must_use]
|
||||
$(#[$attr])*
|
||||
/// A value tagged with the `CryptoKind` of the cryptosystem it belongs to.
|
||||
|
||||
@@ -6,7 +6,7 @@ macro_rules! impl_crypto_typed_group {
|
||||
pastey::paste! {
|
||||
|
||||
#[cfg_attr(all(target_arch = "wasm32", target_os = "unknown"), wasm_bindgen)]
|
||||
#[derive(Clone, Debug, Serialize, Deserialize, PartialOrd, Ord, PartialEq, Eq, Hash, Default, GetSize)]
|
||||
#[derive(Clone, Debug, Serialize, Deserialize, PartialOrd, Ord, PartialEq, Eq, Hash, Default)]
|
||||
#[serde(from = "Vec<_>", into = "Vec<_>")]
|
||||
/// An ordered group of typed values holding at most one entry per `CryptoKind`.
|
||||
///
|
||||
|
||||
@@ -2,7 +2,7 @@ use super::*;
|
||||
|
||||
/// Untyped KEM encapsulation/decapsulation key pair, carrying no cryptosystem kind.
|
||||
#[cfg_attr(all(target_arch = "wasm32", target_os = "unknown"), wasm_bindgen)]
|
||||
#[derive(Clone, Default, Hash, PartialOrd, Ord, PartialEq, Eq, GetSize)]
|
||||
#[derive(Clone, Default, Hash, PartialOrd, Ord, PartialEq, Eq)]
|
||||
#[must_use]
|
||||
pub struct BareKemKeyPair {
|
||||
key: BareEncapsulationKey,
|
||||
|
||||
@@ -2,7 +2,7 @@ use super::*;
|
||||
|
||||
/// Untyped public/secret key pair, carrying no cryptosystem kind.
|
||||
#[cfg_attr(all(target_arch = "wasm32", target_os = "unknown"), wasm_bindgen)]
|
||||
#[derive(Clone, Default, Hash, PartialOrd, Ord, PartialEq, Eq, GetSize)]
|
||||
#[derive(Clone, Default, Hash, PartialOrd, Ord, PartialEq, Eq)]
|
||||
#[must_use]
|
||||
pub struct BareKeyPair {
|
||||
key: BarePublicKey,
|
||||
|
||||
@@ -2,7 +2,7 @@ use super::*;
|
||||
|
||||
/// Untyped DHT record key: an opaque record key with an optional record encryption secret.
|
||||
#[cfg_attr(all(target_arch = "wasm32", target_os = "unknown"), wasm_bindgen)]
|
||||
#[derive(Clone, Default, PartialOrd, Ord, PartialEq, Eq, Hash, GetSize)]
|
||||
#[derive(Clone, Default, PartialOrd, Ord, PartialEq, Eq, Hash)]
|
||||
#[must_use]
|
||||
pub struct BareRecordKey {
|
||||
key: BareOpaqueRecordKey,
|
||||
|
||||
@@ -207,7 +207,6 @@ use cfg_if::*;
|
||||
use enumset::*;
|
||||
use eyre::{bail, eyre, Report as EyreReport, Result as EyreResult, WrapErr};
|
||||
use futures_util::stream::{FuturesOrdered, FuturesUnordered, StreamExt as _};
|
||||
use get_size2::*;
|
||||
use indent::*;
|
||||
use macro_rules_attribute::apply;
|
||||
use macros::*;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
//! optional `#[api(...)]` parameter list immediately after it (consumed, never expanded).
|
||||
//! Base attrs are always emitted: Clone/Debug/Serialize/Deserialize, camelCase rename
|
||||
//! under `json-camel-case` (structs only), JsonSchema under `schemars`, `#[must_use]`.
|
||||
//! Params: `eq`, `copy`, `ord`, `hash`, `default`, `get_size`, `ts` (bare Tsify on wasm),
|
||||
//! Params: `eq`, `copy`, `ord`, `hash`, `default`, `ts` (bare Tsify on wasm),
|
||||
//! `ts(<args>)` (Tsify + `tsify(<args>)` verbatim). Extra one-off derives still work as
|
||||
//! a separate `#[derive(...)]` line after `#[api(...)]`.
|
||||
|
||||
@@ -24,9 +24,6 @@ macro_rules! api_data_struct {
|
||||
( @munch [default $(, $($rest:tt)*)?] [$($acc:tt)*] $($item:tt)* ) => {
|
||||
api_data_struct! { @munch [$($($rest)*)?] [$($acc)* #[derive(Default)]] $($item)* }
|
||||
};
|
||||
( @munch [get_size $(, $($rest:tt)*)?] [$($acc:tt)*] $($item:tt)* ) => {
|
||||
api_data_struct! { @munch [$($($rest)*)?] [$($acc)* #[derive(::get_size2::GetSize)]] $($item)* }
|
||||
};
|
||||
( @munch [ts($($tsargs:tt)*) $(, $($rest:tt)*)?] [$($acc:tt)*] $($item:tt)* ) => {
|
||||
api_data_struct! { @munch [$($($rest)*)?] [$($acc)*
|
||||
#[cfg_attr(
|
||||
@@ -97,9 +94,6 @@ macro_rules! api_data_enum {
|
||||
( @munch [default $(, $($rest:tt)*)?] [$($acc:tt)*] $($item:tt)* ) => {
|
||||
api_data_enum! { @munch [$($($rest)*)?] [$($acc)* #[derive(Default)]] $($item)* }
|
||||
};
|
||||
( @munch [get_size $(, $($rest:tt)*)?] [$($acc:tt)*] $($item:tt)* ) => {
|
||||
api_data_enum! { @munch [$($($rest)*)?] [$($acc)* #[derive(::get_size2::GetSize)]] $($item)* }
|
||||
};
|
||||
( @munch [ts($($tsargs:tt)*) $(, $($rest:tt)*)?] [$($acc:tt)*] $($item:tt)* ) => {
|
||||
api_data_enum! { @munch [$($($rest)*)?] [$($acc)*
|
||||
#[cfg_attr(
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use super::*;
|
||||
|
||||
/// Information about nodes that cache a local record remotely
|
||||
#[derive(Clone, Debug, Default, PartialEq, Eq, Serialize, Deserialize, GetSize)]
|
||||
#[derive(Clone, Debug, Default, PartialEq, Eq, Serialize, Deserialize)]
|
||||
pub(in crate::storage_manager) struct PerNodeRecordDetail {
|
||||
pub last_set: Timestamp,
|
||||
pub last_seen: Timestamp,
|
||||
@@ -10,14 +10,14 @@ pub(in crate::storage_manager) struct PerNodeRecordDetail {
|
||||
|
||||
/// A record's most recent transaction membership: the set it was committed with, plus the signer
|
||||
/// used (writer if write-opened, else the default signing keypair) so background transactions can be begun
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize, GetSize)]
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
|
||||
pub(in crate::storage_manager) struct TransactionMembership {
|
||||
pub record_set: Vec<OpaqueRecordKey>,
|
||||
pub operation_signer: KeyPair,
|
||||
}
|
||||
|
||||
/// Information required to handle locally opened records
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize, GetSize)]
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
|
||||
pub(in crate::storage_manager) struct LocalRecordDetail {
|
||||
/// The last 'safety selection' used when creating/opening this record.
|
||||
/// Even when closed, this safety selection applies to re-publication attempts by the system.
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
use super::*;
|
||||
|
||||
/// Parameters for creating an OutboundTransactionRecord
|
||||
#[derive(Clone, Debug, Serialize, Deserialize, GetSize)]
|
||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||
pub(in crate::storage_manager) struct OutboundTransactionRecordParams {
|
||||
/// The record key being transacted over
|
||||
pub record_key: RecordKey,
|
||||
|
||||
@@ -56,7 +56,7 @@ pub(super) struct RecordStoreUnlockedInner {
|
||||
|
||||
/// Record detail trait
|
||||
pub(super) trait RecordDetail:
|
||||
fmt::Debug + Clone + PartialEq + Eq + Serialize + for<'d> Deserialize<'d> + GetSize
|
||||
fmt::Debug + Clone + PartialEq + Eq + Serialize + for<'d> Deserialize<'d>
|
||||
{
|
||||
fn is_new(&self) -> bool;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use super::*;
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize, GetSize)]
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
|
||||
pub struct Record<D>
|
||||
where
|
||||
D: RecordDetail,
|
||||
|
||||
@@ -2,7 +2,7 @@ use futures_util::StreamExt as _;
|
||||
|
||||
use super::*;
|
||||
|
||||
#[derive(Clone, Debug, Serialize, Deserialize, GetSize)]
|
||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||
pub(in crate::storage_manager) struct RecordSnapshot {
|
||||
all_value_data: Vec<Option<Arc<SignedValueData>>>,
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use super::*;
|
||||
|
||||
#[derive(Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, GetSize)]
|
||||
#[derive(Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
|
||||
pub struct RecordTableKey {
|
||||
pub record_key: OpaqueRecordKey,
|
||||
}
|
||||
@@ -23,7 +23,7 @@ impl TryFrom<&[u8]> for RecordTableKey {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, GetSize)]
|
||||
#[derive(Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
|
||||
pub struct SubkeyTableKey {
|
||||
pub record_key: OpaqueRecordKey,
|
||||
pub subkey: ValueSubkey,
|
||||
@@ -34,6 +34,10 @@ impl fmt::Display for SubkeyTableKey {
|
||||
}
|
||||
}
|
||||
impl SubkeyTableKey {
|
||||
/// In-memory footprint, including the record key bytes
|
||||
pub fn total_size(&self) -> usize {
|
||||
mem::size_of::<Self>() + self.record_key.ref_value().len()
|
||||
}
|
||||
pub fn bytes(&self) -> Vec<u8> {
|
||||
let mut bytes = Vec::<_>::from(self.record_key.clone());
|
||||
bytes.extend_from_slice(&self.subkey.to_le_bytes());
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use super::*;
|
||||
|
||||
#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize, GetSize)]
|
||||
#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)]
|
||||
pub struct RecordData {
|
||||
signed_value_data: Arc<SignedValueData>,
|
||||
}
|
||||
@@ -15,4 +15,8 @@ impl RecordData {
|
||||
pub fn data_size(&self) -> usize {
|
||||
self.signed_value_data.data_size()
|
||||
}
|
||||
/// In-memory footprint, including the boxed signed value data
|
||||
pub fn total_size(&self) -> usize {
|
||||
mem::size_of::<Self>() + self.signed_value_data.total_size()
|
||||
}
|
||||
}
|
||||
@@ -1479,7 +1479,7 @@ where
|
||||
// we want to ensure that it is consistent at all costs
|
||||
let res = (|| {
|
||||
// Calculate the space requirements for the new record data
|
||||
let subkey_memsize = stk.get_size() + data.get_size();
|
||||
let subkey_memsize = stk.total_size() + data.total_size();
|
||||
let mut space = self.subkey_cache_space.modify().unwrap_or_log();
|
||||
space = self.add_to_subkey_cache_space(space, subkey_memsize)?;
|
||||
|
||||
@@ -1491,12 +1491,12 @@ where
|
||||
});
|
||||
|
||||
if let Some(lru_out) = opt_lru_out {
|
||||
let lru_memsize = lru_out.0.get_size() + lru_out.1.get_size();
|
||||
let lru_memsize = lru_out.0.total_size() + lru_out.1.total_size();
|
||||
space = self.sub_from_subkey_cache_space(space, lru_memsize)?;
|
||||
}
|
||||
|
||||
if let Some(prev_data) = &opt_prev_data {
|
||||
let prev_memsize = stk.get_size() + prev_data.get_size();
|
||||
let prev_memsize = stk.total_size() + prev_data.total_size();
|
||||
space = self.sub_from_subkey_cache_space(space, prev_memsize)?;
|
||||
}
|
||||
|
||||
@@ -1507,7 +1507,7 @@ where
|
||||
space
|
||||
);
|
||||
};
|
||||
let lru_memsize = dead_stk.get_size() + dead_data.get_size();
|
||||
let lru_memsize = dead_stk.total_size() + dead_data.total_size();
|
||||
space = self.sub_from_subkey_cache_space(space, lru_memsize)?;
|
||||
}
|
||||
|
||||
@@ -1541,7 +1541,7 @@ where
|
||||
let opt_data = self.subkey_cache.remove(stk);
|
||||
if let Some(data) = &opt_data {
|
||||
let mut space = self.subkey_cache_space.modify().unwrap_or_log();
|
||||
let subkey_memsize = stk.get_size() + data.get_size();
|
||||
let subkey_memsize = stk.total_size() + data.total_size();
|
||||
space = self.sub_from_subkey_cache_space(space, subkey_memsize)?;
|
||||
space.commit()?;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use super::*;
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize, GetSize)]
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
|
||||
pub struct RemoteRecordDetail {}
|
||||
|
||||
impl RecordDetail for RemoteRecordDetail {
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
use super::*;
|
||||
use data_encoding::BASE64URL_NOPAD;
|
||||
|
||||
#[derive(Clone, Eq, PartialEq, GetSize, Hash)]
|
||||
#[derive(Clone, Eq, PartialEq, Hash)]
|
||||
#[must_use]
|
||||
pub struct EncryptedValueData {
|
||||
// capnp struct ValueData encoded without packing
|
||||
#[get_size(size_fn = bytes_size_helper)]
|
||||
blob: Bytes,
|
||||
}
|
||||
|
||||
@@ -131,9 +130,10 @@ impl EncryptedValueData {
|
||||
reader.get_data().unwrap_or_log().len()
|
||||
}
|
||||
|
||||
/// In-memory footprint, including the capnp blob
|
||||
#[must_use]
|
||||
pub fn total_size(&self) -> usize {
|
||||
mem::size_of::<Self>() + self.data_size()
|
||||
mem::size_of::<Self>() + self.blob.len()
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
|
||||
@@ -2,7 +2,7 @@ use super::*;
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize, GetSize, Hash)]
|
||||
#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize, Hash)]
|
||||
pub struct SignedValueData {
|
||||
value_data: EncryptedValueData,
|
||||
signature: Signature,
|
||||
@@ -90,9 +90,11 @@ impl SignedValueData {
|
||||
self.value_data.data_size()
|
||||
}
|
||||
|
||||
/// In-memory footprint, including the value blob and signature bytes
|
||||
pub fn total_size(&self) -> usize {
|
||||
(mem::size_of::<Self>() - mem::size_of::<EncryptedValueData>())
|
||||
+ self.value_data.total_size()
|
||||
+ self.signature.ref_value().len()
|
||||
}
|
||||
|
||||
fn legacy_make_signature_bytes(
|
||||
|
||||
@@ -2,11 +2,10 @@ use super::*;
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#[derive(Clone, PartialOrd, PartialEq, Eq, Ord, Serialize, Deserialize, GetSize)]
|
||||
#[derive(Clone, PartialOrd, PartialEq, Eq, Ord, Serialize, Deserialize)]
|
||||
pub struct SignedValueDescriptor {
|
||||
#[serde(with = "public_key_try_untyped_vld0")]
|
||||
owner: PublicKey,
|
||||
#[get_size(size_fn = bytes_size_helper)]
|
||||
schema_data: Bytes,
|
||||
#[serde(with = "signature_try_untyped_vld0")]
|
||||
signature: Signature,
|
||||
|
||||
@@ -14,25 +14,35 @@ impl VeilidAPI {
|
||||
// Purging the local record store leaves the records on their storage nodes
|
||||
["record", "purge", "local"] => {
|
||||
let count = MockNetwork::with_node(&self.mock_key()?, |node| {
|
||||
let count = node.opened_records.len();
|
||||
let count = node.local_records.len();
|
||||
node.opened_records.clear();
|
||||
node.local_records.clear();
|
||||
node.offline_writes.clear();
|
||||
count
|
||||
})?;
|
||||
Ok(format!("purged {} local records", count))
|
||||
}
|
||||
// A mock node stores nothing for anyone else, so its remote record store is empty
|
||||
["record", "purge", "remote"] => {
|
||||
MockNetwork::with_node(&self.mock_key()?, |node| {
|
||||
node.opened_records.clear();
|
||||
})?;
|
||||
Ok("purged 0 remote records".to_owned())
|
||||
}
|
||||
["record", "purge", "remote"] => Ok("purged 0 remote records".to_owned()),
|
||||
["record", "list"] => {
|
||||
let keys = with_records(|records| {
|
||||
records.keys().map(|k| k.to_string()).collect::<Vec<_>>()
|
||||
});
|
||||
Ok(format!("{} records:\n{}", keys.len(), keys.join("\n")))
|
||||
}
|
||||
["record", "list", "local"] => {
|
||||
let keys = MockNetwork::with_node(&self.mock_key()?, |node| {
|
||||
node.local_records
|
||||
.keys()
|
||||
.map(|k| k.to_string())
|
||||
.collect::<Vec<_>>()
|
||||
})?;
|
||||
Ok(format!(
|
||||
"{} local records:\n{}",
|
||||
keys.len(),
|
||||
keys.join("\n")
|
||||
))
|
||||
}
|
||||
["nodeid"] => {
|
||||
let node_ids = MockNetwork::with_node(&self.mock_key()?, |node| {
|
||||
node.node_ids
|
||||
@@ -55,4 +65,5 @@ mock-api debug commands:
|
||||
record purge local close every record and drop this node's copies
|
||||
record purge remote no-op: a mock node holds no records for others
|
||||
record list list the mock network's records
|
||||
record list local list the records this node holds copies of
|
||||
nodeid show this node's ids";
|
||||
@@ -91,6 +91,11 @@ pub(crate) fn check_node_id(crypto: &Crypto, node_id: &NodeId) -> VeilidAPIResul
|
||||
pub(crate) struct MockNode {
|
||||
pub node_ids: Vec<NodeId>,
|
||||
pub opened_records: HashMap<OpaqueRecordKey, MockOpenedRecord>,
|
||||
/// This node's local record store, lagging the network until a get or set refreshes it.
|
||||
/// Persists across close and reopen as the real store does; only delete or a purge drops it.
|
||||
/// Keeping it separate from the shared store is what makes local and network sequence
|
||||
/// numbers in a report differ.
|
||||
pub local_records: HashMap<OpaqueRecordKey, HashMap<ValueSubkey, ValueData>>,
|
||||
/// Writes made while detached, waiting to reach the shared store. Kept outside
|
||||
/// [MockOpenedRecord] because the queue outlives a close.
|
||||
pub offline_writes: HashMap<OpaqueRecordKey, HashMap<ValueSubkey, ValueData>>,
|
||||
@@ -122,6 +127,7 @@ impl MockNetwork {
|
||||
let node = MockNode {
|
||||
node_ids,
|
||||
opened_records: HashMap::new(),
|
||||
local_records: HashMap::new(),
|
||||
offline_writes: HashMap::new(),
|
||||
attachment: MockAttachment::default(),
|
||||
tables: MockTableStore::default(),
|
||||
|
||||
@@ -23,12 +23,10 @@ static MOCK_RECORDS: LazyLock<Mutex<HashMap<OpaqueRecordKey, MockRecord>>> =
|
||||
/// How often a waiting flush rechecks, since nothing wakes it: there is no tick task under mock.
|
||||
const FLUSH_POLL_INTERVAL_MS: u32 = 100;
|
||||
|
||||
/// A record this node has opened.
|
||||
/// A record this node has opened. The node's copy of the values lives in
|
||||
/// [MockNode::local_records], which outlives the open.
|
||||
pub(crate) struct MockOpenedRecord {
|
||||
pub writer: Option<KeyPair>,
|
||||
/// This node's cached copy, which lags the network until a get or set refreshes it. Keeping it
|
||||
/// separate is what makes the local and network sequence numbers in a report differ.
|
||||
pub local: HashMap<ValueSubkey, ValueData>,
|
||||
}
|
||||
|
||||
/// Read from the shared DHT.
|
||||
@@ -59,13 +57,36 @@ impl MockNode {
|
||||
fn opened(&self, record_key: &RecordKey) -> VeilidAPIResult<&MockOpenedRecord> {
|
||||
self.opened_records
|
||||
.get(&record_key.opaque())
|
||||
.ok_or_else(|| VeilidAPIError::generic("record not open"))
|
||||
.ok_or_else(|| {
|
||||
VeilidAPIError::invalid_argument(
|
||||
"record not open",
|
||||
"record_key",
|
||||
record_key.opaque(),
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
fn opened_mut(&mut self, record_key: &RecordKey) -> VeilidAPIResult<&mut MockOpenedRecord> {
|
||||
self.opened_records
|
||||
.get_mut(&record_key.opaque())
|
||||
.ok_or_else(|| VeilidAPIError::generic("record not open"))
|
||||
pub(crate) fn local_value(
|
||||
&self,
|
||||
record_key: &RecordKey,
|
||||
subkey: ValueSubkey,
|
||||
) -> Option<ValueData> {
|
||||
self.local_records
|
||||
.get(&record_key.opaque())
|
||||
.and_then(|m| m.get(&subkey))
|
||||
.cloned()
|
||||
}
|
||||
|
||||
pub(crate) fn set_local_value(
|
||||
&mut self,
|
||||
record_key: &RecordKey,
|
||||
subkey: ValueSubkey,
|
||||
value: ValueData,
|
||||
) {
|
||||
self.local_records
|
||||
.entry(record_key.opaque())
|
||||
.or_default()
|
||||
.insert(subkey, value);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -110,9 +131,10 @@ impl VeilidAPI {
|
||||
record_key.opaque(),
|
||||
MockOpenedRecord {
|
||||
writer: Some(owner.clone()),
|
||||
local: HashMap::new(),
|
||||
},
|
||||
)
|
||||
);
|
||||
// The local store holds a record from the moment it is created, values or not
|
||||
node.local_records.entry(record_key.opaque()).or_default();
|
||||
})?;
|
||||
|
||||
Ok(DHTRecordDescriptor::new(
|
||||
@@ -150,11 +172,10 @@ impl VeilidAPI {
|
||||
MockNetwork::with_node(&self.mock_key()?, |node| {
|
||||
node.opened_records
|
||||
.entry(record_key.opaque())
|
||||
.or_insert_with(|| MockOpenedRecord {
|
||||
writer: None,
|
||||
local: HashMap::new(),
|
||||
})
|
||||
.or_insert_with(|| MockOpenedRecord { writer: None })
|
||||
.writer = default_writer;
|
||||
// The local store holds a record from the moment it is opened, values or not
|
||||
node.local_records.entry(record_key.opaque()).or_default();
|
||||
})?;
|
||||
|
||||
Ok(DHTRecordDescriptor::new(
|
||||
@@ -171,24 +192,30 @@ impl VeilidAPI {
|
||||
node.opened_records
|
||||
.remove(&record_key.opaque())
|
||||
.map(|_| ())
|
||||
.ok_or_else(|| VeilidAPIError::generic("record not open"))
|
||||
.ok_or_else(|| {
|
||||
VeilidAPIError::invalid_argument(
|
||||
"record not open",
|
||||
"record_key",
|
||||
record_key.opaque(),
|
||||
)
|
||||
})
|
||||
})?
|
||||
}
|
||||
|
||||
/// Drop this node's copy of a record. The shared DHT keeps its own, as the network would.
|
||||
///
|
||||
/// Scoped to the local store like the real delete: a record this node no longer holds is
|
||||
/// `KeyNotFound` even though the network still has it.
|
||||
pub(crate) fn mock_delete_dht_record(&self, record_key: RecordKey) -> VeilidAPIResult<()> {
|
||||
// Deleting an open record closes it first rather than refusing
|
||||
MockNetwork::with_node(&self.mock_key()?, |node| {
|
||||
node.opened_records.remove(&record_key.opaque());
|
||||
node.offline_writes.remove(&record_key.opaque());
|
||||
})?;
|
||||
|
||||
with_records(|records| {
|
||||
records
|
||||
.get(&record_key.opaque())
|
||||
node.local_records
|
||||
.remove(&record_key.opaque())
|
||||
.map(|_| ())
|
||||
.ok_or_else(|| VeilidAPIError::key_not_found(record_key.opaque()))
|
||||
})
|
||||
})?
|
||||
}
|
||||
|
||||
/// The subkeys of a record this node still owes the network.
|
||||
@@ -248,7 +275,7 @@ impl VeilidAPI {
|
||||
})?;
|
||||
|
||||
if !changed.is_empty() {
|
||||
report_value_change(record_key, key, &changed);
|
||||
report_value_change(record_key, &changed);
|
||||
}
|
||||
Ok(true)
|
||||
}
|
||||
@@ -300,8 +327,8 @@ impl VeilidAPI {
|
||||
) -> VeilidAPIResult<Option<ValueData>> {
|
||||
let key = self.mock_key()?;
|
||||
let cached = MockNetwork::with_node(&key, |node| {
|
||||
node.opened(&record_key)
|
||||
.map(|o| o.local.get(&subkey).cloned())
|
||||
node.opened(&record_key)?;
|
||||
VeilidAPIResult::Ok(node.local_value(&record_key, subkey))
|
||||
})??;
|
||||
|
||||
if !force_refresh {
|
||||
@@ -326,9 +353,7 @@ impl VeilidAPI {
|
||||
|
||||
if let Some(value) = value.clone() {
|
||||
MockNetwork::with_node(&key, |node| {
|
||||
if let Ok(opened) = node.opened_mut(&record_key) {
|
||||
opened.local.insert(subkey, value);
|
||||
}
|
||||
node.set_local_value(&record_key, subkey, value);
|
||||
})?;
|
||||
}
|
||||
Ok(value)
|
||||
@@ -352,8 +377,8 @@ impl VeilidAPI {
|
||||
let options = options.unwrap_or_default();
|
||||
|
||||
let (default_writer, cached) = MockNetwork::with_node(&key, |node| {
|
||||
node.opened(&record_key)
|
||||
.map(|o| (o.writer.clone(), o.local.get(&subkey).cloned()))
|
||||
let writer = node.opened(&record_key)?.writer.clone();
|
||||
VeilidAPIResult::Ok((writer, node.local_value(&record_key, subkey)))
|
||||
})??;
|
||||
let Some(writer) = options.writer.clone().or(default_writer) else {
|
||||
apibail_generic!("value is not writable");
|
||||
@@ -370,9 +395,14 @@ impl VeilidAPI {
|
||||
VeilidAPIResult::Ok((record.owner.clone(), record.schema.clone()))
|
||||
})?;
|
||||
|
||||
// Schema authorization, shared with the real implementation
|
||||
// Schema authorization, shared with the real implementation; refused with the same
|
||||
// wording as the real set path so callers can classify the failure
|
||||
let crypto = self.crypto()?;
|
||||
check_subkey_value_data(&crypto, &schema, &owner, subkey, &writer.key(), data.len())?;
|
||||
if check_subkey_value_data(&crypto, &schema, &owner, subkey, &writer.key(), data.len())
|
||||
.is_err()
|
||||
{
|
||||
apibail_generic!("failed schema validation: {}:{}", record_key, subkey);
|
||||
}
|
||||
|
||||
let min_seqnum = options.min_seqnum.unwrap_or(ValueSeqNum::NONE);
|
||||
|
||||
@@ -405,9 +435,7 @@ impl VeilidAPI {
|
||||
apibail_try_again!("offline, try again later");
|
||||
}
|
||||
MockNetwork::with_node(&key, |node| {
|
||||
if let Ok(opened) = node.opened_mut(&record_key) {
|
||||
opened.local.insert(subkey, incoming.clone());
|
||||
}
|
||||
node.set_local_value(&record_key, subkey, incoming.clone());
|
||||
node.offline_writes
|
||||
.entry(record_key.opaque())
|
||||
.or_default()
|
||||
@@ -444,24 +472,20 @@ impl VeilidAPI {
|
||||
match result {
|
||||
SetOutcome::Accepted { value, changed } => {
|
||||
MockNetwork::with_node(&key, |node| {
|
||||
if let Ok(opened) = node.opened_mut(&record_key) {
|
||||
opened.local.insert(subkey, value);
|
||||
}
|
||||
node.set_local_value(&record_key, subkey, value);
|
||||
// This write superseded whatever was queued for the subkey
|
||||
if let Some(pending) = node.offline_writes.get_mut(&record_key.opaque()) {
|
||||
pending.remove(&subkey);
|
||||
}
|
||||
})?;
|
||||
if changed {
|
||||
report_value_change(&record_key, key, &ValueSubkeyRangeSet::single(subkey));
|
||||
report_value_change(&record_key, &ValueSubkeyRangeSet::single(subkey));
|
||||
}
|
||||
Ok(None)
|
||||
}
|
||||
SetOutcome::Superseded(existing) => {
|
||||
MockNetwork::with_node(&key, |node| {
|
||||
if let Ok(opened) = node.opened_mut(&record_key) {
|
||||
opened.local.insert(subkey, existing.clone());
|
||||
}
|
||||
node.set_local_value(&record_key, subkey, existing.clone());
|
||||
})?;
|
||||
Ok(Some(existing))
|
||||
}
|
||||
@@ -496,14 +520,14 @@ impl VeilidAPI {
|
||||
let offline_subkeys = self.mock_offline_subkeys(&record_key)?.intersect(&subkeys);
|
||||
|
||||
let local_seqs = MockNetwork::with_node(&key, |node| {
|
||||
let opened = node.opened(&record_key)?;
|
||||
node.opened(&record_key)?;
|
||||
let local = node.local_records.get(&record_key.opaque());
|
||||
VeilidAPIResult::Ok(
|
||||
subkeys
|
||||
.iter()
|
||||
.map(|sk| {
|
||||
opened
|
||||
.local
|
||||
.get(&sk)
|
||||
local
|
||||
.and_then(|m| m.get(&sk))
|
||||
.map(|v| v.seq())
|
||||
.unwrap_or(ValueSeqNum::NONE)
|
||||
})
|
||||
|
||||
@@ -25,7 +25,6 @@ struct MockTransactionRecord {
|
||||
|
||||
/// A transaction staging writes until commit.
|
||||
struct MockTransaction {
|
||||
holder: MockNodeKey,
|
||||
records: Vec<MockTransactionRecord>,
|
||||
/// Writes waiting for commit, invisible to every other transaction until then
|
||||
staged: HashMap<(OpaqueRecordKey, ValueSubkey), ValueData>,
|
||||
@@ -132,7 +131,6 @@ impl VeilidAPI {
|
||||
txns.insert(
|
||||
txid,
|
||||
MockTransaction {
|
||||
holder: key,
|
||||
records,
|
||||
staged: HashMap::new(),
|
||||
reads: HashMap::new(),
|
||||
@@ -246,10 +244,18 @@ impl VeilidAPI {
|
||||
})?;
|
||||
|
||||
let (default_writer, cached) = MockNetwork::with_node(&key, |node| {
|
||||
node.opened_records
|
||||
let writer = node
|
||||
.opened_records
|
||||
.get(&record_key.opaque())
|
||||
.map(|o| (o.writer.clone(), o.local.get(&subkey).cloned()))
|
||||
.ok_or_else(|| VeilidAPIError::generic("record not open"))
|
||||
.map(|o| o.writer.clone())
|
||||
.ok_or_else(|| {
|
||||
VeilidAPIError::invalid_argument(
|
||||
"record not open",
|
||||
"record_key",
|
||||
record_key.opaque(),
|
||||
)
|
||||
})?;
|
||||
VeilidAPIResult::Ok((writer, node.local_value(&record_key, subkey)))
|
||||
})??;
|
||||
let Some(writer) = options.writer.clone().or(default_writer) else {
|
||||
apibail_generic!("value is not writable");
|
||||
@@ -261,8 +267,13 @@ impl VeilidAPI {
|
||||
.map(|r| (r.owner.clone(), r.schema.clone()))
|
||||
.ok_or_else(|| VeilidAPIError::key_not_found(record_key.opaque()))
|
||||
})?;
|
||||
// Refused with the same wording as the real set path so callers can classify the failure
|
||||
let crypto = self.crypto()?;
|
||||
check_subkey_value_data(&crypto, &schema, &owner, subkey, &writer.key(), data.len())?;
|
||||
if check_subkey_value_data(&crypto, &schema, &owner, subkey, &writer.key(), data.len())
|
||||
.is_err()
|
||||
{
|
||||
apibail_generic!("failed schema validation: {}:{}", record_key, subkey);
|
||||
}
|
||||
|
||||
with_transactions(|txns| {
|
||||
let tx = txns.get_mut(&handle.txid).ok_or_else(not_found)?;
|
||||
@@ -280,10 +291,17 @@ impl VeilidAPI {
|
||||
.as_ref()
|
||||
.is_some_and(|b| b.data() == data.as_slice() && b.ref_writer() == &writer.key());
|
||||
|
||||
// No floor-reuse arm here: an identical retry is handled above, and new bytes
|
||||
// under a reused number is exactly what a storage node refuses
|
||||
let mut seq = match base.as_ref().map(|b| b.seq()) {
|
||||
None => ValueSeqNum::ZERO,
|
||||
Some(last) if identical => last,
|
||||
Some(last) => last.next()?,
|
||||
Some(last) => match last.next() {
|
||||
Ok(next) => next,
|
||||
Err(_) => {
|
||||
apibail_generic!("sequence number at max: {}:{}", record_key, subkey);
|
||||
}
|
||||
},
|
||||
};
|
||||
if min_seqnum.is_some() && seq < min_seqnum {
|
||||
seq = min_seqnum;
|
||||
@@ -386,12 +404,12 @@ impl VeilidAPI {
|
||||
// Local must stay distinct from network, or a watcher could never see it fall behind
|
||||
let key = self.mock_key()?;
|
||||
let local_seqs: Vec<ValueSeqNum> = MockNetwork::with_node(&key, |node| {
|
||||
let opened = node.opened_records.get(&record_key.opaque());
|
||||
let local = node.local_records.get(&record_key.opaque());
|
||||
subkeys
|
||||
.iter()
|
||||
.map(|sk| {
|
||||
opened
|
||||
.and_then(|o| o.local.get(&sk))
|
||||
local
|
||||
.and_then(|m| m.get(&sk))
|
||||
.map(|v| v.seq())
|
||||
.unwrap_or(ValueSeqNum::NONE)
|
||||
})
|
||||
@@ -463,16 +481,17 @@ impl VeilidAPI {
|
||||
|
||||
for r in &tx.records {
|
||||
if let Some(subkeys) = changed.get(&r.record_key.opaque()) {
|
||||
report_value_change(&r.record_key, tx.holder, subkeys);
|
||||
report_value_change(&r.record_key, subkeys);
|
||||
}
|
||||
}
|
||||
|
||||
// The committing node's own cache follows its writes
|
||||
MockNetwork::with_node(&key, |node| {
|
||||
for ((opaque, subkey), value) in tx.reads.iter().chain(tx.staged.iter()) {
|
||||
if let Some(opened) = node.opened_records.get_mut(opaque) {
|
||||
opened.local.insert(*subkey, value.clone());
|
||||
}
|
||||
node.local_records
|
||||
.entry(opaque.clone())
|
||||
.or_default()
|
||||
.insert(*subkey, value.clone());
|
||||
}
|
||||
})?;
|
||||
Ok(())
|
||||
|
||||
@@ -115,7 +115,6 @@ impl VeilidAPI {
|
||||
fn take_changes(
|
||||
records: &mut HashMap<OpaqueRecordKey, MockRecord>,
|
||||
record_key: &RecordKey,
|
||||
writer: MockNodeKey,
|
||||
changed: &ValueSubkeyRangeSet,
|
||||
) -> Vec<PendingChange> {
|
||||
let Some(record) = records.get_mut(&record_key.opaque()) else {
|
||||
@@ -134,10 +133,9 @@ fn take_changes(
|
||||
|
||||
let mut pending = Vec::new();
|
||||
for watch in &mut record.watches {
|
||||
// The writer does not hear its own change, matching ExcludeTarget on the real path
|
||||
if watch.watcher == writer {
|
||||
continue;
|
||||
}
|
||||
// The writer hears its own change too: the real ExcludeTarget compares the set's sender
|
||||
// against the watch's target, and app watches register over private routes, so a node
|
||||
// watching through a route is notified of its own node's writes
|
||||
let reportable = watch.subkeys.intersect(changed);
|
||||
if reportable.is_empty() {
|
||||
continue;
|
||||
@@ -189,13 +187,9 @@ fn take_changes(
|
||||
pending
|
||||
}
|
||||
|
||||
/// Report a committed change to every watcher but the writer.
|
||||
pub(crate) fn report_value_change(
|
||||
record_key: &RecordKey,
|
||||
writer: MockNodeKey,
|
||||
changed: &ValueSubkeyRangeSet,
|
||||
) {
|
||||
let pending = with_records(|records| take_changes(records, record_key, writer, changed));
|
||||
/// Report a committed change to every watcher, the writer included.
|
||||
pub(crate) fn report_value_change(record_key: &RecordKey, changed: &ValueSubkeyRangeSet) {
|
||||
let pending = with_records(|records| take_changes(records, record_key, changed));
|
||||
|
||||
// Delivered outside the record lock: a callback may re-enter the API
|
||||
for p in pending {
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
use super::*;
|
||||
|
||||
pub(crate) fn bytes_size_helper(bytes: &Bytes) -> usize {
|
||||
std::mem::size_of::<Bytes>() + bytes.len()
|
||||
}
|
||||
@@ -2,7 +2,6 @@ use super::*;
|
||||
use core::fmt::Debug;
|
||||
|
||||
mod compression;
|
||||
mod get_size_helpers;
|
||||
/// serde `with`-module that (de)serializes an `Arc<T>` transparently as its inner `T`.
|
||||
pub mod serialize_arc;
|
||||
/// serde `with`-module that (de)serializes a `HashMap<K, V>` as a sequence of `(key, value)` pairs.
|
||||
@@ -13,6 +12,5 @@ pub mod serialize_range_set_blaze;
|
||||
mod serialize_untyped_vld0;
|
||||
|
||||
pub(crate) use compression::*;
|
||||
pub(crate) use get_size_helpers::*;
|
||||
pub use serialize_json::*;
|
||||
pub use serialize_untyped_vld0::*;
|
||||
@@ -8,17 +8,7 @@ use super::*;
|
||||
macro_rules! aligned_u64_type {
|
||||
($name:ident) => {
|
||||
#[derive(
|
||||
Clone,
|
||||
Default,
|
||||
PartialEq,
|
||||
Eq,
|
||||
PartialOrd,
|
||||
Ord,
|
||||
Copy,
|
||||
Hash,
|
||||
Serialize,
|
||||
Deserialize,
|
||||
GetSize,
|
||||
Clone, Default, PartialEq, Eq, PartialOrd, Ord, Copy, Hash, Serialize, Deserialize,
|
||||
)]
|
||||
#[cfg_attr(feature = "schemars", derive(JsonSchema))]
|
||||
#[cfg_attr(
|
||||
|
||||
@@ -4,7 +4,7 @@ use super::*;
|
||||
|
||||
/// Atomic wrapper for optional timestamps used in structs so we can avoid locks
|
||||
/// for LRU and similar operations
|
||||
#[derive(Debug, Default, Serialize, Deserialize, GetSize)]
|
||||
#[derive(Debug, Default, Serialize, Deserialize)]
|
||||
#[serde(from = "Option<Timestamp>", into = "Option<Timestamp>")]
|
||||
#[must_use]
|
||||
pub struct AtomicOptionTimestamp(AtomicU64);
|
||||
|
||||
@@ -4,7 +4,7 @@ use super::*;
|
||||
|
||||
/// Atomic wrapper for timestamps used in structs so we can avoid locks
|
||||
/// for LRU and similar operations
|
||||
#[derive(Debug, Default, Serialize, Deserialize, GetSize)]
|
||||
#[derive(Debug, Default, Serialize, Deserialize)]
|
||||
#[serde(from = "Timestamp", into = "Timestamp")]
|
||||
#[must_use]
|
||||
pub struct AtomicTimestamp(AtomicU64);
|
||||
|
||||
@@ -3,7 +3,7 @@ use core::ops::{Deref, DerefMut};
|
||||
use range_set_blaze::*;
|
||||
|
||||
/// A set of DHT subkeys stored as inclusive ranges of [ValueSubkey]
|
||||
#[derive(Clone, Default, Hash, PartialOrd, PartialEq, Eq, Ord, Serialize, Deserialize, GetSize)]
|
||||
#[derive(Clone, Default, Hash, PartialOrd, PartialEq, Eq, Ord, Serialize, Deserialize)]
|
||||
#[cfg_attr(feature = "schemars", derive(JsonSchema))]
|
||||
#[cfg_attr(
|
||||
all(target_arch = "wasm32", target_os = "unknown"),
|
||||
@@ -19,7 +19,6 @@ pub struct ValueSubkeyRangeSet {
|
||||
all(target_arch = "wasm32", target_os = "unknown"),
|
||||
tsify(type = "Array<[ValueSubkey, ValueSubkey]>")
|
||||
)]
|
||||
#[get_size(size_fn = range_set_blaze_size_helper)]
|
||||
data: RangeSetBlaze<ValueSubkey>,
|
||||
}
|
||||
|
||||
@@ -189,7 +188,3 @@ impl fmt::Display for ValueSubkeyRangeSet {
|
||||
write!(f, "{}", self.data)
|
||||
}
|
||||
}
|
||||
|
||||
fn range_set_blaze_size_helper<T: range_set_blaze::Integer>(rsb: &RangeSetBlaze<T>) -> usize {
|
||||
size_of::<T>() * 2 * rsb.ranges_len()
|
||||
}
|
||||
@@ -2,7 +2,7 @@ use super::*;
|
||||
|
||||
/// The state of a timestamp, either live (not expired) or dead (expired)
|
||||
#[apply(api_data_enum!)]
|
||||
#[api(eq, copy, hash, default, get_size)]
|
||||
#[api(eq, copy, hash, default)]
|
||||
pub enum ExpirationState {
|
||||
/// Not expired.
|
||||
#[default]
|
||||
|
||||
@@ -15,7 +15,6 @@ macro_rules! fourcc_type {
|
||||
Eq,
|
||||
Serialize,
|
||||
Deserialize,
|
||||
GetSize,
|
||||
)]
|
||||
#[cfg_attr(feature = "schemars", derive(JsonSchema))]
|
||||
#[serde(try_from = "String", into = "String")]
|
||||
|
||||
@@ -13,7 +13,6 @@ use super::*;
|
||||
ord,
|
||||
hash,
|
||||
default,
|
||||
get_size,
|
||||
ts(from_wasm_abi, into_wasm_abi, namespace)
|
||||
)]
|
||||
// Ordering here matters, >= is used to check strength of sequencing requirement
|
||||
@@ -180,7 +179,6 @@ pub type SequenceOrderingSet = EnumSet<SequenceOrdering>;
|
||||
ord,
|
||||
hash,
|
||||
default,
|
||||
get_size,
|
||||
ts(from_wasm_abi, into_wasm_abi, namespace)
|
||||
)]
|
||||
// Ordering here matters, >= is used to check strength of stability requirement
|
||||
@@ -229,7 +227,7 @@ impl FromStr for Stability {
|
||||
/// * `SafetySelection::Unsafe`: don't use a safety route, only specify the sequencing preference
|
||||
/// * `SafetySelection::Safe`: use a safety route and parameters specified by a SafetySpec.
|
||||
#[apply(api_data_enum!)]
|
||||
#[api(eq, ord, hash, get_size)]
|
||||
#[api(eq, ord, hash)]
|
||||
pub enum SafetySelection {
|
||||
/// Don't use a safety route, only specify the sequencing preference.
|
||||
Unsafe(Sequencing),
|
||||
@@ -265,7 +263,7 @@ impl fmt::Display for SafetySelection {
|
||||
|
||||
/// Options for safety routes (sender privacy).
|
||||
#[apply(api_data_struct!)]
|
||||
#[api(eq, ord, hash, default, get_size)]
|
||||
#[api(eq, ord, hash, default)]
|
||||
pub struct SafetySpec {
|
||||
/// Preferred safety route set id if it still exists.
|
||||
#[cfg_attr(feature = "schemars", schemars(with = "Option<String>"))]
|
||||
@@ -319,7 +317,7 @@ impl fmt::Display for SafetySpec {
|
||||
|
||||
/// Options for private routes (receiver privacy).
|
||||
#[apply(api_data_struct!)]
|
||||
#[api(eq, ord, hash, default, get_size)]
|
||||
#[api(eq, ord, hash, default)]
|
||||
pub struct PrivateSpec {
|
||||
/// Empty value here will use all the available crypto kinds
|
||||
#[serde(default)]
|
||||
|
||||
@@ -1,20 +1,36 @@
|
||||
// Builds veilid-flutter/rust as the code asset lib/veilid_ffi.dart resolves against.
|
||||
// `assetName` below and that file's @DefaultAsset must move together.
|
||||
|
||||
import 'dart:convert';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:code_assets/code_assets.dart';
|
||||
import 'package:hooks/hooks.dart';
|
||||
import 'package:native_toolchain_rust/native_toolchain_rust.dart';
|
||||
|
||||
/// Cargo features a consuming app selects for this build, read from
|
||||
/// `.dart_tool/veilid_build_config.json` under that app.
|
||||
///
|
||||
/// `.dart_tool` is gitignored in every Dart project, so a test run can select a
|
||||
/// feature set without touching a tracked file, and an ordinary app build -
|
||||
/// which never writes one - gets the default. It has to be a file rather than an
|
||||
/// environment variable or a `--define`: hooks run under a fixed environment
|
||||
/// allowlist, and user-defines reach a hook only from the workspace pubspec,
|
||||
/// which the app shares with its own release builds.
|
||||
const _configFileName = 'veilid_build_config.json';
|
||||
|
||||
void main(List<String> args) async {
|
||||
await build(args, (input, output) async {
|
||||
if (!input.config.buildCodeAssets) {
|
||||
return;
|
||||
}
|
||||
final selection = _featureSelection(input, output);
|
||||
await RustBuilder(
|
||||
assetName: 'veilid_ffi.dart',
|
||||
cratePath: 'rust',
|
||||
buildMode: _buildMode(input),
|
||||
features: _features(input),
|
||||
features: selection.features,
|
||||
enableDefaultFeatures: selection.defaultFeatures,
|
||||
).run(input: input, output: output);
|
||||
});
|
||||
}
|
||||
@@ -24,9 +40,65 @@ void main(List<String> args) async {
|
||||
BuildMode _buildMode(BuildInput input) =>
|
||||
input.config.linkingEnabled ? BuildMode.release : BuildMode.debug;
|
||||
|
||||
// Hooks run under a fixed environment allowlist, so features cannot come from the
|
||||
// environment; the root app declares them under `hooks: user_defines: veilid:`.
|
||||
List<String> _features(BuildInput input) {
|
||||
typedef _FeatureSelection = ({List<String> features, bool defaultFeatures});
|
||||
|
||||
/// The config file wins over pubspec user-defines, which stay supported for an
|
||||
/// app that wants one fixed feature set for every build.
|
||||
_FeatureSelection _featureSelection(BuildInput input, BuildOutputBuilder output) {
|
||||
final configFile = _configFile(input);
|
||||
if (configFile != null) {
|
||||
// Declared whether or not it exists, so writing one re-runs this hook rather
|
||||
// than serving the previous build's library
|
||||
output.dependencies.add(configFile.uri);
|
||||
final fromFile = _readConfig(configFile);
|
||||
if (fromFile != null) {
|
||||
return fromFile;
|
||||
}
|
||||
}
|
||||
return (features: _userDefineFeatures(input), defaultFeatures: true);
|
||||
}
|
||||
|
||||
/// Where the consuming app would put its config, derived from the hook's own
|
||||
/// output directory because that is the only path a hook is handed inside it.
|
||||
File? _configFile(BuildInput input) {
|
||||
final segments = input.outputDirectoryShared.pathSegments;
|
||||
final dartTool = segments.lastIndexOf('.dart_tool');
|
||||
if (dartTool < 0) {
|
||||
return null;
|
||||
}
|
||||
return File.fromUri(
|
||||
input.outputDirectoryShared.replace(
|
||||
pathSegments: [...segments.take(dartTool + 1), _configFileName],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
/// Null when there is no usable config, so the caller falls back rather than
|
||||
/// building something the app did not ask for
|
||||
_FeatureSelection? _readConfig(File configFile) {
|
||||
if (!configFile.existsSync()) {
|
||||
return null;
|
||||
}
|
||||
final Object? decoded;
|
||||
try {
|
||||
decoded = jsonDecode(configFile.readAsStringSync());
|
||||
} on FormatException catch (e) {
|
||||
throw StateError('$_configFileName is not valid JSON: $e');
|
||||
}
|
||||
if (decoded is! Map<String, Object?>) {
|
||||
throw StateError('$_configFileName must hold a JSON object');
|
||||
}
|
||||
final features = decoded['features'];
|
||||
final defaultFeatures = decoded['default_features'];
|
||||
return (
|
||||
features: features is List ? features.cast<String>() : const <String>[],
|
||||
// Absent means the ordinary build; a feature set that conflicts with the
|
||||
// defaults has to say so, the way mock-api does against stats
|
||||
defaultFeatures: defaultFeatures is bool ? defaultFeatures : true,
|
||||
);
|
||||
}
|
||||
|
||||
List<String> _userDefineFeatures(BuildInput input) {
|
||||
final features = input.userDefines['features'];
|
||||
if (features is! List) {
|
||||
return const <String>[];
|
||||
|
||||
@@ -86,16 +86,35 @@ sealed class EncodedString extends Equatable {
|
||||
final String contents;
|
||||
|
||||
EncodedString._fromBytes(Uint8List bytes)
|
||||
: contents = base64UrlNoPadEncode(bytes);
|
||||
: contents = base64UrlNoPadEncode(bytes) {
|
||||
_rejectEmpty();
|
||||
}
|
||||
|
||||
EncodedString._fromString(String s) : contents = s {
|
||||
// Ensure things can be decoded, will throw an exception if it fails
|
||||
base64UrlNoPadDecode(contents);
|
||||
_rejectEmpty();
|
||||
}
|
||||
|
||||
EncodedString._fromJson(dynamic json) : contents = json as String {
|
||||
// Ensure things can be decoded, will throw an exception if it fails
|
||||
base64UrlNoPadDecode(contents);
|
||||
_rejectEmpty();
|
||||
}
|
||||
|
||||
/// No crypto value has a zero-length form, so one is a construction that went
|
||||
/// wrong upstream rather than a value to carry.
|
||||
///
|
||||
/// Refused HERE rather than where such a value is used, because the type is
|
||||
/// the invariant: an unset protobuf field decodes to empty bytes, and the
|
||||
/// object that produces is well-typed, encodes without complaint as
|
||||
/// `<kind>:`, and only fails at the FFI - where the argument is parsed in
|
||||
/// Rust and a failure there is a process panic, not a Dart exception anyone
|
||||
/// can catch.
|
||||
void _rejectEmpty() {
|
||||
if (contents.isEmpty) {
|
||||
throw FormatException('$runtimeType has no value', contents);
|
||||
}
|
||||
}
|
||||
|
||||
/// Encodes the value as its base64url JSON string.
|
||||
|
||||
Generated
+2
-132
@@ -370,36 +370,6 @@ version = "1.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0"
|
||||
|
||||
[[package]]
|
||||
name = "attribute-derive"
|
||||
version = "0.10.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "05832cdddc8f2650cc2cc187cc2e952b8c133a48eb055f35211f61ee81502d77"
|
||||
dependencies = [
|
||||
"attribute-derive-macro",
|
||||
"derive-where",
|
||||
"manyhow",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.119",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "attribute-derive-macro"
|
||||
version = "0.10.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0a7cdbbd4bd005c5d3e2e9c885e6fa575db4f4a3572335b974d8db853b6beb61"
|
||||
dependencies = [
|
||||
"collection_literals",
|
||||
"interpolator",
|
||||
"manyhow",
|
||||
"proc-macro-utils",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"quote-use",
|
||||
"syn 2.0.119",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "autocfg"
|
||||
version = "1.5.1"
|
||||
@@ -720,12 +690,6 @@ version = "0.5.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0c9ea0ac24bc397ab3c98583a3c9ba74fa56b09a4449bbe172b9b1ddb016027a"
|
||||
|
||||
[[package]]
|
||||
name = "collection_literals"
|
||||
version = "1.0.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2550f75b8cfac212855f6b1885455df8eaee8fe8e246b647d69146142e016084"
|
||||
|
||||
[[package]]
|
||||
name = "colorchoice"
|
||||
version = "1.0.5"
|
||||
@@ -988,17 +952,6 @@ version = "0.5.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c"
|
||||
|
||||
[[package]]
|
||||
name = "derive-where"
|
||||
version = "1.6.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d08b3a0bcc0d079199cd476b2cae8435016ec11d1c0986c6901c5ac223041534"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.119",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "digest"
|
||||
version = "0.10.7"
|
||||
@@ -1422,26 +1375,6 @@ dependencies = [
|
||||
"version_check",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "get-size-derive2"
|
||||
version = "0.10.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c736d226c32e496b8377813b52269e11ad3a48d8373b68862d0364f04fd1229d"
|
||||
dependencies = [
|
||||
"attribute-derive",
|
||||
"quote",
|
||||
"syn 2.0.119",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "get-size2"
|
||||
version = "0.10.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b411f34418305908ab15a82ff78958c2a9aee9a272b2a2e663836b20a4e4b9d3"
|
||||
dependencies = [
|
||||
"get-size-derive2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "getrandom"
|
||||
version = "0.2.17"
|
||||
@@ -1840,12 +1773,6 @@ dependencies = [
|
||||
"hybrid-array",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "interpolator"
|
||||
version = "0.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "71dd52191aae121e8611f1e8dc3e324dd0dd1dee1e6dd91d10ee07a3cfb4d9d8"
|
||||
|
||||
[[package]]
|
||||
name = "ipconfig"
|
||||
version = "0.3.4"
|
||||
@@ -2116,29 +2043,6 @@ version = "0.2.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fc04a4c58212d57930a24bf47d3fa87485264a3a054e9c10e042eb373573ad3c"
|
||||
|
||||
[[package]]
|
||||
name = "manyhow"
|
||||
version = "0.11.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b33efb3ca6d3b07393750d4030418d594ab1139cee518f0dc88db70fec873587"
|
||||
dependencies = [
|
||||
"manyhow-macros",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.119",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "manyhow-macros"
|
||||
version = "0.11.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "46fce34d199b78b6e6073abf984c9cf5fd3e9330145a93ee0738a7443e371495"
|
||||
dependencies = [
|
||||
"proc-macro-utils",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "memchr"
|
||||
version = "2.8.3"
|
||||
@@ -2635,17 +2539,6 @@ dependencies = [
|
||||
"zerocopy",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro-utils"
|
||||
version = "0.10.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "eeaf08a13de400bc215877b5bdc088f241b12eb42f0a548d3390dc1c56bb7071"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"smallvec",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro2"
|
||||
version = "1.0.107"
|
||||
@@ -2664,28 +2557,6 @@ dependencies = [
|
||||
"proc-macro2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "quote-use"
|
||||
version = "0.8.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9619db1197b497a36178cfc736dc96b271fe918875fbf1344c436a7e93d0321e"
|
||||
dependencies = [
|
||||
"quote",
|
||||
"quote-use-macros",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "quote-use-macros"
|
||||
version = "0.8.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "82ebfb7faafadc06a7ab141a6f67bcfb24cb8beb158c6fe933f2f035afa99f35"
|
||||
dependencies = [
|
||||
"proc-macro-utils",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.119",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "r-efi"
|
||||
version = "5.3.0"
|
||||
@@ -3725,7 +3596,6 @@ dependencies = [
|
||||
"flume",
|
||||
"futures-rustls",
|
||||
"futures-util",
|
||||
"get-size2",
|
||||
"getrandom 0.4.3",
|
||||
"glob",
|
||||
"gloo-events",
|
||||
@@ -4341,9 +4211,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "zerovec-derive"
|
||||
version = "0.11.4"
|
||||
version = "0.11.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "47402523226a02bfe5230160dc3ccc089aa6f6f19e7fcbb4e6f824bbb1b4aa62"
|
||||
checksum = "9f212a141d820099d57ffafb9569be9617a6f27d3dc881fbee8fb56642f917a9"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
|
||||
Generated
+2
-2
@@ -2483,9 +2483,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "zerovec-derive"
|
||||
version = "0.11.4"
|
||||
version = "0.11.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "47402523226a02bfe5230160dc3ccc089aa6f6f19e7fcbb4e6f824bbb1b4aa62"
|
||||
checksum = "9f212a141d820099d57ffafb9569be9617a6f27d3dc881fbee8fb56642f917a9"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
|
||||
Reference in new issue
Block a user