Crate remote_settings_client
source · [−]Expand description
Remote Settings Client
A library for fetching and synchronizing Remote Settings data.
Example
use remote_settings_client::{Client, RingVerifier, client::net::ViaductClient};
use viaduct::set_backend;
use viaduct_reqwest::ReqwestBackend;
set_backend(&ReqwestBackend).unwrap();
let mut client = Client::builder()
.bucket_name("main-preview")
.http_client(Box::new(ViaductClient))
.collection_name("search-config")
.verifier(Box::new(RingVerifier {}))
.build()
.unwrap();
client.sync(None).await.unwrap();
match client.get().await {
Ok(records) => println!("{:?}", records),
Err(error) => println!("Error fetching/verifying records: {:?}", error),
};
}
See Client
for more infos.
Re-exports
pub use client::Client;
pub use client::Collection;
pub use client::Record;
pub use client::DEFAULT_BUCKET_NAME;
pub use client::DEFAULT_SERVER_URL;
Modules
Structs
Enums
Traits
A trait for giving a type a custom storage implementation
A trait for signature verification of collection data.