oas-sdk · config
Declared module signatures, types, configuration, and source documentation.
Source: oas/oas/oas-sdk/src/config.rs. SHA-256: 4038079d8f84273a076b937fa015546f3ad4f002cd8fd55e41afdbaa50f8a6c4.
This source reference follows declared modules and preserves feature attributes. It includes public declarations and implementation methods in those modules. Private-module exports and trait resolution still require the compiler; not every declaration is a crate-root import. Function bodies and constant values are omitted. Source comments describe their implementation context and are not a production deployment claim.
config::SdkConfig
Configuration for the OAS SDK.
Controls resolution, lineage verification settings, and other SDK-wide parameters.
Examples
use oas_sdk::config::SdkConfig;
use std::time::Duration;
let config = SdkConfig::builder()
.max_generation(8)
.per_hop_timeout(Duration::from_secs(3))
.build();
assert_eq!(config.max_generation(), 8);#[derive(Debug, Clone)]
pub struct SdkConfig {
}Source line: 28.
config::SdkConfig::builder
Creates a new [SdkConfigBuilder].
pub fn builder() -> SdkConfigBuilder;Source line: 38.
config::SdkConfig::max_generation
Returns the maximum allowed lineage generation depth.
pub fn max_generation(&self) -> u32;Source line: 43.
config::SdkConfig::per_hop_timeout
Returns the per-hop resolution timeout.
pub fn per_hop_timeout(&self) -> Duration;Source line: 48.
config::SdkConfig::total_timeout
Returns the total lineage verification timeout.
pub fn total_timeout(&self) -> Duration;Source line: 53.
config::SdkConfig::verify_document_signatures
Returns whether document signature verification is enabled.
pub fn verify_document_signatures(&self) -> bool;Source line: 58.
config::SdkConfig::trust_anchors
Returns verifier-controlled lineage root trust anchors.
pub fn trust_anchors(&self) -> &[oas_lineage::config::TrustAnchor];Source line: 63.
config::SdkConfig::to_lineage_config
Converts this configuration into a lineage VerifyConfig.
pub fn to_lineage_config(&self) -> oas_lineage::config::VerifyConfig;Source line: 68.
config::SdkConfigBuilder
Builder for [SdkConfig].
Examples
use oas_sdk::config::SdkConfig;
let config = SdkConfig::builder()
.max_generation(8)
.verify_document_signatures(false)
.build();#[derive(Debug, Default)]
pub struct SdkConfigBuilder {
}Source line: 106.
config::SdkConfigBuilder::max_generation
Sets the maximum allowed lineage generation depth.
Default: 16 (per OAS Specification §8).
pub fn max_generation(mut self, max: u32) -> Self;Source line: 114.
config::SdkConfigBuilder::per_hop_timeout
Sets the per-hop resolution timeout.
Default: 5 seconds.
pub fn per_hop_timeout(mut self, timeout: Duration) -> Self;Source line: 122.
config::SdkConfigBuilder::total_timeout
Sets the total lineage verification timeout.
Default: 30 seconds.
pub fn total_timeout(mut self, timeout: Duration) -> Self;Source line: 130.
config::SdkConfigBuilder::verify_document_signatures
Sets whether to verify document proof signatures during lineage verification.
Default: true.
pub fn verify_document_signatures(mut self, verify: bool) -> Self;Source line: 138.
config::SdkConfigBuilder::trust_anchor
Adds a verifier-controlled lineage root trust anchor.
pub fn trust_anchor(mut self, anchor: oas_lineage::config::TrustAnchor) -> Self;Source line: 144.
config::SdkConfigBuilder::build
Builds the configuration.
pub fn build(self) -> SdkConfig;Source line: 150.