Crate aidoku

Crate aidoku 

Source
Expand description

§aidoku

The aidoku crate contains everything necessary to create a source for Aidoku.

§Crate Features

Default features:

  • talc: Enables the talc allocator when building for wasm.
  • imports: Enables the API functions provided to Aidoku sources.
  • helpers: Enables some helpful additions for source development.

Optional features:

  • json: Enables deserialization of JSON network responses and default values via serde_json.
  • test: Disables the panic handler for use in tests.

§Usage

To use this library to create a source for Aidoku, you need to implement the Source trait and register it with the register_source! macro.

struct TestSource;

impl Source for TestSource {
	// implement Source trait methods here
}

// register the source to export wasm functions
register_source!(TestSource, Home);

Re-exports§

pub use crate::imports::error::AidokuError;
pub use crate::imports::error::Result;
pub use postcard;
pub use serde;

Modules§

alloc
Re-export of alloc crate.
canvas
Structs and enums used for drawing on a canvas.
helpers
Utilities for commonly used functions when creating Aidoku sources.
imports
Wrapper around imported source API functions.
prelude
The prelude macros.

Macros§

bail
Returns early with an error.
debug
Prints to Aidoku logs if debug assertions are enabled.
error
Constructs an error with a message.
println
Prints to Aidoku logs.
register_source
Registers a source for use with Aidoku.

Structs§

ButtonSetting
A button that notifies the source when pressed.
Chapter
A chapter of a manga.
CheckFilter
A checkbox.
EditableListSetting
A list that can be edited by the user.
Filter
A filter that can be used in a source search.
FilterItem
A link to a listing that uses the provided filters.
GroupSetting
A group of settings.
HashMap
A hash map implemented with quadratic probing and SIMD lookup.
HomeComponent
A component for a home layout.
HomeLayout
A home layout for a source.
ImageRequest
The details of a HTTP request.
ImageResponse
A response from a network image request.
Link
A link used in home components.
LinkSetting
A link to a URL.
Listing
A listing of manga.
LoginSetting
A login control.
Manga
A manga, comic, webtoon, or other type of content for Aidoku to read.
MangaPageResult
A page of manga entries.
MangaWithChapter
A paired manga and chapter.
MultiSelectFilter
A list of values that allows multiple selections.
MultiSelectSetting
A page that allows selection of multiple values.
Page
A page for a chapter.
PageSetting
A page of settings.
RangeFilter
A range filter.
SegmentSetting
A segmented control.
SelectFilter
A list of values that allows a single selection.
SelectSetting
A page that allows selection of a single value.
Setting
A setting that is shown in the source settings page.
SortFilter
A list of sort options.
SortFilterDefault
A default value for a sort filter.
StepperSetting
A numeric stepper control.
TextFilter
A text field.
TextSetting
A text input field.
ToggleSetting
A toggle switch.

Enums§

ContentRating
The content rating of a manga.
DeepLinkResult
A result of a deep link handling.
FilterKind
The kind of filter.
FilterValue
A configured filter value.
HomeComponentValue
The value of a component for a home layout.
HomePartialResult
A partial result for the home page.
LinkValue
A link value that can be opened by the Aidoku app.
ListingKind
The display type of a listing.
LoginMethod
A login method.
MangaStatus
The publishing status of a manga.
PageContent
The content of a page.
PageIcon
SettingValue
The kind of setting.
UpdateStrategy
The preferred update strategy for a manga.
Viewer
The proper reading viewer for a manga.

Traits§

AlternateCoverProvider
A source that provides multiple cover images.
BaseUrlProvider
A source that provides a programmatic base url.
BasicLoginHandler
A source that handles basic login with username and password.
DeepLinkHandler
A source that handles deep links.
DynamicFilters
A source that provides dynamic filters.
DynamicListings
A source that provides dynamic listings.
DynamicSettings
A source that provides dynamic settings.
Home
A source that provides a home layout.
ImageRequestProvider
A source that provides requests for images.
ListingProvider
A source that provides listings.
MigrationHandler
A source that handles key migration.
NotificationHandler
A source that handles notification callbacks.
PageDescriptionProvider
A source that provides dynamic descriptions for pages.
PageImageProcessor
A source that processes page image data after being fetched.
Source
The required functions an Aidoku source must implement.
WebLoginHandler
A source that handles custom webview login.

Type Aliases§

PageContext
Context associated with a page.