Audit public API and SemVer surface (#103)
Some checks failed
API and SemVer surface / api-surface (push) Failing after 13m8s
Native code generation / deterministic (push) Failing after 2m8s
Concurrency and resource soak audit / soak (push) Failing after 6m39s
Imaging and meshing gate / native (push) Has been cancelled
Release platform and feature matrix / audit (push) Has been cancelled
Release platform and feature matrix / matrix (false, linux-stable-minimal, x86_64-unknown-linux-gnu, stable) (push) Has been cancelled
Release platform and feature matrix / matrix (false, macos-stable-portable, x86_64-apple-darwin, stable) (push) Has been cancelled
Release platform and feature matrix / matrix (false, windows-stable-portable, x86_64-pc-windows-gnu, stable) (push) Has been cancelled
Release platform and feature matrix / matrix (true, linux-msrv-portable, x86_64-unknown-linux-gnu, 1.96.0) (push) Has been cancelled
Release platform and feature matrix / matrix (true, linux-stable-default, x86_64-unknown-linux-gnu, stable) (push) Has been cancelled
Release platform and feature matrix / matrix (true, linux-stable-features, x86_64-unknown-linux-gnu, stable) (push) Has been cancelled
Release platform and feature matrix / matrix (true, linux-stable-release-surface, x86_64-unknown-linux-gnu, stable) (push) Has been cancelled
Documentation / documentation (push) Has been cancelled
Native Rust workspace compile / compile (push) Has been cancelled
Dependency and supply-chain audit / audit (push) Has been cancelled
JPEG 2000 feature / linux (push) Successful in 2m46s
Skia feature / linux (push) Successful in 31m0s
Some checks failed
API and SemVer surface / api-surface (push) Failing after 13m8s
Native code generation / deterministic (push) Failing after 2m8s
Concurrency and resource soak audit / soak (push) Failing after 6m39s
Imaging and meshing gate / native (push) Has been cancelled
Release platform and feature matrix / audit (push) Has been cancelled
Release platform and feature matrix / matrix (false, linux-stable-minimal, x86_64-unknown-linux-gnu, stable) (push) Has been cancelled
Release platform and feature matrix / matrix (false, macos-stable-portable, x86_64-apple-darwin, stable) (push) Has been cancelled
Release platform and feature matrix / matrix (false, windows-stable-portable, x86_64-pc-windows-gnu, stable) (push) Has been cancelled
Release platform and feature matrix / matrix (true, linux-msrv-portable, x86_64-unknown-linux-gnu, 1.96.0) (push) Has been cancelled
Release platform and feature matrix / matrix (true, linux-stable-default, x86_64-unknown-linux-gnu, stable) (push) Has been cancelled
Release platform and feature matrix / matrix (true, linux-stable-features, x86_64-unknown-linux-gnu, stable) (push) Has been cancelled
Release platform and feature matrix / matrix (true, linux-stable-release-surface, x86_64-unknown-linux-gnu, stable) (push) Has been cancelled
Documentation / documentation (push) Has been cancelled
Native Rust workspace compile / compile (push) Has been cancelled
Dependency and supply-chain audit / audit (push) Has been cancelled
JPEG 2000 feature / linux (push) Successful in 2m46s
Skia feature / linux (push) Successful in 31m0s
This commit is contained in:
@@ -557,7 +557,7 @@ struct HttpCapsClientInner {
|
||||
disposed: AtomicBool,
|
||||
}
|
||||
|
||||
/// Native capability HTTP client with injectable fake and reqwest backends.
|
||||
/// Native capability HTTP client with injectable fake and production backends.
|
||||
#[derive(Clone)]
|
||||
pub struct HttpCapsClient(Arc<HttpCapsClientInner>);
|
||||
|
||||
@@ -614,24 +614,47 @@ impl HttpCapsClient {
|
||||
})))
|
||||
}
|
||||
|
||||
pub fn with_reqwest_client(
|
||||
client: reqwest::Client,
|
||||
/// Creates the production HTTP backend without exposing the selected HTTP
|
||||
/// implementation in the public API.
|
||||
pub fn with_native_transport(
|
||||
user_agent: &str,
|
||||
timeout: Duration,
|
||||
max_connections: usize,
|
||||
rate_limiter: Option<CapsRateLimiter>,
|
||||
limits: CapsHttpLimits,
|
||||
) -> Result<Self, Error> {
|
||||
Self::with_reqwest_client_and_concurrency(client, rate_limiter, limits, 32)
|
||||
if timeout.is_zero() || max_connections == 0 {
|
||||
return Err(Error::Argument);
|
||||
}
|
||||
limits.validate()?;
|
||||
let max_redirects = limits.max_redirects;
|
||||
let redirect = reqwest::redirect::Policy::custom(move |attempt| {
|
||||
if attempt.previous().len() >= max_redirects {
|
||||
return attempt.stop();
|
||||
}
|
||||
match attempt.url().scheme() {
|
||||
"http" | "https" => attempt.follow(),
|
||||
_ => attempt.stop(),
|
||||
}
|
||||
});
|
||||
let client = reqwest::Client::builder()
|
||||
.redirect(redirect)
|
||||
.timeout(timeout)
|
||||
.connect_timeout(timeout)
|
||||
.pool_max_idle_per_host(max_connections)
|
||||
.user_agent(user_agent)
|
||||
.build()
|
||||
.map_err(|_| Error::HttpRequest)?;
|
||||
Self::with_reqwest_client(client, rate_limiter, limits, max_connections)
|
||||
}
|
||||
|
||||
fn with_reqwest_client_and_concurrency(
|
||||
fn with_reqwest_client(
|
||||
client: reqwest::Client,
|
||||
rate_limiter: Option<CapsRateLimiter>,
|
||||
limits: CapsHttpLimits,
|
||||
max_connections: usize,
|
||||
) -> Result<Self, Error> {
|
||||
limits.validate()?;
|
||||
if max_connections == 0 {
|
||||
return Err(Error::Argument);
|
||||
}
|
||||
Ok(Self(Arc::new(HttpCapsClientInner {
|
||||
backend: HttpBackend::Reqwest(client),
|
||||
limits,
|
||||
@@ -648,33 +671,12 @@ impl HttpCapsClient {
|
||||
max_connections: usize,
|
||||
rate_limiter: CapsRateLimiter,
|
||||
) -> Result<Self, Error> {
|
||||
if max_connections == 0 {
|
||||
return Err(Error::Argument);
|
||||
}
|
||||
let limits = CapsHttpLimits::default();
|
||||
let max_redirects = limits.max_redirects;
|
||||
let redirect = reqwest::redirect::Policy::custom(move |attempt| {
|
||||
if attempt.previous().len() > max_redirects {
|
||||
return attempt.stop();
|
||||
}
|
||||
match attempt.url().scheme() {
|
||||
"http" | "https" => attempt.follow(),
|
||||
_ => attempt.stop(),
|
||||
}
|
||||
});
|
||||
let client = reqwest::Client::builder()
|
||||
.redirect(redirect)
|
||||
.timeout(timeout)
|
||||
.connect_timeout(timeout)
|
||||
.pool_max_idle_per_host(max_connections)
|
||||
.user_agent(user_agent)
|
||||
.build()
|
||||
.map_err(|_| Error::HttpRequest)?;
|
||||
Self::with_reqwest_client_and_concurrency(
|
||||
client,
|
||||
Some(rate_limiter),
|
||||
limits,
|
||||
Self::with_native_transport(
|
||||
user_agent,
|
||||
timeout,
|
||||
max_connections,
|
||||
Some(rate_limiter),
|
||||
CapsHttpLimits::default(),
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ use std::sync::{Arc, Condvar, Mutex};
|
||||
|
||||
/// A validated client-core failure with no credential or capability payload.
|
||||
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
|
||||
#[non_exhaustive]
|
||||
pub enum ClientCoreError {
|
||||
/// A public settings field failed validation.
|
||||
InvalidConfiguration {
|
||||
|
||||
@@ -17035,7 +17035,7 @@ pub trait IBakingTextureProvider: std::any::Any + Send + Sync {
|
||||
///
|
||||
/// Native Rust mapping of C# `LibreMetaverse.IGridClient` using decision
|
||||
/// `native_metacrate_type`. See the [pinned C# source](https://github.com/cinderblocks/libremetaverse/tree/2aa70bb68513b39795da5d13c88f31b86e85a3ba).
|
||||
pub trait IGridClient {
|
||||
pub trait IGridClient: Send + Sync {
|
||||
/// C# member: `P:LibreMetaverse.IGridClient.AisClient`.
|
||||
///
|
||||
/// C# signature: `LibreMetaverse.InventoryAISClient LibreMetaverse.IGridClient.AisClient`.
|
||||
@@ -19408,7 +19408,7 @@ impl InventoryManager {
|
||||
/// C# member: `M:LibreMetaverse.InventoryManager.CreateLinksAsync(LibreMetaverse.UUID,System.Collections.Generic.IEnumerable{System.ValueTuple{LibreMetaverse.InventoryBase,System.String}},System.Action{System.Boolean},System.Threading.CancellationToken)`.
|
||||
///
|
||||
/// C# signature: `System.Threading.Tasks.Task LibreMetaverse.InventoryManager.CreateLinksAsync(LibreMetaverse.UUID folderID, System.Collections.Generic.IEnumerable<System.ValueTuple<LibreMetaverse.InventoryBase, System.String>> linksToCreate, System.Action<System.Boolean> callback, System.Threading.CancellationToken cancellationToken = default)`.
|
||||
/// Mapping contract: ownership `shared_self,owned,owned,optional_owned,optional_owned`; async `sync`;
|
||||
/// Mapping contract: ownership `shared_self,owned,owned,optional_owned,optional_owned`; async `async`;
|
||||
/// errors `Result<_, crate::Error>`; overload `direct_snake_case`; kind `method`.
|
||||
pub async fn create_links(
|
||||
&self,
|
||||
@@ -19562,7 +19562,7 @@ impl InventoryManager {
|
||||
/// C# member: `M:LibreMetaverse.InventoryManager.FolderContentsAsync(LibreMetaverse.UUID,LibreMetaverse.UUID,System.Boolean,System.Boolean,LibreMetaverse.InventorySortOrder,System.Threading.CancellationToken,System.Boolean)`.
|
||||
///
|
||||
/// C# signature: `System.Threading.Tasks.Task<System.Collections.Generic.List<LibreMetaverse.InventoryBase>> LibreMetaverse.InventoryManager.FolderContentsAsync(LibreMetaverse.UUID folder, LibreMetaverse.UUID owner, System.Boolean fetchFolders, System.Boolean fetchItems, LibreMetaverse.InventorySortOrder order, System.Threading.CancellationToken cancellationToken = default, System.Boolean followLinks = default)`.
|
||||
/// Mapping contract: ownership `shared_self,owned,owned,owned,owned,owned,optional_owned,optional_owned`; async `sync`;
|
||||
/// Mapping contract: ownership `shared_self,owned,owned,owned,owned,owned,optional_owned,optional_owned`; async `async`;
|
||||
/// errors `Result<_, crate::Error>`; overload `direct_snake_case`; kind `method`.
|
||||
pub async fn folder_contents(
|
||||
&self,
|
||||
@@ -19604,7 +19604,7 @@ impl InventoryManager {
|
||||
/// C# member: `M:LibreMetaverse.InventoryManager.GetTaskInventoryAsync(LibreMetaverse.UUID,System.UInt32,LibreMetaverse.Simulator,System.Threading.CancellationToken)`.
|
||||
///
|
||||
/// C# signature: `System.Threading.Tasks.Task<System.Collections.Generic.List<LibreMetaverse.InventoryBase>> LibreMetaverse.InventoryManager.GetTaskInventoryAsync(LibreMetaverse.UUID objectID, System.UInt32 objectLocalID, LibreMetaverse.Simulator simulator = default, System.Threading.CancellationToken cancellationToken = default)`.
|
||||
/// Mapping contract: ownership `shared_self,owned,owned,optional_owned,optional_owned`; async `sync`;
|
||||
/// Mapping contract: ownership `shared_self,owned,owned,optional_owned,optional_owned`; async `async`;
|
||||
/// errors `Result<_, crate::Error>`; overload `direct_snake_case`; kind `method`.
|
||||
pub async fn get_task_inventory(
|
||||
&self,
|
||||
@@ -35686,12 +35686,12 @@ pub use crate::terrain_codec::TerrainCompressor;
|
||||
/// C# member: `M:LibreMetaverse.TerrainManager.GetTerrainMaterialOverridesAsync(System.Threading.CancellationToken)`.
|
||||
///
|
||||
/// C# signature: `System.Threading.Tasks.Task<LibreMetaverse.Assets.AssetMaterial[]> LibreMetaverse.TerrainManager.GetTerrainMaterialOverridesAsync(System.Threading.CancellationToken cancellationToken = default)`.
|
||||
/// Mapping contract: ownership `shared_self,optional_owned`; async `sync`;
|
||||
/// Mapping contract: ownership `shared_self,optional_owned`; async `async`;
|
||||
/// errors `Result<_, crate::Error>`; overload `direct_snake_case`; kind `method`.
|
||||
/// C# member: `M:LibreMetaverse.TerrainManager.SetTerrainMaterialOverridesAsync(LibreMetaverse.Assets.AssetMaterial[],System.Threading.CancellationToken)`.
|
||||
///
|
||||
/// C# signature: `System.Threading.Tasks.Task<System.Boolean> LibreMetaverse.TerrainManager.SetTerrainMaterialOverridesAsync(LibreMetaverse.Assets.AssetMaterial[] overrides, System.Threading.CancellationToken cancellationToken = default)`.
|
||||
/// Mapping contract: ownership `shared_self,owned,optional_owned`; async `sync`;
|
||||
/// Mapping contract: ownership `shared_self,owned,optional_owned`; async `async`;
|
||||
/// errors `Result<_, crate::Error>`; overload `direct_snake_case`; kind `method`.
|
||||
pub use crate::terrain_manager::TerrainManager;
|
||||
|
||||
@@ -37970,7 +37970,7 @@ pub mod appearance {
|
||||
/// C# member: `M:LibreMetaverse.Appearance.CompositeCurrentOutfitPolicy.ReportItemChangeAsync(System.Collections.Generic.List{LibreMetaverse.InventoryItem},System.Collections.Generic.List{LibreMetaverse.InventoryItem},System.Threading.CancellationToken)`.
|
||||
///
|
||||
/// C# signature: `System.Threading.Tasks.Task LibreMetaverse.Appearance.CompositeCurrentOutfitPolicy.ReportItemChangeAsync(System.Collections.Generic.List<LibreMetaverse.InventoryItem> addedItems, System.Collections.Generic.List<LibreMetaverse.InventoryItem> removedItems, System.Threading.CancellationToken cancellationToken = default)`.
|
||||
/// Mapping contract: ownership `shared_self,optional_shared,optional_shared,optional_owned`; async `sync`;
|
||||
/// Mapping contract: ownership `shared_self,optional_shared,optional_shared,optional_owned`; async `async`;
|
||||
/// errors `Result<_, crate::Error>`; overload `direct_snake_case`; kind `method`.
|
||||
pub async fn report_item_change(
|
||||
&self,
|
||||
@@ -38273,7 +38273,7 @@ pub mod appearance {
|
||||
/// C# member: `M:LibreMetaverse.Appearance.ICurrentOutfitPolicy.ReportItemChangeAsync(System.Collections.Generic.List{LibreMetaverse.InventoryItem},System.Collections.Generic.List{LibreMetaverse.InventoryItem},System.Threading.CancellationToken)`.
|
||||
///
|
||||
/// C# signature: `System.Threading.Tasks.Task LibreMetaverse.Appearance.ICurrentOutfitPolicy.ReportItemChangeAsync(System.Collections.Generic.List<LibreMetaverse.InventoryItem> addedItems, System.Collections.Generic.List<LibreMetaverse.InventoryItem> removedItems, System.Threading.CancellationToken cancellationToken = default)`.
|
||||
/// Mapping contract: ownership `shared_self,optional_shared,optional_shared,optional_owned`; async `sync`;
|
||||
/// Mapping contract: ownership `shared_self,optional_shared,optional_shared,optional_owned`; async `boxed_future`;
|
||||
/// errors `Result<_, crate::Error>`; overload `direct_snake_case`; kind `method`.
|
||||
fn report_item_change(
|
||||
&self,
|
||||
|
||||
@@ -29,6 +29,7 @@ const THROTTLE_BURST_PERIODS: usize = 4;
|
||||
/// The variants deliberately carry no datagram bytes, credentials, endpoint
|
||||
/// query data, or operating-system error strings.
|
||||
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
|
||||
#[non_exhaustive]
|
||||
pub enum UdpTransportError {
|
||||
InvalidConfiguration(&'static str),
|
||||
InvalidBuffer,
|
||||
|
||||
Reference in New Issue
Block a user