Skip to main content

Server

Struct Server 

Source
pub struct Server { /* private fields */ }

Implementations§

Source§

impl Server

Source

pub fn new(client: Client) -> Self

Source

pub fn server_info() -> ServerInfo

Trait Implementations§

Source§

impl LanguageServer for Server

Source§

async fn initialize(&self, params: InitializeParams) -> Result<InitializeResult>

The initialize request is the first request sent from the client to the server. Read more
Source§

async fn initialized(&self, _: InitializedParams)

The initialized notification is sent from the client to the server after the client received the result of the initialize request but before the client sends anything else. Read more
Source§

async fn did_open(&self, params: DidOpenTextDocumentParams)

The textDocument/didOpen notification is sent from the client to the server to signal that a new text document has been opened by the client. Read more
Source§

async fn did_change(&self, params: DidChangeTextDocumentParams)

The textDocument/didChange notification is sent from the client to the server to signal changes to a text document. Read more
Source§

async fn did_close(&self, params: DidCloseTextDocumentParams)

The textDocument/didClose notification is sent from the client to the server when the document got closed in the client. Read more
Source§

async fn shutdown(&self) -> Result<()>

The shutdown request asks the server to gracefully shut down, but to not exit. Read more
Source§

fn will_save( &self, params: WillSaveTextDocumentParams, ) -> impl Future<Output = ()> + Send

The textDocument/willSave notification is sent from the client to the server before the document is actually saved.
Source§

fn will_save_wait_until( &self, params: WillSaveTextDocumentParams, ) -> impl Future<Output = Result<Option<Vec<TextEdit>>, Error>> + Send

The textDocument/willSaveWaitUntil request is sent from the client to the server before the document is actually saved. Read more
Source§

fn did_save( &self, params: DidSaveTextDocumentParams, ) -> impl Future<Output = ()> + Send

The textDocument/didSave notification is sent from the client to the server when the document was saved in the client.
Source§

fn notebook_did_open( &self, params: DidOpenNotebookDocumentParams, ) -> impl Future<Output = ()> + Send

The notebookDocument/didOpen notification is sent from the client to the server when a new notebook document is opened. It is only sent for notebooks selected by the notebookDocumentSync server capability.
Source§

fn notebook_did_change( &self, params: DidChangeNotebookDocumentParams, ) -> impl Future<Output = ()> + Send

The notebookDocument/didChange notification is sent from the client to the server when a notebook document changes. It is only sent for notebooks selected by the notebookDocumentSync server capability.
Source§

fn notebook_did_save( &self, params: DidSaveNotebookDocumentParams, ) -> impl Future<Output = ()> + Send

The notebookDocument/didSave notification is sent from the client to the server when a notebook document is saved. It is only sent for notebooks selected by the notebookDocumentSync server capability.
Source§

fn notebook_did_close( &self, params: DidCloseNotebookDocumentParams, ) -> impl Future<Output = ()> + Send

The notebookDocument/didClose notification is sent from the client to the server when a notebook document is closed. It is only sent for notebooks selected by the notebookDocumentSync server capability.
Source§

fn goto_declaration( &self, params: GotoDefinitionParams, ) -> impl Future<Output = Result<Option<GotoDefinitionResponse>, Error>> + Send

The textDocument/declaration request asks the server for the declaration location of a symbol at a given text document position. Read more
Source§

fn goto_definition( &self, params: GotoDefinitionParams, ) -> impl Future<Output = Result<Option<GotoDefinitionResponse>, Error>> + Send

The textDocument/definition request asks the server for the definition location of a symbol at a given text document position. Read more
Source§

fn goto_type_definition( &self, params: GotoDefinitionParams, ) -> impl Future<Output = Result<Option<GotoDefinitionResponse>, Error>> + Send

The textDocument/typeDefinition request asks the server for the type definition location of a symbol at a given text document position. Read more
Source§

fn goto_implementation( &self, params: GotoDefinitionParams, ) -> impl Future<Output = Result<Option<GotoDefinitionResponse>, Error>> + Send

The textDocument/implementation request is sent from the client to the server to resolve the implementation location of a symbol at a given text document position. Read more
Source§

fn references( &self, params: ReferenceParams, ) -> impl Future<Output = Result<Option<Vec<Location>>, Error>> + Send

The textDocument/references request is sent from the client to the server to resolve project-wide references for the symbol denoted by the given text document position.
Source§

fn prepare_call_hierarchy( &self, params: CallHierarchyPrepareParams, ) -> impl Future<Output = Result<Option<Vec<CallHierarchyItem>>, Error>> + Send

The textDocument/prepareCallHierarchy request is sent from the client to the server to return a call hierarchy for the language element of given text document positions. Read more
Source§

fn incoming_calls( &self, params: CallHierarchyIncomingCallsParams, ) -> impl Future<Output = Result<Option<Vec<CallHierarchyIncomingCall>>, Error>> + Send

The callHierarchy/incomingCalls request is sent from the client to the server to resolve incoming calls for a given call hierarchy item. Read more
Source§

fn outgoing_calls( &self, params: CallHierarchyOutgoingCallsParams, ) -> impl Future<Output = Result<Option<Vec<CallHierarchyOutgoingCall>>, Error>> + Send

The callHierarchy/outgoingCalls request is sent from the client to the server to resolve outgoing calls for a given call hierarchy item. Read more
Source§

fn prepare_type_hierarchy( &self, params: TypeHierarchyPrepareParams, ) -> impl Future<Output = Result<Option<Vec<TypeHierarchyItem>>, Error>> + Send

The textDocument/prepareTypeHierarchy request is sent from the client to the server to return a type hierarchy for the language element of given text document positions. Read more
Source§

fn supertypes( &self, params: TypeHierarchySupertypesParams, ) -> impl Future<Output = Result<Option<Vec<TypeHierarchyItem>>, Error>> + Send

The [typeHierarchy/supertypes] request is sent from the client to the server to resolve the supertypes for a given type hierarchy item. Read more
Source§

fn subtypes( &self, params: TypeHierarchySubtypesParams, ) -> impl Future<Output = Result<Option<Vec<TypeHierarchyItem>>, Error>> + Send

The [typeHierarchy/subtypes] request is sent from the client to the server to resolve the subtypes for a given type hierarchy item. Read more
Source§

fn document_highlight( &self, params: DocumentHighlightParams, ) -> impl Future<Output = Result<Option<Vec<DocumentHighlight>>, Error>> + Send

The textDocument/documentHighlight request is sent from the client to the server to resolve appropriate highlights for a given text document position. Read more
The textDocument/documentLink request is sent from the client to the server to request the location of links in a document. Read more
The documentLink/resolve request is sent from the client to the server to resolve the target of a given document link. Read more
Source§

fn hover( &self, params: HoverParams, ) -> impl Future<Output = Result<Option<Hover>, Error>> + Send

The textDocument/hover request asks the server for hover information at a given text document position. Read more
Source§

fn code_lens( &self, params: CodeLensParams, ) -> impl Future<Output = Result<Option<Vec<CodeLens>>, Error>> + Send

The textDocument/codeLens request is sent from the client to the server to compute code lenses for a given text document.
Source§

fn code_lens_resolve( &self, params: CodeLens, ) -> impl Future<Output = Result<CodeLens, Error>> + Send

The codeLens/resolve request is sent from the client to the server to resolve the command for a given code lens item.
Source§

fn folding_range( &self, params: FoldingRangeParams, ) -> impl Future<Output = Result<Option<Vec<FoldingRange>>, Error>> + Send

The textDocument/foldingRange request is sent from the client to the server to return all folding ranges found in a given text document. Read more
Source§

fn selection_range( &self, params: SelectionRangeParams, ) -> impl Future<Output = Result<Option<Vec<SelectionRange>>, Error>> + Send

The textDocument/selectionRange request is sent from the client to the server to return suggested selection ranges at an array of given positions. A selection range is a range around the cursor position which the user might be interested in selecting. Read more
Source§

fn document_symbol( &self, params: DocumentSymbolParams, ) -> impl Future<Output = Result<Option<DocumentSymbolResponse>, Error>> + Send

The textDocument/documentSymbol request is sent from the client to the server to retrieve all symbols found in a given text document. Read more
Source§

fn semantic_tokens_full( &self, params: SemanticTokensParams, ) -> impl Future<Output = Result<Option<SemanticTokensResult>, Error>> + Send

The textDocument/semanticTokens/full request is sent from the client to the server to resolve the semantic tokens of a given file. Read more
Source§

fn semantic_tokens_full_delta( &self, params: SemanticTokensDeltaParams, ) -> impl Future<Output = Result<Option<SemanticTokensFullDeltaResult>, Error>> + Send

The textDocument/semanticTokens/full/delta request is sent from the client to the server to resolve the semantic tokens of a given file, returning only the delta. Read more
Source§

fn semantic_tokens_range( &self, params: SemanticTokensRangeParams, ) -> impl Future<Output = Result<Option<SemanticTokensRangeResult>, Error>> + Send

The textDocument/semanticTokens/range request is sent from the client to the server to resolve the semantic tokens for the visible range of a given file. Read more
Source§

fn inline_value( &self, params: InlineValueParams, ) -> impl Future<Output = Result<Option<Vec<InlineValue>>, Error>> + Send

The textDocument/inlineValue request is sent from the client to the server to compute inline values for a given text document that may be rendered in the editor at the end of lines. Read more
Source§

fn inlay_hint( &self, params: InlayHintParams, ) -> impl Future<Output = Result<Option<Vec<InlayHint>>, Error>> + Send

The textDocument/inlayHint request is sent from the client to the server to compute inlay hints for a given (text document, range) tuple that may be rendered in the editor in place with other text. Read more
Source§

fn inlay_hint_resolve( &self, params: InlayHint, ) -> impl Future<Output = Result<InlayHint, Error>> + Send

The inlayHint/resolve request is sent from the client to the server to resolve additional information for a given inlay hint. Read more
Source§

fn moniker( &self, params: MonikerParams, ) -> impl Future<Output = Result<Option<Vec<Moniker>>, Error>> + Send

The textDocument/moniker request is sent from the client to the server to get the symbol monikers for a given text document position. Read more
Source§

fn completion( &self, params: CompletionParams, ) -> impl Future<Output = Result<Option<CompletionResponse>, Error>> + Send

The textDocument/completion request is sent from the client to the server to compute completion items at a given cursor position. Read more
Source§

fn completion_resolve( &self, params: CompletionItem, ) -> impl Future<Output = Result<CompletionItem, Error>> + Send

The completionItem/resolve request is sent from the client to the server to resolve additional information for a given completion item.
Source§

fn diagnostic( &self, params: DocumentDiagnosticParams, ) -> impl Future<Output = Result<DocumentDiagnosticReportResult, Error>> + Send

The textDocument/diagnostic request is sent from the client to the server to ask the server to compute the diagnostics for a given document. Read more
Source§

fn workspace_diagnostic( &self, params: WorkspaceDiagnosticParams, ) -> impl Future<Output = Result<WorkspaceDiagnosticReportResult, Error>> + Send

The workspace/diagnostic request is sent from the client to the server to ask the server to compute workspace wide diagnostics which previously where pushed from the server to the client. Read more
Source§

fn signature_help( &self, params: SignatureHelpParams, ) -> impl Future<Output = Result<Option<SignatureHelp>, Error>> + Send

The textDocument/signatureHelp request is sent from the client to the server to request signature information at a given cursor position.
Source§

fn code_action( &self, params: CodeActionParams, ) -> impl Future<Output = Result<Option<Vec<CodeActionOrCommand>>, Error>> + Send

The textDocument/codeAction request is sent from the client to the server to compute commands for a given text document and range. These commands are typically code fixes to either fix problems or to beautify/refactor code. Read more
Source§

fn code_action_resolve( &self, params: CodeAction, ) -> impl Future<Output = Result<CodeAction, Error>> + Send

The codeAction/resolve request is sent from the client to the server to resolve additional information for a given code action. Read more
Source§

fn document_color( &self, params: DocumentColorParams, ) -> impl Future<Output = Result<Vec<ColorInformation>, Error>> + Send

The textDocument/documentColor request is sent from the client to the server to list all color references found in a given text document. Along with the range, a color value in RGB is returned. Read more
Source§

fn color_presentation( &self, params: ColorPresentationParams, ) -> impl Future<Output = Result<Vec<ColorPresentation>, Error>> + Send

The textDocument/colorPresentation request is sent from the client to the server to obtain a list of presentations for a color value at a given location. Read more
Source§

fn formatting( &self, params: DocumentFormattingParams, ) -> impl Future<Output = Result<Option<Vec<TextEdit>>, Error>> + Send

The textDocument/formatting request is sent from the client to the server to format a whole document.
Source§

fn range_formatting( &self, params: DocumentRangeFormattingParams, ) -> impl Future<Output = Result<Option<Vec<TextEdit>>, Error>> + Send

The textDocument/rangeFormatting request is sent from pub(crate) the client to the server to format a given range in a document.
Source§

fn on_type_formatting( &self, params: DocumentOnTypeFormattingParams, ) -> impl Future<Output = Result<Option<Vec<TextEdit>>, Error>> + Send

The textDocument/onTypeFormatting request is sent from the client to the server to format parts of the document during typing.
Source§

fn rename( &self, params: RenameParams, ) -> impl Future<Output = Result<Option<WorkspaceEdit>, Error>> + Send

The textDocument/rename request is sent from the client to the server to ask the server to compute a workspace change so that the client can perform a workspace-wide rename of a symbol.
Source§

fn prepare_rename( &self, params: TextDocumentPositionParams, ) -> impl Future<Output = Result<Option<PrepareRenameResponse>, Error>> + Send

The textDocument/prepareRename request is sent from the client to the server to setup and test the validity of a rename operation at a given location. Read more
Source§

fn linked_editing_range( &self, params: LinkedEditingRangeParams, ) -> impl Future<Output = Result<Option<LinkedEditingRanges>, Error>> + Send

The textDocument/linkedEditingRange request is sent from the client to the server to return for a given position in a document the range of the symbol at the position and all ranges that have the same content. Read more
Source§

fn symbol( &self, params: WorkspaceSymbolParams, ) -> impl Future<Output = Result<Option<WorkspaceSymbolResponse>, Error>> + Send

The workspace/symbol request is sent from the client to the server to list project-wide symbols matching the given query string. Read more
Source§

fn symbol_resolve( &self, params: WorkspaceSymbol, ) -> impl Future<Output = Result<WorkspaceSymbol, Error>> + Send

The workspaceSymbol/resolve request is sent from the client to the server to resolve additional information for a given workspace symbol. Read more
Source§

fn did_change_configuration( &self, params: DidChangeConfigurationParams, ) -> impl Future<Output = ()> + Send

The workspace/didChangeConfiguration notification is sent from the client to the server to signal the change of configuration settings.
Source§

fn did_change_workspace_folders( &self, params: DidChangeWorkspaceFoldersParams, ) -> impl Future<Output = ()> + Send

The workspace/didChangeWorkspaceFolders notification is sent from the client to the server to inform about workspace folder configuration changes. Read more
Source§

fn will_create_files( &self, params: CreateFilesParams, ) -> impl Future<Output = Result<Option<WorkspaceEdit>, Error>> + Send

The workspace/willCreateFiles request is sent from the client to the server before files are actually created as long as the creation is triggered from within the client. Read more
Source§

fn did_create_files( &self, params: CreateFilesParams, ) -> impl Future<Output = ()> + Send

The workspace/didCreateFiles request is sent from the client to the server when files were created from within the client.
Source§

fn will_rename_files( &self, params: RenameFilesParams, ) -> impl Future<Output = Result<Option<WorkspaceEdit>, Error>> + Send

The workspace/willRenameFiles request is sent from the client to the server before files are actually renamed as long as the rename is triggered from within the client. Read more
Source§

fn did_rename_files( &self, params: RenameFilesParams, ) -> impl Future<Output = ()> + Send

The workspace/didRenameFiles notification is sent from the client to the server when files were renamed from within the client.
Source§

fn will_delete_files( &self, params: DeleteFilesParams, ) -> impl Future<Output = Result<Option<WorkspaceEdit>, Error>> + Send

The workspace/willDeleteFiles request is sent from the client to the server before files are actually deleted as long as the deletion is triggered from within the client either by a user action or by applying a workspace edit. Read more
Source§

fn did_delete_files( &self, params: DeleteFilesParams, ) -> impl Future<Output = ()> + Send

The workspace/didDeleteFiles notification is sent from the client to the server when files were deleted from within the client.
Source§

fn did_change_watched_files( &self, params: DidChangeWatchedFilesParams, ) -> impl Future<Output = ()> + Send

The workspace/didChangeWatchedFiles notification is sent from the client to the server when the client detects changes to files watched by the language client. Read more
Source§

fn execute_command( &self, params: ExecuteCommandParams, ) -> impl Future<Output = Result<Option<Value>, Error>> + Send

The workspace/executeCommand request is sent from the client to the server to trigger command execution on the server. Read more

Auto Trait Implementations§

§

impl !Freeze for Server

§

impl !RefUnwindSafe for Server

§

impl !UnwindSafe for Server

§

impl Send for Server

§

impl Sync for Server

§

impl Unpin for Server

§

impl UnsafeUnpin for Server

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> ErasedDestructor for T
where T: 'static,

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> 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<'src, T> IntoMaybe<'src, T> for T
where T: 'src,

Source§

type Proj<U: 'src> = U

Source§

fn map_maybe<R>( self, _f: impl FnOnce(&'src T) -> &'src R, g: impl FnOnce(T) -> R, ) -> <T as IntoMaybe<'src, T>>::Proj<R>
where R: 'src,

Source§

impl<D> OwoColorize for D

Source§

fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>
where C: Color,

Set the foreground color generically Read more
Source§

fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>
where C: Color,

Set the background color generically. Read more
Source§

fn black(&self) -> FgColorDisplay<'_, Black, Self>

Change the foreground color to black
Source§

fn on_black(&self) -> BgColorDisplay<'_, Black, Self>

Change the background color to black
Source§

fn red(&self) -> FgColorDisplay<'_, Red, Self>

Change the foreground color to red
Source§

fn on_red(&self) -> BgColorDisplay<'_, Red, Self>

Change the background color to red
Source§

fn green(&self) -> FgColorDisplay<'_, Green, Self>

Change the foreground color to green
Source§

fn on_green(&self) -> BgColorDisplay<'_, Green, Self>

Change the background color to green
Source§

fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>

Change the foreground color to yellow
Source§

fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>

Change the background color to yellow
Source§

fn blue(&self) -> FgColorDisplay<'_, Blue, Self>

Change the foreground color to blue
Source§

fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>

Change the background color to blue
Source§

fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>

Change the foreground color to magenta
Source§

fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>

Change the background color to magenta
Source§

fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>

Change the foreground color to purple
Source§

fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>

Change the background color to purple
Source§

fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>

Change the foreground color to cyan
Source§

fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>

Change the background color to cyan
Source§

fn white(&self) -> FgColorDisplay<'_, White, Self>

Change the foreground color to white
Source§

fn on_white(&self) -> BgColorDisplay<'_, White, Self>

Change the background color to white
Source§

fn default_color(&self) -> FgColorDisplay<'_, Default, Self>

Change the foreground color to the terminal default
Source§

fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>

Change the background color to the terminal default
Source§

fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>

Change the foreground color to bright black
Source§

fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>

Change the background color to bright black
Source§

fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>

Change the foreground color to bright red
Source§

fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>

Change the background color to bright red
Source§

fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>

Change the foreground color to bright green
Source§

fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>

Change the background color to bright green
Source§

fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>

Change the foreground color to bright yellow
Source§

fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>

Change the background color to bright yellow
Source§

fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>

Change the foreground color to bright blue
Source§

fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>

Change the background color to bright blue
Source§

fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>

Change the foreground color to bright magenta
Source§

fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>

Change the background color to bright magenta
Source§

fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>

Change the foreground color to bright purple
Source§

fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>

Change the background color to bright purple
Source§

fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>

Change the foreground color to bright cyan
Source§

fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>

Change the background color to bright cyan
Source§

fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>

Change the foreground color to bright white
Source§

fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>

Change the background color to bright white
Source§

fn bold(&self) -> BoldDisplay<'_, Self>

Make the text bold
Source§

fn dimmed(&self) -> DimDisplay<'_, Self>

Make the text dim
Source§

fn italic(&self) -> ItalicDisplay<'_, Self>

Make the text italicized
Source§

fn underline(&self) -> UnderlineDisplay<'_, Self>

Make the text underlined
Make the text blink
Make the text blink (but fast!)
Source§

fn reversed(&self) -> ReversedDisplay<'_, Self>

Swap the foreground and background colors
Source§

fn hidden(&self) -> HiddenDisplay<'_, Self>

Hide the text
Source§

fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>

Cross out the text
Source§

fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>
where Color: DynColor,

Set the foreground color at runtime. Only use if you do not know which color will be used at compile-time. If the color is constant, use either OwoColorize::fg or a color-specific method, such as OwoColorize::green, Read more
Source§

fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>
where Color: DynColor,

Set the background color at runtime. Only use if you do not know what color to use at compile-time. If the color is constant, use either OwoColorize::bg or a color-specific method, such as OwoColorize::on_yellow, Read more
Source§

fn fg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>

Set the foreground color to a specific RGB value.
Source§

fn bg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>

Set the background color to a specific RGB value.
Source§

fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>

Sets the foreground color to an RGB value.
Source§

fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>

Sets the background color to an RGB value.
Source§

fn style(&self, style: Style) -> Styled<&Self>

Apply a runtime-determined style
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. 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