pub struct AxisCore { /* private fields */ }Expand description
Main AXIS-CORE SDK struct
Implementations§
Source§impl AxisCore
impl AxisCore
Sourcepub async fn check_url(&self, url: &str) -> Result<Report, Box<dyn Error>>
pub async fn check_url(&self, url: &str) -> Result<Report, Box<dyn Error>>
Check accessibility of a web page by URL
§Example
let checker = AxisCore::new();
let report = checker.check_url("https://example.com").await?;Sourcepub fn check_html(&self, html: &str, base_url: Option<&str>) -> Report
pub fn check_html(&self, html: &str, base_url: Option<&str>) -> Report
Check accessibility of HTML content
§Example
let checker = AxisCore::new();
let html = r#"<html><body><img src="test.jpg" /></body></html>"#;
let report = checker.check_html(html, None);
// Missing alt text will be flaggedSourcepub fn export_to_text(&self, report: &Report) -> String
pub fn export_to_text(&self, report: &Report) -> String
Export a report to text format
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AxisCore
impl !RefUnwindSafe for AxisCore
impl Send for AxisCore
impl Sync for AxisCore
impl Unpin for AxisCore
impl UnsafeUnpin for AxisCore
impl !UnwindSafe for AxisCore
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more