pub struct HtbClient { /* private fields */ }Implementations§
Source§impl HtbClient
impl HtbClient
pub fn new(token: String) -> Self
pub fn with_cache_arc(token: String, cache: Arc<Cache>) -> Self
pub fn with_base_url(token: String, base_url: String) -> Self
pub fn with_base_url_and_cache( token: String, base_url: String, cache: Arc<Cache>, ) -> Self
pub async fn get<T: DeserializeOwned>(&self, path: &str) -> Result<T, HtbError>
pub async fn post<B: Serialize, T: DeserializeOwned>( &self, path: &str, body: &B, ) -> Result<T, HtbError>
pub async fn post_no_content<B: Serialize>( &self, path: &str, body: &B, ) -> Result<(), HtbError>
pub async fn get_bytes(&self, url_or_path: &str) -> Result<Vec<u8>, HtbError>
pub fn ctf(&self) -> CtfApi<'_>
pub fn user(&self) -> UserApi<'_>
pub fn machines(&self) -> MachineApi<'_>
pub fn challenges(&self) -> ChallengeApi<'_>
pub fn sherlocks(&self) -> SherlockApi<'_>
pub fn seasons(&self) -> SeasonApi<'_>
pub fn vpn(&self) -> VpnApi<'_>
pub fn search(&self) -> SearchApi<'_>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for HtbClient
impl !UnwindSafe for HtbClient
impl Freeze for HtbClient
impl Send for HtbClient
impl Sync for HtbClient
impl Unpin for HtbClient
impl UnsafeUnpin for HtbClient
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