pub struct NotificationApi<'a> { /* private fields */ }Expand description
Main interface for TorBox general operations
Provides methods for all general API calls including:
- Up status
- Changelogs in both RSS and JSON
- Test files
Implementations§
Source§impl<'a> NotificationApi<'a>
impl<'a> NotificationApi<'a>
pub fn new(client: &'a TorboxClient) -> NotificationApi<'a>
pub async fn get_rss_feed(&self) -> Result<String, ApiError>
pub async fn get_feed( &self, ) -> Result<ApiResponse<Vec<NotificationFeed>>, ApiError>
pub async fn clear(&self, id: u64) -> Result<ApiResponse<()>, ApiError>
pub async fn clear_all(&self) -> Result<ApiResponse<()>, ApiError>
pub async fn send_test(&self) -> Result<ApiResponse<()>, ApiError>
Trait Implementations§
Source§impl<'a> NamedType for NotificationApi<'a>
impl<'a> NamedType for NotificationApi<'a>
fn sid() -> SpectaID
Source§fn named_data_type(
type_map: &mut TypeCollection,
generics: &[DataType],
) -> NamedDataType
fn named_data_type( type_map: &mut TypeCollection, generics: &[DataType], ) -> NamedDataType
this is equivalent to Type::inline but returns a NamedDataType instead.
Source§fn definition_named_data_type(type_map: &mut TypeCollection) -> NamedDataType
fn definition_named_data_type(type_map: &mut TypeCollection) -> NamedDataType
this is equivalent to [Type::definition] but returns a NamedDataType instead.
Source§impl<'a> Type for NotificationApi<'a>
impl<'a> Type for NotificationApi<'a>
Source§fn inline(type_map: &mut TypeCollection, generics: Generics<'_>) -> DataType
fn inline(type_map: &mut TypeCollection, generics: Generics<'_>) -> DataType
Returns the definition of a type using the provided generics. Read more
Source§fn reference(type_map: &mut TypeCollection, generics: &[DataType]) -> Reference
fn reference(type_map: &mut TypeCollection, generics: &[DataType]) -> Reference
Generates a datatype corresponding to a reference to this type,
as determined by its category. Getting a reference to a type implies that
it should belong in the type map (since it has to be referenced from somewhere),
so the output of
definition will be put into the type map.impl<'a> Flatten for NotificationApi<'a>
Auto Trait Implementations§
impl<'a> Freeze for NotificationApi<'a>
impl<'a> !RefUnwindSafe for NotificationApi<'a>
impl<'a> Send for NotificationApi<'a>
impl<'a> Sync for NotificationApi<'a>
impl<'a> Unpin for NotificationApi<'a>
impl<'a> UnsafeUnpin for NotificationApi<'a>
impl<'a> !UnwindSafe for NotificationApi<'a>
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