Complete Rust API and migration documentation (#102)
Some checks failed
Native code generation / deterministic (push) Failing after 2m5s
Concurrency and resource soak audit / soak (push) Failing after 6m22s
Documentation / documentation (push) Failing after 1m25s
Imaging and meshing gate / native (push) Failing after 2m47s
JPEG 2000 feature / linux (push) Successful in 3m54s
Release platform and feature matrix / audit (push) Successful in 37s
Native Rust workspace compile / compile (push) Failing after 1m14s
Skia feature / linux (push) Successful in 30m46s
Dependency and supply-chain audit / audit (push) Failing after 8m56s
Release platform and feature matrix / matrix (false, linux-stable-minimal, x86_64-unknown-linux-gnu, stable) (push) Failing after 9m16s
Release platform and feature matrix / matrix (false, macos-stable-portable, x86_64-apple-darwin, stable) (push) Failing after 1m20s
Release platform and feature matrix / matrix (false, windows-stable-portable, x86_64-pc-windows-gnu, stable) (push) Failing after 1m18s
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
Release platform and feature matrix / matrix (true, linux-msrv-portable, x86_64-unknown-linux-gnu, 1.96.0) (push) Has been cancelled
Some checks failed
Native code generation / deterministic (push) Failing after 2m5s
Concurrency and resource soak audit / soak (push) Failing after 6m22s
Documentation / documentation (push) Failing after 1m25s
Imaging and meshing gate / native (push) Failing after 2m47s
JPEG 2000 feature / linux (push) Successful in 3m54s
Release platform and feature matrix / audit (push) Successful in 37s
Native Rust workspace compile / compile (push) Failing after 1m14s
Skia feature / linux (push) Successful in 30m46s
Dependency and supply-chain audit / audit (push) Failing after 8m56s
Release platform and feature matrix / matrix (false, linux-stable-minimal, x86_64-unknown-linux-gnu, stable) (push) Failing after 9m16s
Release platform and feature matrix / matrix (false, macos-stable-portable, x86_64-apple-darwin, stable) (push) Failing after 1m20s
Release platform and feature matrix / matrix (false, windows-stable-portable, x86_64-pc-windows-gnu, stable) (push) Failing after 1m18s
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
Release platform and feature matrix / matrix (true, linux-msrv-portable, x86_64-unknown-linux-gnu, 1.96.0) (push) Has been cancelled
This commit is contained in:
14
crates/libremetaverse/examples/cancellation.rs
Normal file
14
crates/libremetaverse/examples/cancellation.rs
Normal file
@@ -0,0 +1,14 @@
|
||||
use libremetaverse_types::compat::CancellationTokenSource;
|
||||
|
||||
#[tokio::main(flavor = "current_thread")]
|
||||
async fn main() -> Result<(), libremetaverse::Error> {
|
||||
let source = CancellationTokenSource::new();
|
||||
let token = source.token();
|
||||
source.cancel();
|
||||
token.cancelled().await;
|
||||
assert!(matches!(
|
||||
token.throw_if_cancellation_requested(),
|
||||
Err(libremetaverse::Error::Cancelled)
|
||||
));
|
||||
Ok(())
|
||||
}
|
||||
10
crates/libremetaverse/examples/offline_client.rs
Normal file
10
crates/libremetaverse/examples/offline_client.rs
Normal file
@@ -0,0 +1,10 @@
|
||||
use libremetaverse::{ClientLifecycleState, GridClient};
|
||||
|
||||
fn main() -> Result<(), libremetaverse::Error> {
|
||||
let client = GridClient::new()?;
|
||||
assert_eq!(client.lifecycle_state(), ClientLifecycleState::Active);
|
||||
client.dispose_with_method()?;
|
||||
client.dispose_with_method()?;
|
||||
assert_eq!(client.lifecycle_state(), ClientLifecycleState::Disposed);
|
||||
Ok(())
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,10 @@
|
||||
//! Public rewrite shell corresponding to the main `LibreMetaverse` assembly.
|
||||
//! Native Rust grid client corresponding to the main `LibreMetaverse` assembly.
|
||||
//!
|
||||
//! Start here for login, networking, agents, inventory, assets, appearance,
|
||||
//! world, and social APIs. The appended guide covers crate selection, C# name
|
||||
//! migration, ownership, cancellation, events, security, and `OpenSim` setup.
|
||||
|
||||
#![doc = include_str!("../../../docs/rust-api-guide.md")]
|
||||
|
||||
extern crate self as libremetaverse;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user