Skip to main content

Message

Enum Message 

Source
pub enum Message {
Show 166 variants TogglePopup, StepNote(Step), OpenMarked, ShareMarked, PlayMarked, ReplyMarked, RepostMarked, StepChoice(Step), ZapMarked, BookmarkMarked, GoToBookmarks, GoToSearch, ShowKeys, ShowWaiting, GoBack, Backspace { held: bool, }, PopupClosed(Id), PopupUnfocused(Id), ButtonGone, ScreenMeasured(Option<Screen>), UpdateConfig(Config), NostrReady(Result<NostrService, String>), LoginInputChanged(SecretInput), ToggleLoginInputVisibility, SubmitLogin, CancelLogin, CopyClientKey, LoginComplete(Result<Account, SignInError>), AccountRestored(Result<Account, String>), SignOut, SignedOut(Result<(), String>), FeedCached(u64, Result<Vec<Note>, String>), RefreshFeed, FeedFetched { list: u64, page: FeedPage, until: Option<u64>, result: Result<Vec<Note>, FetchError>, }, CheckForNewNotes, ShowNewNotes(u64), LoadOlderNotes(u64), SelectFeedMode(Entity), ContactsLoaded { feed: u64, source: Source, result: Result<Option<Vec<PublicKey>>, FetchError>, }, ProfilesCached { requested: Vec<PublicKey>, found: Vec<(PublicKey, Profile)>, }, ProfilesFetched(Vec<(PublicKey, Profile)>), OpenThread(EventId, Whereabouts), ThreadLoaded { focused: EventId, source: Source, result: Result<Vec<Note>, FetchError>, }, OpenProfile(PublicKey), CopyNpub(PublicKey), Nip05Checked { person: PublicKey, name: String, verified: bool, }, Follow { person: PublicKey, follow: bool, first_list: bool, }, FollowChanged { account: PublicKey, person: PublicKey, result: Result<Vec<PublicKey>, FollowError>, }, ClosePage, ToggleMenu, CloseMenu, OpenSettings, CloseSettings, OpenKeys, CloseKeys, OpenSearch, SearchTyped(u64, String), Search(u64), SearchShow(u64, SearchFor), SearchFound { page: u64, serial: u64, what: SearchFor, result: Result<Found, FetchError>, }, SearchNamed { page: u64, name: String, person: Option<PublicKey>, }, RelayInfoLoaded { page: u64, serial: u64, info: Option<RelayInfo>, }, OpenRelays, CloseRelays, RelayListsLoaded { account: PublicKey, source: Source, result: Result<RelayLists, FetchError>, }, RelayUseLoaded(HashMap<RelayUrl, RelayUse>), RelayTyped(Section, String), AddRelay(Section), RemoveRelay(Section, RelayUrl), ShiftRelay(Section, RelayUrl, bool), SaveRelays, RelaysSaved { account: PublicKey, advertised: Option<Result<Option<Event>, ListError>>, listed: Vec<(Section, Result<ListedRelays, ListError>)>, }, RelaySaid { relay: RelayUrl, info: Option<RelayInfo>, }, OpenMedia, CloseMedia, MediaServersLoaded { account: PublicKey, source: Source, result: Result<Option<Event>, FetchError>, }, MediaServerTyped(String), AddMediaServer, RemoveMediaServer(Url), ShiftMediaServer(Url, bool), SaveMediaServers, MediaServersSaved { account: PublicKey, result: Result<Option<Event>, ListError>, }, AttachMedia, MediaPicked(Result<Vec<PathBuf>, String>), ComposePaste, ComposePasted(Option<Pasted>), MediaUploaded { id: u64, result: Result<Attachment, AttachFailure>, }, CancelUpload(u64), UploadTick, SetLogLevel(LogLevel), SetNoteTextSize(u16), SetKeepDays(u32), SweepStore, DraftLoaded(String), DraftKept { account: PublicKey, target: Target, text: String, result: Result<(), String>, }, KeptDraftsLoaded { account: PublicKey, result: Result<Vec<(Target, String, Vec<Tag>)>, String>, }, ComposeNote, ComposeReply(EventId), ComposeQuote(EventId), ComposeEdited(Action), SelectComposeTab(Entity), ToggleComposePreview, ComposePreviewed(Note), CloseComposer, ComposerRubbedOut, DiscardDraft, ResumeComposer, Publish, Published { target: Target, result: Result<Note, PublishFailure>, }, EngagementLoaded { source: Source, account: Option<PublicKey>, result: Result<Standing, FetchError>, }, ToggleReactionMenu(EventId), CloseReactionMenu, OpenEmojiPicker, EmojiSearchTyped(String), EmojiGroup(Group), React(EventId, Reaction), ToggleRepostMenu(EventId), CloseRepostMenu, Repost(EventId), ShowWho(EventId, Left), WhoLoaded { note: EventId, what: Left, result: Result<Vec<Doer>, FetchError>, }, CloseWho, TakeScreenshot, ScreenshotTaken(Screenshot), Marked { note: EventId, mark: Mark, result: Result<(), PublishFailure>, }, BookmarksLoaded { account: PublicKey, source: Source, result: Result<Bookmarks, ListError>, }, Bookmark(EventId), Bookmarked { account: PublicKey, note: EventId, result: Result<Bookmarks, ListError>, }, OpenBookmarks, LoadBookmarkedNotes(u64), BookmarkedNotesLoaded { page: u64, taken: u64, from: usize, to: usize, notes: Vec<Note>, }, ZapNote(EventId), ZapAmountChanged(String), ZapCommentChanged(String), RequestZapInvoice, ZapInvoiceReady { note: EventId, result: Result<Invoice, ZapError>, }, CopyZapInvoice, ZapReceiptAwaited { note: EventId, paid: Option<String>, }, CloseZap, LoadImage(ImageRequest), CopyPicture(String), ImageLoaded(ImageRequest, Result<LoadedImage, String>), LoadPreview(String), PreviewLoaded(String, Result<Linked, String>), VideoPress(String), VideoFound(String, Result<String, FindError>), VideoMute, VideoVolume(f64), VideoVolumeSet, VideoSound(bool), VideoSpeedMenu, CloseVideoSpeedMenu, VideoSpeed(Speed), VideoSeeking(f64), VideoSeek, VideoTick, CopyShareLink(EventId), OpenNotifications, NotificationsLoaded { account: PublicKey, source: Source, older: bool, result: Result<Notified, FetchError>, }, LoadOlderNotifications, SelectNotificationsTab(Entity), ZapperKnown(PublicKey, Result<Option<PublicKey>, String>), ExpandNote(EventId), CollapseNote(EventId), OpenUrl(String), ClearError,
}
Expand description

Application messages for state updates

Variants§

§

TogglePopup

Toggle the popup window visibility

§

StepNote(Step)

j, k or Home was pressed where no text is being typed: on to the next note of the feed, back to the one before, or to its very top

§

OpenMarked

l or Enter was pressed where no widget had a use for it: open the row the keyboard is at

§

ShareMarked

y was pressed there: copy a share link to the note the keyboard is at

§

PlayMarked

Space was pressed there: play the video the note the keyboard is at links to first, or hold it; or follow its link, if that is first

§

ReplyMarked

r was pressed there: reply to the note the keyboard is at

§

RepostMarked

R was pressed there: offer the ways to pass on the note the keyboard is at

§

StepChoice(Step)

An arrow up or down was pressed there: to the way before, or the next, of the ways a menu offers

§

ZapMarked

z was pressed there: zap the note the keyboard is at

§

BookmarkMarked

b was pressed there: bookmark the note the keyboard is at, or take its bookmark off

§

GoToBookmarks

B was pressed there: show the bookmarks

§

GoToSearch

s was pressed there: show a page to search on

§

ShowKeys

? was pressed there: show what the keys do

§

ShowWaiting

. was pressed there: show the notes that wait for the list on show

§

GoBack

h was pressed there: go back, as the arrow at the top of the view does

§

Backspace

Backspace was pressed there, or is held down: go back; out of the composer too, which h is not

Fields

§held: bool
§

PopupClosed(Id)

Popup window was closed

§

PopupUnfocused(Id)

The popup lost the keyboard: something outside it was clicked

§

ButtonGone

The button in the panel is gone: there is nothing left to open the popup with

§

ScreenMeasured(Option<Screen>)

The screen the popup opens on: how tall it is, and how many of its pixels a point is, if that could be found out

§

UpdateConfig(Config)

Configuration was updated

§

NostrReady(Result<NostrService, String>)

The event store is open and relays are connecting (or the store failed to open)

§

LoginInputChanged(SecretInput)

The user edited the sign-in field

§

ToggleLoginInputVisibility

Show or hide what is typed in the sign-in field

§

SubmitLogin

Sign in with the key in the sign-in field

§

CancelLogin

Call off a sign-in that is waiting on a remote signer

§

CopyClientKey

Copy the key a remote signer knows this client by, to authorize it there

§

LoginComplete(Result<Account, SignInError>)

Signing in finished: the account, or why nobody was signed in

§

AccountRestored(Result<Account, String>)

The account named in the config was looked up in the keyring at startup

§

SignOut

Sign the account out

§

SignedOut(Result<(), String>)

The account’s secret key left the keyring (or the keyring refused)

§

FeedCached(u64, Result<Vec<Note>, String>)

The notes of a list already in the event store were read. With the list’s id.

§

RefreshFeed

Ask the relays for the newest notes of the feed

§

FeedFetched

A page of the list of notes list arrived from the relays: the newest, or the one before the note written at until

Fields

§list: u64
§until: Option<u64>
§

CheckForNewNotes

It is time to look for new notes for the feed

§

ShowNewNotes(u64)

Show the notes that wait for the list with this id, and go to its top

§

LoadOlderNotes(u64)

The list with this id was scrolled near its end, or asked to look further back: fetch the page before its oldest note

§

SelectFeedMode(Entity)

Which notes the lists show was chosen: with replies, or without

§

ContactsLoaded

Who the account follows, as far as one source knows: None if it has no contact list of theirs. With the id of the feed it was asked for.

Fields

§feed: u64
§source: Source
§result: Result<Option<Vec<PublicKey>>, FetchError>
§

ProfilesCached

Profiles of note authors were read from the event store; the rest are asked of the relays

Fields

§requested: Vec<PublicKey>
§found: Vec<(PublicKey, Profile)>
§

ProfilesFetched(Vec<(PublicKey, Profile)>)

Profiles arrived, as they stand now: from the relays, or read from the event store

§

OpenThread(EventId, Whereabouts)

Show the thread of this note, which may be where the second says if it is not at hand

§

ThreadLoaded

The conversation around a thread’s note, as far as one source knows it

Fields

§focused: EventId
§source: Source
§

OpenProfile(PublicKey)

Show this person’s profile

§

CopyNpub(PublicKey)

Copy this person’s npub to the clipboard

§

Nip05Checked

The domain in the name this person gives as theirs was asked whether it is

Fields

§person: PublicKey
§name: String
§verified: bool
§

Follow

Follow this person, or stop following them. first_list when the account agreed to a first contact list being written, having none

Fields

§person: PublicKey
§follow: bool
§first_list: bool
§

FollowChanged

The contact list of account changed for this person, or didn’t: who it follows now

Fields

§account: PublicKey
§person: PublicKey
§result: Result<Vec<PublicKey>, FollowError>
§

ClosePage

Close the page on show, a thread or a profile: back to what it was opened from

§

ToggleMenu

Show what the cog above the feed offers, or put it away

§

CloseMenu

Put away what the cog above the feed offers

§

OpenSettings

Show the settings

§

CloseSettings

Leave the settings

§

OpenKeys

Show what the keys do, in place of the list on show

§

CloseKeys

Back from what the keys do to the list that was on show

§

OpenSearch

Show a page to search for people and notes on

§

SearchTyped(u64, String)

What is typed on this search page changed

§

Search(u64)

Search for what is typed on this search page, or open what it names

§

SearchShow(u64, SearchFor)

Show the people this search page found, or the notes

§

SearchFound

What this search page’s search, the one so numbered, found of people or of notes; or that it didn’t

Fields

§page: u64
§serial: u64
§

SearchNamed

The domain of the name typed on this search page said whose it is, or didn’t

Fields

§page: u64
§name: String
§person: Option<PublicKey>
§

RelayInfoLoaded

What the relay this search page shows says of itself, for the search so numbered

Fields

§page: u64
§serial: u64
§

OpenRelays

Show the account’s relays

§

CloseRelays

Leave the account’s relays

§

RelayListsLoaded

The relay lists of account, as far as one source knows

Fields

§account: PublicKey
§source: Source
§

RelayUseLoaded(HashMap<RelayUrl, RelayUse>)

How the relays this is connected to are doing

§

RelayTyped(Section, String)

What is typed where a relay is added to this set changed

§

AddRelay(Section)

Add the relay typed to this set

§

RemoveRelay(Section, RelayUrl)

Take this relay out of this set

§

ShiftRelay(Section, RelayUrl, bool)

Move this relay a place up this set (true), or down

§

SaveRelays

Write the relays as the page has them to the account’s lists

§

RelaysSaved

The relay lists of account were changed, or weren’t: each as it is now, of those there was a change to

Fields

§account: PublicKey
§advertised: Option<Result<Option<Event>, ListError>>
§

RelaySaid

A relay on the relays page said what it is, or didn’t

Fields

§relay: RelayUrl
§

OpenMedia

Show the account’s media servers

§

CloseMedia

Leave the account’s media servers

§

MediaServersLoaded

The media server list of account, as far as one source knows

Fields

§account: PublicKey
§source: Source
§result: Result<Option<Event>, FetchError>
§

MediaServerTyped(String)

What is typed where a media server is added changed

§

AddMediaServer

Add the media server typed

§

RemoveMediaServer(Url)

Take this media server out

§

ShiftMediaServer(Url, bool)

Move this media server a place up (true), or down

§

SaveMediaServers

Write the media servers as the page has them to the account’s list

§

MediaServersSaved

The media server list of account was changed, or wasn’t: as it is now

Fields

§account: PublicKey
§result: Result<Option<Event>, ListError>
§

AttachMedia

Pick what is to be attached to what is being written

§

MediaPicked(Result<Vec<PathBuf>, String>)

The file chooser is done: with these files, with none, or it could not be opened

§

ComposePaste

Ctrl+V was pressed in the composer

§

ComposePasted(Option<Pasted>)

What was on the clipboard when it was

§

MediaUploaded

The file so numbered is on a media server, or isn’t

§

CancelUpload(u64)

Call off the file so numbered, which is on its way

§

UploadTick

Time to show how far the files on their way have got

§

SetLogLevel(LogLevel)

Log this much from now on

§

SetNoteTextSize(u16)

Set the text of notes in this size from now on

§

SetKeepDays(u32)

Keep other people’s notes in the event store for this many days from now on; 0 is for good

§

SweepStore

It is time to see whether the event store is to let go of what is old

§

DraftLoaded(String)

The draft of a new note was read from where it is kept between runs

§

DraftKept

The relay of this machine took this text as the draft of account for this target, or didn’t

Fields

§account: PublicKey
§target: Target
§text: String
§result: Result<(), String>
§

KeptDraftsLoaded

The drafts of account that the relay of this machine keeps, each with what it says of the files it links to

Fields

§account: PublicKey
§result: Result<Vec<(Target, String, Vec<Tag>)>, String>
§

ComposeNote

Write a new note

§

ComposeReply(EventId)

Write a reply to this note

§

ComposeQuote(EventId)

Write a note that quotes this note

§

ComposeEdited(Action)

Something was typed, selected or moved in the composer

§

SelectComposeTab(Entity)

Writing or looking at how it would show was chosen, in the composer

§

ToggleComposePreview

The other of writing and looking at how it would show (Ctrl+P)

§

ComposePreviewed(Note)

What is being written, with the notes it quotes that were found

§

CloseComposer

Leave the composer, keeping what was written

§

ComposerRubbedOut

Backspace was pressed in the composer’s text with nothing left in it: leave the composer

§

DiscardDraft

Leave the composer, and keep nothing of what was written

§

ResumeComposer

Not leaving the composer after all: go on writing

§

Publish

Sign what was written and send it to the relays

§

Published

What was written to target went out as this note, or didn’t

Fields

§target: Target
§

EngagementLoaded

How many answered, reposted, liked and zapped these notes, as far as one source knows and for the account whose likes and reposts were told apart; and which relays they were seen on

Fields

§source: Source
§account: Option<PublicKey>
§

ToggleReactionMenu(EventId)

Offer what to react to this note with, or put the offer away if it is showing

§

CloseReactionMenu

Put that offer away

§

OpenEmojiPicker

Show every emoji there is to react with, in place of the few offered first

§

EmojiSearchTyped(String)

What to find an emoji by was typed

§

EmojiGroup(Group)

Show this group of emoji to pick from

§

React(EventId, Reaction)

React to this note: with a like, or with an emoji

§

ToggleRepostMenu(EventId)

Show what can be done to pass this note on, repost it or quote it, or put that away

§

CloseRepostMenu

Put away what can be done to pass a note on

§

Repost(EventId)

Repost this note

§

ShowWho(EventId, Left)

Show who left this on this note, under the count of them, or put that away if it shows

§

WhoLoaded

Who left this on this note was read from the store, or could not be

Fields

§note: EventId
§what: Left
§

CloseWho

Put away who left something on a note

§

TakeScreenshot

Ctrl+Shift+S: take a picture of the popup

§

ScreenshotTaken(Screenshot)

The renderer handed over what it drew of the popup, to be written to a file

§

Marked

The account’s like or repost of this note went out, or didn’t

Fields

§note: EventId
§mark: Mark
§

BookmarksLoaded

What account has bookmarked, as far as one source knows

Fields

§account: PublicKey
§source: Source
§

Bookmark(EventId)

Bookmark this note, or take its bookmark off if it has one

§

Bookmarked

The bookmark list of account changed for this note, or didn’t: what it has bookmarked now

Fields

§account: PublicKey
§note: EventId
§

OpenBookmarks

Show the notes the account has bookmarked

§

LoadBookmarkedNotes(u64)

The bookmarks page with this id was scrolled near the end of the notes it shows: look up the next of them

§

BookmarkedNotesLoaded

The notes bookmarked fromth to toth were looked up for the bookmarks page with this id, as it had them the takenth time it took them from the list: those that were found

Fields

§page: u64
§taken: u64
§from: usize
§notes: Vec<Note>
§

ZapNote(EventId)

Zap this note

§

ZapAmountChanged(String)

The amount to zap was typed, or a preset chosen

§

ZapCommentChanged(String)

The comment to go with a zap was typed

§

RequestZapInvoice

Ask the author’s Lightning address for an invoice of the amount chosen

§

ZapInvoiceReady

The invoice for the zap of this note came, or why it didn’t

Fields

§note: EventId
§

CopyZapInvoice

Copy the invoice on show to the clipboard

§

ZapReceiptAwaited

The wait for the receipt of this note’s zap ended: with the invoice paid, or with nothing

Fields

§note: EventId
§

CloseZap

Leave the zap view

§

LoadImage(ImageRequest)

A view needs this picture

§

CopyPicture(String)

A picture was clicked with the right button: put the picture at this address on the clipboard

§

ImageLoaded(ImageRequest, Result<LoadedImage, String>)

The picture arrived, or why it didn’t

§

LoadPreview(String)

A view needs what the web page at this address says of itself

§

PreviewLoaded(String, Result<Linked, String>)

What the page at this address says of itself, or why there is nothing to show

§

VideoPress(String)

The video at this address was pressed: play it, or hold it if it plays

§

VideoFound(String, Result<String, FindError>)

What there is to play of the YouTube video at this address was found: the address of a stream, or why not

§

VideoMute

Turn the sound of the video that plays off, or back on

§

VideoVolume(f64)

The slider of the sound of the video that plays is being dragged: make it this loud, from nothing (0) to whole (1)

§

VideoVolumeSet

That slider was let go

§

VideoSound(bool)

The pointer came over the sound controls of the video that plays (true), or left them

§

VideoSpeedMenu

Open the menu of speeds a video plays at, or close it if it is open

§

CloseVideoSpeedMenu

Put that menu away

§

VideoSpeed(Speed)

Play videos at this speed from now on

§

VideoSeeking(f64)

The video that plays is being dragged to this many seconds in

§

VideoSeek

It was let go there

§

VideoTick

Time to look at the video that plays: for a new picture, how far in it is, whether it ended

Copy a link to this note that anyone can open

§

OpenNotifications

Show what the account is told of

§

NotificationsLoaded

A page of what the account is told of was read from the store, or came from the relays: the newest, or, if older, the one before the oldest known

Fields

§account: PublicKey
§source: Source
§older: bool
§

LoadOlderNotifications

The list of notifications was scrolled near its end: look for older ones

§

SelectNotificationsTab(Entity)

Show this kind of notification

§

ZapperKnown(PublicKey, Result<Option<PublicKey>, String>)

The account’s Lightning address said which key signs its zap receipts, or could not be asked

§

ExpandNote(EventId)

Show all this note says, in its row

§

CollapseNote(EventId)

Show this note cut again, as a row first shows a long one

§

OpenUrl(String)

A link in a note was clicked: open it in the browser

§

ClearError

Dismiss the error banner

Trait Implementations§

Source§

impl Clone for Message

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 Message

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Widget<Message, Theme, Renderer<Renderer, Renderer>> for Screen<'_>

Source§

fn children(&self) -> Vec<Tree>

Returns the state [Tree] of the children of the [Widget].
Source§

fn diff(&mut self, tree: &mut Tree)

Reconciles the [Widget] with the provided [Tree].
Source§

fn size(&self) -> Size<Length>

Returns the [Size] of the [Widget] in lengths.
Source§

fn layout( &mut self, tree: &mut Tree, renderer: &Renderer, limits: &Limits, ) -> Node

Returns the [layout::Node] of the [Widget]. Read more
Source§

fn operate( &mut self, tree: &mut Tree, layout: Layout<'_>, renderer: &Renderer, operation: &mut dyn Operation, )

Applies an [Operation] to the [Widget].
Source§

fn update( &mut self, tree: &mut Tree, event: &Event, layout: Layout<'_>, cursor: Cursor, renderer: &Renderer, clipboard: &mut dyn Clipboard, shell: &mut Shell<'_, Message>, viewport: &Rectangle, )

Processes a runtime [Event]. Read more
Source§

fn draw( &self, tree: &Tree, renderer: &mut Renderer, theme: &Theme, style: &Style, layout: Layout<'_>, cursor: Cursor, viewport: &Rectangle, )

Draws the [Widget] using the associated Renderer.
Source§

fn mouse_interaction( &self, tree: &Tree, layout: Layout<'_>, cursor: Cursor, viewport: &Rectangle, renderer: &Renderer, ) -> Interaction

Returns the current [mouse::Interaction] of the [Widget]. Read more
Source§

fn overlay<'b>( &'b mut self, tree: &'b mut Tree, layout: Layout<'b>, renderer: &Renderer, viewport: &Rectangle, translation: Vector, ) -> Option<Element<'b, Message, Theme, Renderer>>

Returns the overlay of the [Widget], if there is any.
§

fn size_hint(&self) -> Size<Length>

Returns a [Size] hint for laying out the [Widget]. Read more
§

fn tag(&self) -> Tag

Returns the Tag of the [Widget].
§

fn state(&self) -> State

Returns the State of the [Widget].
§

fn a11y_nodes( &self, _layout: Layout<'_>, _state: &Tree, _cursor: Cursor, ) -> A11yTree

get the a11y nodes for the widget and its children
§

fn id(&self) -> Option<Id>

Returns the id of the widget
§

fn set_id(&mut self, _id: Id)

Sets the id of the widget This may be called while diffing the widget tree
§

fn drag_destinations( &self, _state: &Tree, _layout: Layout<'_>, _renderer: &Renderer, _dnd_rectangles: &mut DndDestinationRectangles, )

Adds the drag destination rectangles of the widget. Runs after the layout phase for each widget in the tree.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S
where T: Real + Zero + Arithmetics + Clone, Swp: WhitePoint<T>, Dwp: WhitePoint<T>, D: AdaptFrom<S, Swp, Dwp, T>,

Source§

fn adapt_into_using<M>(self, method: M) -> D
where M: TransformMatrix<T>,

👎Deprecated since 0.7.7:

replaced by palette::chromatic_adaptation::AdaptIntoUnclamped

Convert the source color to the destination color using the specified method.
Source§

fn adapt_into(self) -> D

👎Deprecated since 0.7.7:

replaced by palette::chromatic_adaptation::AdaptIntoUnclamped

Convert the source color to the destination color using the bradford method by default.
Source§

impl<T, C> AdaptIntoUnclamped<T> for C
where T: AdaptFromUnclamped<C>,

Source§

type Scalar = <T as AdaptFromUnclamped<C>>::Scalar

The number type that’s used as the color’s components.
Source§

fn adapt_into_unclamped_with<M>(self) -> T

Adapt a color of type Self into a color of type T, using the custom matrix M. Read more
Source§

fn adapt_into_unclamped(self) -> T
where Bradford: LmsToXyz<Self::Scalar> + XyzToLms<Self::Scalar>,

Adapt a color of type Self into a color of type T, using the Bradford matrix. Read more
§

impl<T> Also for T

§

fn also<F>(self, block: F) -> Self
where F: FnOnce(&mut Self),

Apply a function to this value and return the (possibly) modified value.
Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T, Res> Apply<Res> for T
where T: ?Sized,

§

fn apply<F>(self, f: F) -> Res
where F: FnOnce(Self) -> Res, Self: Sized,

Apply a function which takes the parameter by value.
§

fn apply_ref<F>(&self, f: F) -> Res
where F: FnOnce(&Self) -> Res,

Apply a function which takes the parameter by reference.
§

fn apply_mut<F>(&mut self, f: F) -> Res
where F: FnOnce(&mut Self) -> Res,

Apply a function which takes the parameter by mutable reference.
Source§

impl<T, C> ArraysFrom<C> for T
where C: IntoArrays<T>,

Source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
Source§

impl<T, C> ArraysInto<C> for T
where C: FromArrays<T>,

Source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
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<WpParam, T, U> Cam16IntoUnclamped<WpParam, T> for U
where T: FromCam16Unclamped<WpParam, U>,

Source§

type Scalar = <T as FromCam16Unclamped<WpParam, U>>::Scalar

The number type that’s used in parameters when converting.
Source§

fn cam16_into_unclamped( self, parameters: BakedParameters<WpParam, <U as Cam16IntoUnclamped<WpParam, T>>::Scalar>, ) -> T

Converts self into C, using the provided parameters.
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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, C> ComponentsFrom<C> for T
where C: IntoComponents<T>,

Source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
§

impl<T> Downcast for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
§

impl<T> Downcast<T> for T

§

fn downcast(&self) -> &T

§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync> ⓘ

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromAngle<T> for T

Source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
Source§

impl<T, U> FromStimulus<U> for T
where U: IntoStimulus<T>,

Source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, rounding and clamping.
§

impl<T> Instrument for T

§

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

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

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, U> IntoAngle<U> for T
where U: FromAngle<T>,

Source§

fn into_angle(self) -> U

Performs a conversion into T.
§

impl<State, Message> IntoBoot<State, Message> for State

§

fn into_boot(self) -> (State, Task<Message>)

Turns some type into the initial state of some [Application].
Source§

impl<WpParam, T, U> IntoCam16Unclamped<WpParam, T> for U
where T: Cam16FromUnclamped<WpParam, U>,

Source§

type Scalar = <T as Cam16FromUnclamped<WpParam, U>>::Scalar

The number type that’s used in parameters when converting.
Source§

fn into_cam16_unclamped( self, parameters: BakedParameters<WpParam, <U as IntoCam16Unclamped<WpParam, T>>::Scalar>, ) -> T

Converts self into C, using the provided parameters.
Source§

impl<T, U> IntoColor<U> for T
where U: FromColor<T>,

Source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
Source§

impl<T, U> IntoColorUnclamped<U> for T
where U: FromColorUnclamped<T>,

Source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> IntoStimulus<T> for T

Source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, rounding and clamping.
§

impl<T> MaybeClone for T

§

impl<T> MaybeDebug for T

§

impl<T> MaybeSend for T
where T: Send,

§

impl<T> MaybeSync for T
where T: Sync,

§

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

§

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
§

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
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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, C> TryComponentsInto<C> for T
where C: TryFromComponents<T>,

Source§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
Source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of colors. 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, U> TryIntoColor<U> for T
where U: TryFromColor<T>,

Source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined range, otherwise an OutOfBounds error is returned which contains the unclamped color. Read more
Source§

impl<C, U> UintsFrom<C> for U
where C: IntoUints<U>,

Source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
Source§

impl<C, U> UintsInto<C> for U
where C: FromUints<U>,

Source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
§

impl<T> Upcast<T> for T

§

fn upcast(&self) -> Option<&T>

§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WasmNotSend for T
where T: Send,

§

impl<T> WasmNotSendSync for T
where T: WasmNotSend + WasmNotSync,

§

impl<T> WasmNotSync for T
where T: Sync,

§

impl<T> WithSubscriber for T

§

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
§

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

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