Skip to main content

LibraryApi

Struct LibraryApi 

Source
pub struct LibraryApi { /* private fields */ }
Expand description

Calls on one library. Cheap to clone; clones share the passphrase.

Implementations§

Source§

impl LibraryApi

Source

pub fn new(client: RedseatClient, library: ServerLibraryForRead) -> Self

Source

pub fn id(&self) -> &str

Source

pub fn library(&self) -> &ServerLibraryForRead

Source

pub fn client(&self) -> &RedseatClient

The client of the library’s server.

Source

pub fn is_encrypted(&self) -> bool

Whether files are encrypted on the client side (crypt).

Source

pub fn has_passphrase(&self) -> bool

Whether the passphrase is set.

Source

pub async fn get_medias(&self, query: &MediaQuery) -> Result<Vec<MediaItem>>

Medias matching query. Timestamps are Unix milliseconds.

Source

pub async fn get_medias_page(&self, query: &MediaQuery) -> Result<MediaPage>

A page of medias. Set query.limit to the page size, then pass next_page_key back in query.page_key for the next page.

Source

pub async fn get_thumb_raw(&self, media_id: &str) -> Result<Vec<u8>>

The thumbnail as the server stores it: encrypted in an encrypted library.

Source

pub async fn get_thumb(&self, media: &Media) -> Result<Vec<u8>>

The thumbnail of media, decrypted in an encrypted library (set the passphrase first).

Source

pub fn decrypt_thumb(&self, media: &Media, data: &[u8]) -> Result<Vec<u8>>

Decrypts a thumbnail of media fetched with Self::get_thumb_raw (or its file, fetched without raw: both are encrypted with the media’s IV). Returns it unchanged when the library is not encrypted.

Source

pub async fn get_media( &self, media: &Media, query: &MediaFileQuery, ) -> Result<Vec<u8>>

The file of a media, whole: decrypted in an encrypted library (set the passphrase first). With query.unsupported_mime, the server converts photos of those types (or of any type a browser cannot show, with "all") to WebP; it cannot in an encrypted library.

Source

pub async fn media_url( &self, media_id: &str, query: &MediaFileQuery, ) -> Result<AuthorizedUrl>

The URL of a media file and a token to open it, for a player that streams it itself with HTTP range requests. The bytes are the stored ones: in an encrypted library they are encrypted, and the server does not answer range requests, so use Self::get_media there.

Source

pub async fn open_encrypted_media( &self, media: &Media, ) -> Result<EncryptedMediaReader>

Opens a media of an encrypted library for reading by ranges, decrypted: for a player that streams and seeks (see EncryptedMediaReader). Set the passphrase first. Needs a server that answers range requests on encrypted files; an older one gives an error saying it needs an update.

Source

pub async fn get_media_metadata( &self, media_id: &str, ) -> Result<Option<MediaItem>>

One media with its relations, its faces and its backups. None when the library has no media with this id.

Source

pub async fn get_media_by_hash(&self, hash: &str) -> Result<Option<MediaItem>>

The media whose file has this hash: the one the server keeps in Media::md5, or the hash of the original file when the server converted it. None when the library has none.

Source

pub async fn update_media( &self, media_id: &str, update: &MediaForUpdate, ) -> Result<Media>

Changes a media and returns it. Only the set fields change; add_tags, remove_tags, add_people, add_series… change its relations.

Source

pub async fn update_medias( &self, media_ids: &[String], update: &MediaForUpdate, ) -> Result<Vec<Media>>

Changes several medias alike and returns those changed: an id the library does not have is skipped (servers with redseat_rust #85).

Source

pub async fn get_media_faces( &self, media_id: &str, ) -> Result<Vec<FaceEmbedding>>

The faces found in a media, each with the person it was given to, if any.

Source

pub async fn detect_media_faces( &self, media_id: &str, ) -> Result<Vec<DetectedFaceResult>>

Detects a media’s faces again: the server deletes those it had, detects them and gives them to the people it recognizes. Answers the faces found, without their person: read them with Self::get_media_faces. Needs the write role.

Source

pub async fn assign_faces( &self, face_ids: &[String], person_id: &str, ) -> Result<()>

Gives faces to a person (taking them from the one they had). Needs the write role.

Source

pub async fn unassign_faces(&self, face_ids: &[String]) -> Result<()>

Takes faces from their person. Needs the write role.

Source

pub async fn get_face_image(&self, face_id: &str) -> Result<Vec<u8>>

The image of a face (the part of its media around it), as the bytes of an image file.

Source

pub async fn predict_media_tags(&self, media_id: &str) -> Result<()>

Has the server’s model tag a media (the web app’s “AI tag”): the tags it finds are added to the media as generated tags, with their confidence, and told by events.

Source

pub async fn refresh_media(&self, media_id: &str) -> Result<MediaItem>

Reads a media’s file again (its size, dimensions, codecs, EXIF…) and processes it again, then returns it.

Source

pub async fn update_media_image( &self, media: &Media, image: &[u8], ) -> Result<()>

Sets the thumbnail of media to image, the bytes of an image file (JPEG, PNG, WebP…): the server makes it 512 pixels wide. In an encrypted library it is encrypted as the thumbnail its file embeds (Self::encrypt_thumb) and kept as sent, so give one of a thumbnail’s size (servers with the encrypted thumbnail upload; an older one fails to read it).

Source

pub fn encrypt_thumb(&self, media: &Media, data: &[u8]) -> Result<Vec<u8>>

Encrypts a thumbnail of media as its file’s is (the media’s IV), for Self::decrypt_thumb. Returns it unchanged when the library is not encrypted.

Source

pub async fn set_media_progress( &self, media_id: &str, progress: u64, ) -> Result<RsMediaProgress>

Saves how far the user is in a media (a position in a video, a page of a book…). The server stores progress as given.

Source

pub async fn remove_medias(&self, media_ids: &[String]) -> Result<Vec<Media>>

Removes medias, with their files. Returns those removed: an id the library does not have is skipped.

Source

pub async fn media_share_url(&self, media_id: &str) -> Result<String>

A URL of a media file that anyone can open for 6 hours, without the user’s token: for a download manager, another app or a cast device. Needs an HTTP transport.

Source

pub async fn download_medias( &self, download: &RsGroupDownload, ) -> Result<Vec<Media>>

Adds medias from URLs: the server downloads the requests of download (as one media with group) and returns the medias created. It can take long: see Self::download_medias_in_background. When a request holds several files and none is selected, the server asks for a selection and this is an error.

Source

pub async fn download_medias_in_background( &self, download: &RsGroupDownload, ) -> Result<()>

Like Self::download_medias, without waiting: the server downloads in the background, and the medias come with the medias events.

Source

pub async fn count_medias(&self, query: &MediaQuery) -> Result<u64>

The number of medias matching query (its limit and page_key are ignored).

Source

pub async fn get_tags(&self, query: &TagQuery) -> Result<Vec<Tag>>

The tags of the library matching query. With after, only those modified strictly after it (Unix milliseconds); page with limit and offset.

Source

pub async fn create_tag(&self, tag: &TagForAdd) -> Result<Tag>

Adds a tag to the library and returns it as created. The server chooses its id; parent puts it under another tag.

Source

pub async fn update_tag( &self, tag_id: &str, update: &TagForUpdate, ) -> Result<Tag>

Changes a tag and returns it. Only the set fields change: name renames it, parent moves it under another tag (an empty id moves it to the root), and add_alts, remove_alts, add_otherids and remove_otherids change its alternative names and external ids. Needs the admin role on the library.

Source

pub async fn merge_tag(&self, tag_id: &str, into: &str) -> Result<Tag>

Merges the tag tag_id into the tag into and removes it. Returns the tag kept.

Source

pub async fn remove_tag(&self, tag_id: &str) -> Result<Tag>

Removes a tag and returns it as it was.

Source

pub async fn get_people(&self, query: &PeopleQuery) -> Result<Vec<Person>>

The people of the library matching query, like Self::get_tags.

Source

pub async fn get_person(&self, person_id: &str) -> Result<Option<Person>>

One person, None when the library has no person with this id.

Source

pub async fn create_person(&self, person: &PersonForAdd) -> Result<Person>

Adds a person to the library and returns them as created. The server chooses their id.

Source

pub async fn update_person( &self, person_id: &str, update: &PersonForUpdate, ) -> Result<Person>

Changes a person and returns them. Only the set fields change; add_alts, remove_alts, add_socials, add_otherids… change their alternative names, links and external ids.

Source

pub async fn update_person_image( &self, person_id: &str, image: &[u8], ) -> Result<()>

Sets the portrait of a person to image, the bytes of an image file (JPEG, PNG, WebP…): the server converts it.

Source

pub async fn get_person_image( &self, person_id: &str, options: &ImageRequestOptions, ) -> Result<Vec<u8>>

The portrait of a person, as the bytes of an image file. The server has no other image for a person: it does not read defaulting.

Source

pub async fn remove_person(&self, person_id: &str) -> Result<Person>

Removes a person and returns them as they were. Needs the admin role on the library.

Source

pub async fn merge_people(&self, source: &str, target: &str) -> Result<u64>

Merges the person source into the person target, who gets their faces; source is then removed. Returns the number of faces moved. Needs the admin role on the library.

Source

pub async fn get_movie_people( &self, movie_id: &str, ) -> Result<Vec<PersonWithRoles>>

The people of a movie (cast and crew), with their roles in it.

Source

pub async fn get_serie_people( &self, serie_id: &str, ) -> Result<Vec<PersonWithRoles>>

The people of a series (cast and crew), with their roles in it.

Source

pub async fn get_book_people( &self, book_id: &str, ) -> Result<Vec<PersonWithRoles>>

The people of a book (authors…), with their roles in it.

Source

pub async fn get_series( &self, query: &SerieQuery, ) -> Result<Vec<ItemWithRelations<Serie>>>

The series of the library matching query, with their relations, like Self::get_tags.

Source

pub async fn create_serie( &self, serie: &ItemWithRelations<Serie>, ) -> Result<ItemWithRelations<Serie>>

Adds a series to the library, with its relations (tags, people), and returns it as created. The server chooses its id, and refuses a series whose external ids (imdb, tmdb…) the library already has.

Source

pub async fn update_serie( &self, serie_id: &str, update: &SerieForUpdate, ) -> Result<ItemWithRelations<Serie>>

Changes a series and returns it, with its relations. Only the set fields change. Needs the admin role on the library.

Source

pub async fn update_serie_image( &self, serie_id: &str, kind: ImageType, image: &[u8], ) -> Result<()>

Sets an image of a series (kind: its poster, background, card…) to image, the bytes of an image file (JPEG, PNG, WebP…): the server converts it. A Custom type is refused.

Source

pub async fn get_serie_image( &self, serie_id: &str, options: &ImageRequestOptions, ) -> Result<Vec<u8>>

An image of a series, as the bytes of an image file: its poster, or the options.kind asked. With defaulting, the background stands in for a missing card.

Source

pub async fn get_episode_image( &self, serie_id: &str, season: u32, number: u32, options: &ImageRequestOptions, ) -> Result<Vec<u8>>

The still of an episode, as the bytes of an image file. The server does not read options.kind. With defaulting, the card of the series, or else its background, stands in for a missing still.

Source

pub async fn remove_serie( &self, serie_id: &str, delete_medias: bool, ) -> Result<Serie>

Removes a series and returns it as it was. With delete_medias, its medias are removed too, with their files (a virtual file’s source stays).

Source

pub async fn set_episode_watched( &self, serie_id: &str, season: u32, number: u32, date: i64, ) -> Result<()>

Marks an episode watched by the user at date (Unix milliseconds), or not watched with a date of 0.

Source

pub async fn set_episode_progress( &self, serie_id: &str, season: u32, number: u32, progress: u64, ) -> Result<()>

Saves how far the user is in an episode. The server stores progress as given.

Source

pub async fn add_searched_episode_media( &self, serie_id: &str, season: u32, number: u32, request: &RsRequest, ) -> Result<Media>

Adds a file found by a source search to an episode: the server downloads request and returns the media created.

Source

pub async fn get_movies( &self, query: &MovieQuery, ) -> Result<Vec<ItemWithRelations<Movie>>>

The movies of the library matching query, with their relations, like Self::get_tags.

Source

pub async fn create_movie( &self, movie: &ItemWithRelations<Movie>, ) -> Result<ItemWithRelations<Movie>>

Adds a movie to the library, with its relations (tags, people), and returns it as created. The server chooses its id, and refuses a movie whose external ids (imdb, tmdb…) the library already has.

Source

pub async fn update_movie( &self, movie_id: &str, update: &MovieForUpdate, ) -> Result<ItemWithRelations<Movie>>

Changes a movie and returns it, with its relations. Only the set fields change.

Source

pub async fn get_movie_image( &self, movie_id: &str, options: &ImageRequestOptions, ) -> Result<Vec<u8>>

An image of a movie, as the bytes of an image file: its poster, or the options.kind asked. With defaulting, the background stands in for a missing card.

Source

pub async fn remove_movie( &self, movie_id: &str, delete_medias: bool, ) -> Result<Movie>

Removes a movie and returns it as it was. With delete_medias, its medias are removed too, with their files (a virtual file’s source stays).

Source

pub async fn set_movie_watched(&self, movie_id: &str, date: i64) -> Result<()>

Marks a movie watched by the user at date (Unix milliseconds), or not watched with a date of 0.

Source

pub async fn set_movie_progress( &self, movie_id: &str, progress: u64, ) -> Result<()>

Saves how far the user is in a movie. The server stores progress as given.

Source

pub async fn add_searched_movie_media( &self, movie_id: &str, request: &RsRequest, ) -> Result<Media>

Adds a file found by a source search to a movie: the server downloads request and returns the media created.

Source

pub async fn get_episodes(&self, query: &EpisodeQuery) -> Result<Vec<Episode>>

The episodes of the library matching query (of all series without serie_ref), like Self::get_tags. An episode’s id is Episode::id: series, season and number.

Source

pub async fn get_books( &self, query: &BookQuery, ) -> Result<Vec<ItemWithRelations<Book>>>

The books of the library matching query, with their relations, like Self::get_tags.

Source

pub async fn get_book(&self, book_id: &str) -> Result<ItemWithRelations<Book>>

One book, with its relations.

Source

pub async fn create_book( &self, book: &ItemWithRelations<Book>, upsert_tags: bool, upsert_people: bool, upsert_serie: bool, ) -> Result<ItemWithRelations<Book>>

Adds a book to the library, with its relations, and returns it as created. The server chooses its id. With upsert_tags, upsert_people or upsert_serie, the tags, people or series its relations give in full (tags_details, people_details, series_details) are created when the library lacks them.

Source

pub async fn update_book( &self, book_id: &str, update: &BookForUpdate, ) -> Result<ItemWithRelations<Book>>

Changes a book and returns it, with its relations. Only the set fields change.

Source

pub async fn get_book_image( &self, book_id: &str, options: &ImageRequestOptions, ) -> Result<Vec<u8>>

An image of a book, as the bytes of an image file: its poster, or the options.kind asked. With defaulting, the poster stands in for a missing image of another type.

Source

pub async fn remove_book( &self, book_id: &str, delete_medias: bool, ) -> Result<Book>

Removes a book and returns it as it was. With delete_medias, its medias are removed too, with their files (a virtual file’s source stays).

Source

pub async fn set_book_watched(&self, book_id: &str, date: i64) -> Result<()>

Marks a book read by the user at date (Unix milliseconds), or not read with a date of 0.

Source

pub async fn update_book_poster( &self, book_id: &str, image: &[u8], ) -> Result<()>

Sets the poster of a book to image, the bytes of an image file (JPEG, PNG, WebP…): the server converts it.

Source

pub async fn get_channels(&self, query: &ChannelQuery) -> Result<Vec<Channel>>

The channels of the library matching query, with their tags and their variants (one per quality). Page with limit and offset.

Source

pub async fn get_channel_image( &self, channel_id: &str, options: &ImageRequestOptions, ) -> Result<Vec<u8>>

The logo of a channel, as the bytes of an image file. The server has no other image for a channel: it does not read defaulting.

Source

pub async fn channel_image_url( &self, channel_id: &str, options: &ImageRequestOptions, ) -> Result<AuthorizedUrl>

The URL of a channel’s logo and a token to open it, for an image view that fetches it itself. Needs an HTTP transport.

Source

pub async fn add_tag_to_channel( &self, channel_id: &str, tag_id: &str, ) -> Result<()>

Adds a tag to a channel.

Source

pub async fn remove_tag_from_channel( &self, channel_id: &str, tag_id: &str, ) -> Result<()>

Removes a tag from a channel.

Source

pub async fn channel_stream_url( &self, channel_id: &str, quality: Option<&str>, ) -> Result<AuthorizedUrl>

The URL of a channel’s stream and a token to open it, for a player. quality picks one of the channel’s variants; without it the server picks the best. Needs an HTTP transport.

Source

pub async fn channel_hls_url( &self, channel_id: &str, quality: Option<&str>, ) -> Result<AuthorizedUrl>

The URL of a channel’s HLS playlist and a token to open it, for players that need HLS: the server starts converting the stream when the playlist is read. Stop it with Self::stop_channel_hls. Needs an HTTP transport.

Source

pub async fn stop_channel_hls(&self, channel_id: &str) -> Result<()>

Stops the HLS conversion of a channel, started by reading Self::channel_hls_url.

Source

pub async fn search_movies_stream( &self, lookup: &RsLookupMovie, sources: &[String], ) -> Result<SearchStream<SearchResultGroup>>

Searches the library’s metadata sources (plugins) for movies: by lookup.name, narrowed by its people, series and tags. Each item is what one source found. sources keeps only these sources (source paths or plugin ids; empty: all). For more results of a source, send its next_page_key back in lookup.page_key, with that source alone in sources. The server reads no lookup.ids here.

Source

pub async fn search_series_stream( &self, lookup: &RsLookupSerie, sources: &[String], ) -> Result<SearchStream<SearchResultGroup>>

Searches the library’s metadata sources for series, like Self::search_movies_stream.

Source

pub async fn search_books_stream( &self, lookup: &RsLookupBook, sources: &[String], ) -> Result<SearchStream<SearchResultGroup>>

Searches the library’s metadata sources for books, like Self::search_movies_stream, also by lookup.author and by the ISBN-13 of lookup.ids (the only id the server reads here). The server refuses a search with none of a name, an author, an ISBN or a filter.

Source

pub async fn search_people_stream( &self, lookup: &RsLookupPerson, sources: &[String], ) -> Result<SearchStream<SearchResultGroup>>

Searches the library’s metadata sources for people by lookup.name, like Self::search_movies_stream, without filters.

Source

pub async fn search_movie_medias_stream( &self, movie_id: &str, name: Option<&str>, sources: &[String], page_key: Option<&str>, ) -> Result<SearchStream<SseLookupSearchEvent>>

Searches the library’s sources (plugins) for files of a movie. Each item is what one source found: its downloads, and their requests one by one in results. Add one to the library with Self::add_searched_movie_media. name replaces the movie’s name in the search. sources keeps only these sources (source paths or plugin ids; empty: all). For more results of a source, send its next_page_key back in page_key, with that source alone in sources: the server refuses a page key otherwise.

Source

pub async fn search_episode_medias_stream( &self, serie_id: &str, season: u32, number: u32, name: Option<&str>, sources: &[String], page_key: Option<&str>, ) -> Result<SearchStream<SseLookupSearchEvent>>

Searches the library’s sources for files of an episode, like Self::search_movie_medias_stream; name replaces the name of the series. Add one with Self::add_searched_episode_media.

Source

pub async fn search_book_medias_stream( &self, book_id: &str, name: Option<&str>, sources: &[String], page_key: Option<&str>, ) -> Result<SearchStream<SseLookupSearchEvent>>

Searches the library’s sources for files of a book, like Self::search_movie_medias_stream. Add one with Self::download_medias.

Source

pub async fn process_request(&self, request: &RsRequest) -> Result<RsRequest>

Runs a request through the library’s plugins and returns it processed: a link turned into a direct one, a status that says what to do next (RsRequest::status)…

Source

pub async fn process_request_bytes( &self, request: &RsRequest, ) -> Result<Vec<u8>>

Runs a request through the library’s plugins and returns what it gives, whole: an image behind a protected link, for example.

Source

pub async fn check_request_permanent( &self, request: &RsRequest, ) -> Result<RsRequest>

Asks the library’s plugins for a link to request that does not expire, to keep it. Returns the request with that link and permanent set.

Source

pub async fn add_request( &self, request: &RsRequest, media_ref: Option<&str>, ) -> Result<RsRequestProcessing>

Hands a request to a plugin that prepares it in the background (a debrid service fetching a torrent, for example). Returns the task; its progress comes with the request_processing events. media_ref ties it to a media.

Source

pub async fn request_share_url(&self, url: &str) -> Result<String>

A URL that streams what the request URL url gives, through the server and its plugins, that anyone can open for 6 hours without the user’s token: for a player. Needs an HTTP transport.

Source

pub async fn get_deleted(&self, query: &DeletedQuery) -> Result<Vec<RsDeleted>>

What was deleted from the library: with after, strictly after it (Unix milliseconds). Page with limit and offset.

Source

pub async fn set_passphrase(&self, passphrase: &str) -> Result<()>

Sets the passphrase of an encrypted library. It is checked on the thumbnail of one media when there is one: a wrong passphrase gives Error::InvalidPassphrase, and a failure to fetch that thumbnail its own error.

Source

pub fn clear_passphrase(&self)

Forgets the passphrase.

Trait Implementations§

Source§

impl Clone for LibraryApi

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for LibraryApi

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl !RefUnwindSafe for LibraryApi

§

impl !UnwindSafe for LibraryApi

§

impl Forget for LibraryApi

§

impl Freeze for LibraryApi
where *const ArcInner<Inner> is !null: Freeze, PhantomData<ArcInner<Inner>>: Freeze, *const u8 is !null: Freeze, PhantomData<u8>: Freeze, PhantomData<UserMapping>: Freeze, PhantomData<LibraryRole>: Freeze, *const ArcInner<Mutex<Option<[u8; 32]>>> is !null: Freeze, PhantomData<ArcInner<Mutex<Option<[u8; 32]>>>>: Freeze,

§

impl Move for LibraryApi

§

impl Send for LibraryApi
where Arc<Inner>: Send, RawVecInner: Send, Arc<Mutex<Option<[u8; 32]>>>: Send,

§

impl Sync for LibraryApi
where Arc<Inner>: Sync, RawVecInner: Sync, Arc<Mutex<Option<[u8; 32]>>>: Sync,

§

impl Unpin for LibraryApi
where Arc<Inner>: Unpin, *const u8 is !null: Unpin, Arc<Mutex<Option<[u8; 32]>>>: Unpin,

§

impl UnsafeUnpin for LibraryApi

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> MaybeSend for T
where T: Send + Sync + ?Sized,

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more