pub trait Utils {
const CRLF: &str = "\r\n";
const IS_EXTENDED: bool = true;
const LF: &str = "\n";
const READ_FROM_CLIPBOARD_COMMAND: &str = "pbpaste";
const WRITE_TO_CLIPBOARD_COMMAND: &str = "pbcopy";
const URI_PREFIX: &str = "file://";
Show 211 methods
// Provided methods
async fn abort_all_and_wait<T: 'static>(&mut self)
where Self: BorrowMut<JoinSet<T>> { ... }
fn absolute_utf8(&self) -> Result<Cow<'_, Utf8Path>, IoError>
where Self: AsRef<Utf8Path> { ... }
async fn achain<T: Future>(self, rhs: T) -> T::Output
where Self: Future + Sized { ... }
fn add_span<'a, T: Into<Span<'a>>>(self, span: T) -> Line<'a>
where Self: Into<Line<'a>> { ... }
fn anyhow_msg_error(self) -> AnyhowError
where Self: 'static + Debug + Display + Send + Sized + Sync { ... }
fn anyhow_error(self) -> AnyhowError
where Self: Into<AnyhowError> { ... }
fn anyhow_result<T, E: Into<AnyhowError>>(self) -> Result<T, AnyhowError>
where Self: Is<Result<T, E>> { ... }
fn arc(self) -> Arc<Self>
where Self: Sized { ... }
fn assign(&mut self, other: Self)
where Self: Sized { ... }
fn assign_to(self, other: &mut Self)
where Self: Sized { ... }
async fn async_with<T>(self, next: impl Future<Output = T>) -> T
where Self: Future + Sized { ... }
fn as_borrowed<'a, B: ?Sized + ToOwned>(&'a self) -> &'a B
where Self: Borrow<Cow<'a, B>> { ... }
fn as_immut(&mut self) -> &Self { ... }
fn as_ptr(&self) -> *const Self { ... }
fn as_ptr_mut(&mut self) -> *mut Self { ... }
fn as_utf8(&self) -> Result<&str, Utf8Error>
where Self: AsRef<[u8]> { ... }
fn as_utf8_path(&self) -> &Utf8Path
where Self: AsRef<Utf8Path> { ... }
fn as_valuable(&self) -> Value<'_>
where Self: AsValuable { ... }
fn bordered_block<'a>(self) -> Block<'a>
where Self: Into<Line<'a>> + Sized { ... }
fn buf_reader(self) -> BufReader<Self>
where Self: Read + Sized { ... }
fn buf_reader_async(self) -> TokioBufReader<Self>
where Self: AsyncRead + Sized { ... }
fn buf_writer(self) -> BufWriter<Self> ⓘ
where Self: Write + Sized { ... }
fn buf_writer_async(self) -> TokioBufWriter<Self>
where Self: AsyncWrite + Sized { ... }
fn cast_or_max<T: Bounded + NumCast>(self) -> T
where Self: Sized + ToPrimitive { ... }
fn cast_ref<T>(&self) -> &T { ... }
fn cat<T: Display>(&self, rhs: T) -> String
where Self: Display { ... }
fn check_next<T>(self) -> Result<T, AnyhowError>
where Self: Is<Option<T>> { ... }
fn check_present<T>(self) -> Result<T, AnyhowError>
where Self: Is<Option<T>> { ... }
async fn check_status(self) -> Result<Response, AnyhowError>
where Self: Is<Response> { ... }
fn clamped(self, min: Self, max: Self) -> Self
where Self: PartialOrd + Sized { ... }
fn collect_atoms<'a>(&mut self) -> String
where Self: Iterator<Item = Atom<'a>> { ... }
fn convert<T: From<Self>>(self) -> T
where Self: Sized { ... }
fn contains_eq<Q, K>(&self, query: Q) -> bool
where Self: AsRef<[K]>,
for<'a> &'a K: PartialEq<Q> { ... }
fn context_path<T, E, C: 'static + Display + Send + Sync, P: AsRef<Path>>(
self,
context: C,
path: P,
) -> Result<T, AnyhowError>
where Self: Context<T, E> + Sized { ... }
fn copied(&self) -> Self
where Self: Copy + Sized { ... }
async fn write_to_clipboard(&self) -> Result<ExitStatus, AnyhowError>
where Self: AsRef<[u8]> { ... }
async fn read_from_clipboard() -> Result<String, AnyhowError> { ... }
fn create(&self) -> Result<File, IoError>
where Self: AsRef<Path> { ... }
fn create_dir_all(&self) -> Result<(), IoError>
where Self: AsRef<Path> { ... }
fn cycle_in_place(&mut self, amount: isize, total: usize)
where Self: BorrowMut<usize> { ... }
fn debug(self) -> Debugged<Self>
where Self: Sized { ... }
fn decrement(&mut self)
where Self: One + SaturatingSub { ... }
fn decremented(&self) -> Self
where Self: One + SaturatingSub { ... }
fn deserialize_from_seq<'de, D: Deserializer<'de>, X: Deserialize<'de>, Y, E: Display, F: Fn(X) -> Result<Y, E>>(
deserializer: D,
func: F,
) -> Result<Self, D::Error>
where Self: Default + Extend<Y> { ... }
fn end_err<T>(self) -> Output<T, Self>
where Self: Sized { ... }
fn end_ok<T, E>(&self) -> Output<T, E> { ... }
fn err<T>(self) -> Result<T, Self>
where Self: Sized { ... }
fn expand_user(&self) -> Cow<'_, Utf8Path>
where Self: AsRef<str> { ... }
fn unexpand_user(&self) -> Cow<'_, Utf8Path>
where Self: AsRef<str> { ... }
fn extended_graphemes(&self) -> Graphemes<'_>
where Self: AsRef<str> { ... }
fn extended_grapheme_byte_indices(&self) -> impl Iterator<Item = usize>
where Self: AsRef<str> { ... }
fn extended_grapheme_and_byte_index_pairs(&self) -> GraphemeIndices<'_>
where Self: AsRef<str> { ... }
fn extended_grapheme_substring(&self, range: Range<usize>) -> &str
where Self: AsRef<str> { ... }
fn filter_sync(
self,
func: impl FnMut(&Self::Item) -> bool,
) -> Filter<Self, Ready<bool>, impl FnMut(&Self::Item) -> Ready<bool>>
where Self: Sized + StreamExt { ... }
fn file_name_ok(&self) -> Result<&str, AnyhowError>
where Self: AsRef<Utf8Path> { ... }
fn file_name_or_self(&self) -> &str
where Self: AsRef<Utf8Path> { ... }
fn find_eq<Q, K>(&self, query: Q) -> Option<(usize, &K)>
where Self: AsRef<[K]>,
for<'a> &'a K: PartialEq<Q> { ... }
fn find_substr<'a>(
&'a self,
substr: &str,
) -> Option<(&'a str, &'a str, &'a str)>
where Self: AsRef<str> { ... }
fn has_happened(self) -> bool
where Self: Is<Instant> { ... }
fn home_dirpath() -> Option<Utf8PathBuf> { ... }
fn if_else<T>(self, true_value: T, false_value: T) -> T
where Self: Is<bool> { ... }
fn immutable(&mut self) -> &Self { ... }
fn increment(&mut self)
where Self: One + SaturatingAdd { ... }
fn incremented(&self) -> Self
where Self: One + SaturatingAdd { ... }
fn index_into<T: Index<Self> + ?Sized>(self, collection: &T) -> &T::Output
where Self: Sized { ... }
fn index_into_mut<T: IndexMut<Self> + ?Sized>(
self,
collection: &mut T,
) -> &mut T::Output
where Self: Sized { ... }
fn insert_mut<'a, K: 'a + Eq + Hash, V>(
&'a mut self,
key: K,
value: V,
) -> &'a mut V
where Self: BorrowMut<HashMap<K, V>> { ... }
fn interpolate(
self,
old_min: impl ToPrimitive,
old_max: impl ToPrimitive,
new_min: impl ToPrimitive,
new_max: impl ToPrimitive,
) -> Self
where Self: Bounded + NumCast + ToPrimitive { ... }
fn into_box(self) -> Box<Self>
where Self: Sized { ... }
fn into_break<C>(self) -> ControlFlow<Self, C>
where Self: Sized { ... }
fn into_color<T>(self) -> T
where Self: IntoColor<T> { ... }
fn into_ok_err<T>(self) -> T
where Self: Is<Result<T, T>> { ... }
fn into_continue<B>(self) -> ControlFlow<B, Self>
where Self: Sized { ... }
fn into_cow_owned<B: ?Sized + ToOwned<Owned = Self>>(
self,
) -> Cow<'static, B>
where Self: Sized { ... }
fn into_endpoint(self) -> impl Endpoint<Output = Self>
where Self: Clone + IntoResponse + Sync { ... }
fn into_first(self) -> Self::Type
where Self: Sized + TupleRemove<U0> { ... }
fn into_second(self) -> Self::Type
where Self: Sized + TupleRemove<U1> { ... }
fn into_third(self) -> Self::Type
where Self: Sized + TupleRemove<U2> { ... }
fn into_interval(self) -> Interval
where Self: Is<Duration> { ... }
fn into_left<R>(self) -> Either<Self, R>
where Self: Sized { ... }
fn into_line<'a>(self) -> Line<'a>
where Self: Into<Cow<'a, str>> { ... }
fn into_manually_drop(self) -> ManuallyDrop<Self>
where Self: Sized { ... }
fn into_stream_reader<B: Buf, E: Into<IoError>>(
self,
) -> StreamReader<Self, B>
where Self: Sized + Stream<Item = Result<B, E>> { ... }
fn into_length_delimited_frames(self) -> Framed<Self, LengthDelimitedCodec>
where Self: Sized { ... }
fn into_line_frames(self) -> Framed<Self, LinesCodec>
where Self: Sized { ... }
fn into_utf8(self) -> Result<String, FromUtf8Error>
where Self: Is<Vec<u8>> { ... }
fn into_right<L>(self) -> Either<L, Self>
where Self: Sized { ... }
fn into_parse_request_payload_result<T>(
self,
) -> Result<T, ParseRequestPayloadError>
where Self: Is<Result<T, SerdeJsonError>> { ... }
async fn into_select<T: Future>(
self,
rhs: T,
) -> Either<Self::Output, T::Output>
where Self: Future + Sized { ... }
fn into_status<T, E>(self) -> Status<T, E>
where Self: Is<Result<T, E>> { ... }
fn into_stream(self) -> Self::Stream
where Self: IntoStream + Sized { ... }
fn into_string(self) -> Result<String, AnyhowError>
where Self: Is<PathBuf> { ... }
fn into_value_from_json<T: DeserializeOwned>(
self,
) -> Result<T, SerdeJsonError>
where Self: Is<Json> { ... }
fn invalid_utf8_err<T>(&self) -> Result<T, AnyhowError>
where Self: Debug { ... }
fn io_error(self) -> IoError
where Self: Into<Box<dyn StdError + Send + Sync>> { ... }
fn io_result<T, E: Into<Box<dyn StdError + Send + Sync>>>(
self,
) -> Result<T, IoError>
where Self: Is<Result<T, E>> { ... }
fn is_non_empty<T: Iterator>(&mut self) -> bool
where Self: BorrowMut<Peekable<T>> { ... }
fn is_empty<T: Iterator>(&mut self) -> bool
where Self: BorrowMut<Peekable<T>> { ... }
fn is_less_than<T: PartialOrd>(self, rhs: T) -> bool
where Self: Into<T> { ... }
fn is_positive(&self) -> bool
where Self: PartialOrd + Zero { ... }
fn is_newline(&self) -> bool
where Self: AsRef<str> { ... }
fn join_all(self) -> JoinAll<<Self as IntoIterator>::Item>
where Self: IntoIterator<Item: Future> + Sized { ... }
async fn join_all_into<T>(self) -> T
where Self: IntoIterator<Item: Future> + Sized,
T: FromIterator<<Self::Item as Future>::Output> { ... }
fn len_range<T: SaturatingSub>(&self) -> T
where Self: Borrow<Range<T>> { ... }
fn level<T, E>(&self) -> Level
where Self: Borrow<Result<T, E>> { ... }
fn log_error(&self)
where Self: Display { ... }
fn log_if_error<T, E: Display>(self) -> Self
where Self: Borrow<Result<T, E>> + Sized { ... }
fn map_collect<Y, T: FromIterator<Y>>(
self,
func: impl FnMut(Self::Item) -> Y,
) -> T
where Self: IntoIterator + Sized { ... }
fn map_into<Y, X: Into<Y>>(self) -> Option<Y>
where Self: Is<Option<X>> { ... }
fn map_as_ref<'a, Y: ?Sized, X: 'a + AsRef<Y>>(&'a self) -> Option<&'a Y>
where Self: Borrow<Option<X>> { ... }
fn map_range<X, Y>(self, func: impl FnMut(X) -> Y) -> Range<Y>
where Self: Is<Range<X>> { ... }
fn max_assign(&mut self, other: Self)
where Self: Copy + Ord + Sized { ... }
fn mem_drop(self)
where Self: Sized { ... }
fn mem_replace(&mut self, value: Self) -> Self
where Self: Sized { ... }
fn mem_take(&mut self) -> Self
where Self: Default { ... }
async fn metadata_async(&self) -> Result<Metadata, IoError>
where Self: AsRef<Path> { ... }
fn mut_push<T>(&mut self, item: T) -> &mut T
where Self: BorrowMut<Vec<T>> { ... }
fn next_iter(&mut self) -> Option<Self::Item>
where Self: Iterator { ... }
fn none<T>(&self) -> Option<T> { ... }
fn ok<E>(self) -> Result<Self, E>
where Self: Sized { ... }
fn once(self) -> Once<Self>
where Self: Sized { ... }
fn open(&self) -> Result<File, IoError>
where Self: AsRef<Path> { ... }
async fn open_async(&self) -> Result<TokioFile, IoError>
where Self: AsRef<Path> { ... }
fn option_display(self) -> OptionDisplay<Self>
where Self: Sized { ... }
fn output_ok<E>(self) -> Output<Self, E>
where Self: Sized { ... }
fn pair<T>(self, rhs: T) -> (Self, T)
where Self: Sized { ... }
fn pin(self) -> Pin<Box<Self>>
where Self: Sized { ... }
fn pipe<X, Y, Z, F: FnMut(Y) -> Z>(self, func: F) -> impl FnMut(X) -> Z
where Self: Sized + FnMut(X) -> Y { ... }
fn poll_ready(self) -> Poll<Self>
where Self: Sized { ... }
fn pipe_into<T, F: FnOnce(Self) -> T>(self, func: F) -> T
where Self: Sized { ... }
fn poem_binary(self) -> PoemBinary<Self>
where Self: Sized { ... }
fn poem_binary_message(self) -> PoemMessage
where Self: Is<Vec<u8>> { ... }
fn poem_json(self) -> PoemJson<Self>
where Self: Sized { ... }
fn poem_stream_body<O: 'static + Into<Bytes>, E: 'static + Into<IoError>>(
self,
) -> PoemBinary<PoemBody>
where Self: 'static + Send + Sized + Stream<Item = Result<O, E>> { ... }
fn poem_text_message(self) -> PoemMessage
where Self: Is<String> { ... }
fn println(&self)
where Self: Display { ... }
fn print(&self)
where Self: Display { ... }
fn push_to<T: Extend<Self>>(self, collection: &mut T)
where Self: Sized { ... }
fn push_all_to<T: Extend<Self::Item>>(self, collection: &mut T)
where Self: IntoIterator + Sized { ... }
fn query_all<T: Serialize>(
self,
name: &str,
values: impl IntoIterator<Item = T>,
) -> RequestBuilder
where Self: Is<RequestBuilder> { ... }
fn query_one<T: Serialize>(
self,
name: &str,
value: impl Into<Option<T>>,
) -> RequestBuilder
where Self: Is<RequestBuilder> { ... }
fn range_from_len(self, len: Self) -> Range<Self>
where Self: Add<Output = Self> + Copy { ... }
fn ratatui_rect(self) -> Rect
where Self: Into<(u16, u16)> { ... }
async fn read_to_string_async(&mut self) -> Result<String, IoError>
where Self: AsyncReadExt + Unpin { ... }
async fn read_to_string_fs_async(self) -> ReadValue<Self>
where Self: AsRef<Path> + Sized { ... }
fn ready(self) -> Ready<Self>
where Self: Sized { ... }
fn ref_immut(&self) -> &Self { ... }
fn ref_mut(&mut self) -> &mut Self { ... }
fn render_to(self, frame: &mut Frame<'_>, area: Rect)
where Self: Widget + Sized { ... }
fn render_with_state(
self,
frame: &mut Frame<'_>,
area: Rect,
state: &mut Self::State,
)
where Self: StatefulWidget + Sized { ... }
fn repeat(self) -> Repeat<Self>
where Self: Clone { ... }
fn result_display(self) -> ResultDisplay<Self>
where Self: Sized { ... }
fn reversed<X, Y>(self) -> (Y, X)
where Self: Is<(X, Y)> { ... }
fn to_rope(&mut self) -> Result<Rope, IoError>
where Self: Read { ... }
async fn to_rope_async(&mut self) -> Result<Rope, IoError>
where Self: AsyncRead + Unpin { ... }
async fn run_for(
self,
duration: Duration,
) -> Result<Self, RunForError<Self::Output>>
where Self: Future + Sized + Unpin { ... }
async fn run_local(self) -> Self::Output
where Self: Future + Sized { ... }
fn remove_file(&self) -> Result<(), IoError>
where Self: AsRef<Path> { ... }
fn remove_prefix(&self, prefix: &str) -> &str
where Self: AsRef<str> { ... }
async fn respond_to<T: Request<Response = Self>>(
&self,
socket: impl BorrowMut<Socket>,
) -> Result<(), AnyhowError> { ... }
fn saturating_add_assign(&mut self, rhs: &Self)
where Self: SaturatingAdd { ... }
fn saturating_add_or_sub_in_place_with_max(
&mut self,
rhs: Self,
max_value: Self,
add: bool,
)
where Self: Ord + SaturatingAdd + SaturatingSub + Sized { ... }
fn saturating_sub_assign(&mut self, rhs: &Self)
where Self: SaturatingSub { ... }
async fn select_all(
self,
) -> <<Self as IntoIterator>::Item as Future>::Output
where Self: IntoIterator + Sized,
<Self as IntoIterator>::Item: Future { ... }
async fn send_to<T: Sink<Self> + Unpin>(
self,
sink: T,
) -> Result<(), T::Error>
where Self: Sized { ... }
fn send_to_oneshot(
self,
sender: OneshotSender<Self>,
) -> Result<(), AnyhowError>
where Self: Sized { ... }
fn set_true(&mut self)
where Self: BorrowMut<bool> { ... }
fn set_false(&mut self)
where Self: BorrowMut<bool> { ... }
fn singleton<T: FromIterator<Self>>(self) -> T
where Self: Sized { ... }
fn sleep(self) -> Sleep
where Self: Is<Duration> { ... }
fn some(self) -> Option<Self>
where Self: Sized { ... }
fn spawn_task(self) -> JoinHandle<Self::Output>
where Self: 'static + Future + Sized + Send,
Self::Output: 'static + Send { ... }
fn split_along_extended_graphemes(
&self,
max_prefix_size: usize,
) -> (&str, &str)
where Self: AsRef<str> { ... }
fn split_at(&self, index: usize) -> (&str, &str)
where Self: AsRef<str> { ... }
fn stylize<T: Styled>(self, content: T) -> T::Item
where Self: Into<Style> { ... }
fn subline<'a>(&'a self, range: Range<usize>) -> Line<'a>
where Self: Borrow<Line<'a>> { ... }
fn substr_interval(&self, query: &[u8]) -> Option<(usize, usize)>
where Self: AsRef<[u8]> { ... }
fn take_json<T: DeserializeOwned>(
&mut self,
index: impl SerdeJsonIndex,
) -> Result<T, SerdeJsonError>
where Self: BorrowMut<Json> { ... }
fn timeout(self, duration: Duration) -> Timeout<Self>
where Self: Future + Sized { ... }
fn to_cow_borrowed(&self) -> Cow<'_, Self>
where Self: ToOwned { ... }
fn toggle(&mut self)
where Self: BorrowMut<bool> { ... }
fn to_json(&self) -> Result<Json, SerdeJsonError>
where Self: Serialize { ... }
fn to_json_bytes(&self) -> Result<Vec<u8>, SerdeJsonError>
where Self: Serialize { ... }
fn to_json_object(&self, key: &str) -> Json
where Self: Serialize { ... }
fn to_json_str(&self) -> Result<String, SerdeJsonError>
where Self: Serialize { ... }
fn to_owned_opt<T: ToOwned>(&self) -> Option<T::Owned>
where Self: Borrow<Option<T>> { ... }
fn to_rmp_bytes(&self) -> Result<Vec<u8>, RmpEncodeError>
where Self: Serialize { ... }
fn to_uri(&self) -> Result<String, IoError>
where Self: AsRef<Utf8Path> { ... }
fn to_value_from_json_slice<'a, T: Deserialize<'a>>(
&'a self,
) -> Result<T, SerdeJsonError>
where Self: AsRef<[u8]> { ... }
fn to_value_from_json_reader<T: DeserializeOwned>(
self,
) -> Result<T, SerdeJsonError>
where Self: Read + Sized { ... }
fn to_value_from_rmp_slice<'a, T: Deserialize<'a>>(
&'a self,
) -> Result<T, RmpDecodeError>
where Self: AsRef<[u8]> { ... }
fn to_value_from_value<T: DeserializeOwned>(
&self,
) -> Result<T, SerdeJsonError>
where Self: Serialize { ... }
fn to_value_from_yaml_slice<'a, T: Deserialize<'a>>(
&'a self,
) -> Result<T, SerdeYamlError>
where Self: AsRef<[u8]> { ... }
fn to_value_from_yaml_reader<T: DeserializeOwned>(
self,
) -> Result<T, SerdeYamlError>
where Self: Read + Sized { ... }
fn translate_to(&mut self, value: Self) -> Self
where Self: SaturatingSub { ... }
fn transfer_from_to(&self, src: &mut Self, dst: &mut Self)
where Self: SaturatingAdd + SaturatingSub { ... }
fn transpose(&self) -> Self
where Self: Transpose + Sized { ... }
fn try_convert<T: TryFrom<Self>>(self) -> Result<T, T::Error>
where Self: Sized { ... }
async fn try_join_all(
self,
) -> Result<Vec<<Self::Item as TryFuture>::Ok>, <Self::Item as TryFuture>::Error>
where Self: IntoIterator<Item: TryFuture> + Sized { ... }
async fn try_join_all_into<T, E>(self) -> Result<T, E>
where Self: IntoIterator<Item: TryFuture> + Sized,
T: FromIterator<<Self::Item as TryFuture>::Ok>,
E: From<<Self::Item as TryFuture>::Error> { ... }
async fn try_wait<T, E: 'static + Send + Sync>(
self,
) -> Result<T, AnyhowError>
where Self: Is<JoinHandle<Result<T, E>>>,
AnyhowError: From<E> { ... }
fn type_name() -> &'static str { ... }
fn unit(&self) { ... }
async fn wait_then_unwrap_or_pending<T>(self) -> T
where Self: Future<Output = Option<T>> + Sized { ... }
async fn unwrap_or_pending_then_wait<F: Future + Unpin>(
&mut self,
) -> F::Output
where Self: BorrowMut<Option<F>> { ... }
fn with<T>(&self, value: T) -> T { ... }
fn with_item_pushed<T>(self, item: T) -> Vec<T>
where Self: Is<Vec<T>> { ... }
fn with_str_pushed(self, rhs: &str) -> String
where Self: Is<String> { ... }
fn write_as_json_to<T: Write>(
&self,
writer: T,
) -> Result<(), SerdeJsonError>
where Self: Serialize { ... }
fn write_all_then(&mut self, bytes: &[u8]) -> Result<&mut Self, IoError>
where Self: Write { ... }
async fn write_all_then_async(
&mut self,
bytes: &[u8],
) -> Result<&mut Self, IoError>
where Self: AsyncWriteExt + Unpin { ... }
}Provided Associated Constants§
const CRLF: &str = "\r\n"
const IS_EXTENDED: bool = true
const LF: &str = "\n"
const READ_FROM_CLIPBOARD_COMMAND: &str = "pbpaste"
const WRITE_TO_CLIPBOARD_COMMAND: &str = "pbcopy"
const URI_PREFIX: &str = "file://"
Provided Methods§
async fn abort_all_and_wait<T: 'static>(&mut self)
Available on crate feature
async only.fn absolute_utf8(&self) -> Result<Cow<'_, Utf8Path>, IoError>
async fn achain<T: Future>(self, rhs: T) -> T::Output
fn add_span<'a, T: Into<Span<'a>>>(self, span: T) -> Line<'a>
Available on crate feature
tui only.fn anyhow_msg_error(self) -> AnyhowError
fn anyhow_error(self) -> AnyhowErrorwhere
Self: Into<AnyhowError>,
fn anyhow_result<T, E: Into<AnyhowError>>(self) -> Result<T, AnyhowError>where
Self: Is<Result<T, E>>,
fn arc(self) -> Arc<Self>where
Self: Sized,
fn assign(&mut self, other: Self)where
Self: Sized,
fn assign_to(self, other: &mut Self)where
Self: Sized,
async fn async_with<T>(self, next: impl Future<Output = T>) -> T
fn as_borrowed<'a, B: ?Sized + ToOwned>(&'a self) -> &'a B
fn as_immut(&mut self) -> &Self
fn as_ptr(&self) -> *const Self
fn as_ptr_mut(&mut self) -> *mut Self
fn as_utf8(&self) -> Result<&str, Utf8Error>
fn as_utf8_path(&self) -> &Utf8Path
fn as_valuable(&self) -> Value<'_>where
Self: AsValuable,
Available on crate features
serde and tracing only.fn bordered_block<'a>(self) -> Block<'a>
Available on crate feature
tui only.fn buf_reader(self) -> BufReader<Self>
fn buf_reader_async(self) -> TokioBufReader<Self>
Available on crate features
async or tui only.fn buf_writer(self) -> BufWriter<Self> ⓘ
fn buf_writer_async(self) -> TokioBufWriter<Self>where
Self: AsyncWrite + Sized,
Available on crate feature
async only.fn cast_or_max<T: Bounded + NumCast>(self) -> Twhere
Self: Sized + ToPrimitive,
fn cast_ref<T>(&self) -> &T
fn cat<T: Display>(&self, rhs: T) -> Stringwhere
Self: Display,
fn check_next<T>(self) -> Result<T, AnyhowError>where
Self: Is<Option<T>>,
fn check_present<T>(self) -> Result<T, AnyhowError>where
Self: Is<Option<T>>,
async fn check_status(self) -> Result<Response, AnyhowError>where
Self: Is<Response>,
Available on crate feature
http only.fn clamped(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd + Sized,
fn collect_atoms<'a>(&mut self) -> String
Available on crate feature
tui only.fn convert<T: From<Self>>(self) -> Twhere
Self: Sized,
fn contains_eq<Q, K>(&self, query: Q) -> bool
fn context_path<T, E, C: 'static + Display + Send + Sync, P: AsRef<Path>>( self, context: C, path: P, ) -> Result<T, AnyhowError>
fn copied(&self) -> Self
async fn write_to_clipboard(&self) -> Result<ExitStatus, AnyhowError>
Available on crate feature
async only.async fn read_from_clipboard() -> Result<String, AnyhowError>
Available on crate feature
async only.fn create(&self) -> Result<File, IoError>
fn create_dir_all(&self) -> Result<(), IoError>
fn cycle_in_place(&mut self, amount: isize, total: usize)
fn debug(self) -> Debugged<Self>where
Self: Sized,
fn decrement(&mut self)where
Self: One + SaturatingSub,
fn decremented(&self) -> Selfwhere
Self: One + SaturatingSub,
fn deserialize_from_seq<'de, D: Deserializer<'de>, X: Deserialize<'de>, Y, E: Display, F: Fn(X) -> Result<Y, E>>( deserializer: D, func: F, ) -> Result<Self, D::Error>
fn end_err<T>(self) -> Output<T, Self>where
Self: Sized,
Available on crate feature
unstable only.fn end_ok<T, E>(&self) -> Output<T, E>
Available on crate feature
unstable only.fn err<T>(self) -> Result<T, Self>where
Self: Sized,
fn expand_user(&self) -> Cow<'_, Utf8Path>
fn unexpand_user(&self) -> Cow<'_, Utf8Path>
fn extended_graphemes(&self) -> Graphemes<'_>
Available on crate feature
tui only.fn extended_grapheme_byte_indices(&self) -> impl Iterator<Item = usize>
Available on crate feature
tui only.fn extended_grapheme_and_byte_index_pairs(&self) -> GraphemeIndices<'_>
Available on crate feature
tui only.fn extended_grapheme_substring(&self, range: Range<usize>) -> &str
Available on crate feature
tui only.fn filter_sync( self, func: impl FnMut(&Self::Item) -> bool, ) -> Filter<Self, Ready<bool>, impl FnMut(&Self::Item) -> Ready<bool>>
Available on crate feature
async only.fn file_name_ok(&self) -> Result<&str, AnyhowError>
fn file_name_or_self(&self) -> &str
fn find_eq<Q, K>(&self, query: Q) -> Option<(usize, &K)>
fn find_substr<'a>( &'a self, substr: &str, ) -> Option<(&'a str, &'a str, &'a str)>
fn has_happened(self) -> boolwhere
Self: Is<Instant>,
fn home_dirpath() -> Option<Utf8PathBuf>
fn if_else<T>(self, true_value: T, false_value: T) -> Twhere
Self: Is<bool>,
fn immutable(&mut self) -> &Self
fn increment(&mut self)where
Self: One + SaturatingAdd,
fn incremented(&self) -> Selfwhere
Self: One + SaturatingAdd,
fn index_into<T: Index<Self> + ?Sized>(self, collection: &T) -> &T::Outputwhere
Self: Sized,
fn index_into_mut<T: IndexMut<Self> + ?Sized>(
self,
collection: &mut T,
) -> &mut T::Outputwhere
Self: Sized,
fn insert_mut<'a, K: 'a + Eq + Hash, V>( &'a mut self, key: K, value: V, ) -> &'a mut V
fn interpolate( self, old_min: impl ToPrimitive, old_max: impl ToPrimitive, new_min: impl ToPrimitive, new_max: impl ToPrimitive, ) -> Self
fn into_box(self) -> Box<Self>where
Self: Sized,
fn into_break<C>(self) -> ControlFlow<Self, C>where
Self: Sized,
fn into_color<T>(self) -> Twhere
Self: IntoColor<T>,
Available on crate feature
tui only.fn into_ok_err<T>(self) -> Twhere
Self: Is<Result<T, T>>,
fn into_continue<B>(self) -> ControlFlow<B, Self>where
Self: Sized,
fn into_cow_owned<B: ?Sized + ToOwned<Owned = Self>>(self) -> Cow<'static, B>where
Self: Sized,
fn into_endpoint(self) -> impl Endpoint<Output = Self>
Available on crate feature
http only.fn into_first(self) -> Self::Type
fn into_second(self) -> Self::Type
fn into_third(self) -> Self::Type
fn into_interval(self) -> Intervalwhere
Self: Is<Duration>,
Available on crate feature
async only.fn into_left<R>(self) -> Either<Self, R>where
Self: Sized,
Available on crate feature
async only.fn into_line<'a>(self) -> Line<'a>
Available on crate feature
tui only.fn into_manually_drop(self) -> ManuallyDrop<Self>where
Self: Sized,
fn into_stream_reader<B: Buf, E: Into<IoError>>(self) -> StreamReader<Self, B>
Available on crate feature
async only.fn into_length_delimited_frames(self) -> Framed<Self, LengthDelimitedCodec>where
Self: Sized,
Available on crate feature
async only.fn into_line_frames(self) -> Framed<Self, LinesCodec>where
Self: Sized,
Available on crate feature
async only.fn into_utf8(self) -> Result<String, FromUtf8Error>
fn into_right<L>(self) -> Either<L, Self>where
Self: Sized,
Available on crate feature
async only.fn into_parse_request_payload_result<T>(
self,
) -> Result<T, ParseRequestPayloadError>where
Self: Is<Result<T, SerdeJsonError>>,
Available on crate features
http and serde only.async fn into_select<T: Future>(self, rhs: T) -> Either<Self::Output, T::Output>
Available on crate feature
async only.fn into_status<T, E>(self) -> Status<T, E>where
Self: Is<Result<T, E>>,
Available on crate feature
tracing only.fn into_stream(self) -> Self::Streamwhere
Self: IntoStream + Sized,
Available on crate feature
async only.fn into_string(self) -> Result<String, AnyhowError>where
Self: Is<PathBuf>,
fn into_value_from_json<T: DeserializeOwned>(self) -> Result<T, SerdeJsonError>where
Self: Is<Json>,
Available on crate feature
serde only.fn invalid_utf8_err<T>(&self) -> Result<T, AnyhowError>where
Self: Debug,
fn io_error(self) -> IoError
fn io_result<T, E: Into<Box<dyn StdError + Send + Sync>>>(
self,
) -> Result<T, IoError>where
Self: Is<Result<T, E>>,
fn is_non_empty<T: Iterator>(&mut self) -> bool
fn is_empty<T: Iterator>(&mut self) -> bool
fn is_less_than<T: PartialOrd>(self, rhs: T) -> boolwhere
Self: Into<T>,
fn is_positive(&self) -> boolwhere
Self: PartialOrd + Zero,
fn is_newline(&self) -> bool
fn join_all(self) -> JoinAll<<Self as IntoIterator>::Item>
Available on crate feature
async only.async fn join_all_into<T>(self) -> T
Available on crate feature
async only.fn len_range<T: SaturatingSub>(&self) -> T
fn level<T, E>(&self) -> Level
Available on crate feature
tracing only.fn log_error(&self)where
Self: Display,
Available on crate features
tracing or tui only.fn log_if_error<T, E: Display>(self) -> Self
Available on crate features
tracing or tui only.fn map_collect<Y, T: FromIterator<Y>>(
self,
func: impl FnMut(Self::Item) -> Y,
) -> Twhere
Self: IntoIterator + Sized,
fn map_into<Y, X: Into<Y>>(self) -> Option<Y>where
Self: Is<Option<X>>,
fn map_as_ref<'a, Y: ?Sized, X: 'a + AsRef<Y>>(&'a self) -> Option<&'a Y>
fn map_range<X, Y>(self, func: impl FnMut(X) -> Y) -> Range<Y>where
Self: Is<Range<X>>,
fn max_assign(&mut self, other: Self)
fn mem_drop(self)where
Self: Sized,
fn mem_replace(&mut self, value: Self) -> Selfwhere
Self: Sized,
fn mem_take(&mut self) -> Selfwhere
Self: Default,
async fn metadata_async(&self) -> Result<Metadata, IoError>
Available on crate feature
async only.fn mut_push<T>(&mut self, item: T) -> &mut T
fn next_iter(&mut self) -> Option<Self::Item>where
Self: Iterator,
fn none<T>(&self) -> Option<T>
fn ok<E>(self) -> Result<Self, E>where
Self: Sized,
fn once(self) -> Once<Self>where
Self: Sized,
fn open(&self) -> Result<File, IoError>
async fn open_async(&self) -> Result<TokioFile, IoError>
Available on crate features
async or tui only.fn option_display(self) -> OptionDisplay<Self>where
Self: Sized,
fn output_ok<E>(self) -> Output<Self, E>where
Self: Sized,
Available on crate feature
unstable only.fn pair<T>(self, rhs: T) -> (Self, T)where
Self: Sized,
fn pin(self) -> Pin<Box<Self>>where
Self: Sized,
fn pipe<X, Y, Z, F: FnMut(Y) -> Z>(self, func: F) -> impl FnMut(X) -> Z
fn poll_ready(self) -> Poll<Self>where
Self: Sized,
fn pipe_into<T, F: FnOnce(Self) -> T>(self, func: F) -> Twhere
Self: Sized,
fn poem_binary(self) -> PoemBinary<Self>where
Self: Sized,
Available on crate feature
http only.fn poem_binary_message(self) -> PoemMessage
Available on crate feature
http only.fn poem_json(self) -> PoemJson<Self>where
Self: Sized,
Available on crate feature
http only.fn poem_stream_body<O: 'static + Into<Bytes>, E: 'static + Into<IoError>>( self, ) -> PoemBinary<PoemBody>
Available on crate features
async and http only.fn poem_text_message(self) -> PoemMessagewhere
Self: Is<String>,
Available on crate feature
http only.fn println(&self)where
Self: Display,
fn print(&self)where
Self: Display,
fn push_to<T: Extend<Self>>(self, collection: &mut T)where
Self: Sized,
fn push_all_to<T: Extend<Self::Item>>(self, collection: &mut T)where
Self: IntoIterator + Sized,
fn query_all<T: Serialize>(
self,
name: &str,
values: impl IntoIterator<Item = T>,
) -> RequestBuilderwhere
Self: Is<RequestBuilder>,
Available on crate feature
http only.fn query_one<T: Serialize>(
self,
name: &str,
value: impl Into<Option<T>>,
) -> RequestBuilderwhere
Self: Is<RequestBuilder>,
Available on crate feature
http only.fn range_from_len(self, len: Self) -> Range<Self>
fn ratatui_rect(self) -> Rect
Available on crate feature
tui only.async fn read_to_string_async(&mut self) -> Result<String, IoError>where
Self: AsyncReadExt + Unpin,
Available on crate feature
async only.async fn read_to_string_fs_async(self) -> ReadValue<Self>
Available on crate feature
async only.fn ready(self) -> Ready<Self>where
Self: Sized,
fn ref_immut(&self) -> &Self
fn ref_mut(&mut self) -> &mut Self
fn render_to(self, frame: &mut Frame<'_>, area: Rect)
Available on crate feature
tui only.fn render_with_state(
self,
frame: &mut Frame<'_>,
area: Rect,
state: &mut Self::State,
)where
Self: StatefulWidget + Sized,
Available on crate feature
tui only.fn repeat(self) -> Repeat<Self>where
Self: Clone,
fn result_display(self) -> ResultDisplay<Self>where
Self: Sized,
fn reversed<X, Y>(self) -> (Y, X)where
Self: Is<(X, Y)>,
fn to_rope(&mut self) -> Result<Rope, IoError>where
Self: Read,
Available on crate feature
tui only.async fn to_rope_async(&mut self) -> Result<Rope, IoError>
Available on crate features
async and tui only.async fn run_for( self, duration: Duration, ) -> Result<Self, RunForError<Self::Output>>
Available on crate feature
async only.async fn run_local(self) -> Self::Output
Available on crate feature
async only.fn remove_file(&self) -> Result<(), IoError>
fn remove_prefix(&self, prefix: &str) -> &str
async fn respond_to<T: Request<Response = Self>>( &self, socket: impl BorrowMut<Socket>, ) -> Result<(), AnyhowError>
Available on crate features
async and unstable and serde only.fn saturating_add_assign(&mut self, rhs: &Self)where
Self: SaturatingAdd,
fn saturating_add_or_sub_in_place_with_max( &mut self, rhs: Self, max_value: Self, add: bool, )
fn saturating_sub_assign(&mut self, rhs: &Self)where
Self: SaturatingSub,
async fn select_all(self) -> <<Self as IntoIterator>::Item as Future>::Output
Available on crate feature
async only.async fn send_to<T: Sink<Self> + Unpin>(self, sink: T) -> Result<(), T::Error>where
Self: Sized,
Available on crate feature
async only.fn send_to_oneshot(self, sender: OneshotSender<Self>) -> Result<(), AnyhowError>where
Self: Sized,
Available on crate feature
async only.fn set_true(&mut self)
fn set_false(&mut self)
fn singleton<T: FromIterator<Self>>(self) -> Twhere
Self: Sized,
fn sleep(self) -> Sleepwhere
Self: Is<Duration>,
Available on crate feature
async only.fn some(self) -> Option<Self>where
Self: Sized,
fn spawn_task(self) -> JoinHandle<Self::Output>
Available on crate feature
async only.fn split_along_extended_graphemes(&self, max_prefix_size: usize) -> (&str, &str)
Available on crate feature
tui only.fn split_at(&self, index: usize) -> (&str, &str)
fn stylize<T: Styled>(self, content: T) -> T::Item
Available on crate feature
tui only.fn subline<'a>(&'a self, range: Range<usize>) -> Line<'a>
Available on crate feature
tui only.fn substr_interval(&self, query: &[u8]) -> Option<(usize, usize)>
fn take_json<T: DeserializeOwned>( &mut self, index: impl SerdeJsonIndex, ) -> Result<T, SerdeJsonError>
Available on crate feature
serde only.fn timeout(self, duration: Duration) -> Timeout<Self>
Available on crate feature
async only.fn to_cow_borrowed(&self) -> Cow<'_, Self>where
Self: ToOwned,
fn toggle(&mut self)
fn to_json(&self) -> Result<Json, SerdeJsonError>where
Self: Serialize,
Available on crate feature
serde only.fn to_json_bytes(&self) -> Result<Vec<u8>, SerdeJsonError>where
Self: Serialize,
Available on crate feature
serde only.fn to_json_object(&self, key: &str) -> Jsonwhere
Self: Serialize,
Available on crate feature
serde only.fn to_json_str(&self) -> Result<String, SerdeJsonError>where
Self: Serialize,
Available on crate feature
serde only.fn to_owned_opt<T: ToOwned>(&self) -> Option<T::Owned>
fn to_rmp_bytes(&self) -> Result<Vec<u8>, RmpEncodeError>where
Self: Serialize,
Available on crate feature
serde only.fn to_uri(&self) -> Result<String, IoError>
fn to_value_from_json_slice<'a, T: Deserialize<'a>>( &'a self, ) -> Result<T, SerdeJsonError>
Available on crate feature
serde only.fn to_value_from_json_reader<T: DeserializeOwned>( self, ) -> Result<T, SerdeJsonError>
Available on crate feature
serde only.fn to_value_from_rmp_slice<'a, T: Deserialize<'a>>( &'a self, ) -> Result<T, RmpDecodeError>
Available on crate feature
serde only.fn to_value_from_value<T: DeserializeOwned>(&self) -> Result<T, SerdeJsonError>where
Self: Serialize,
Available on crate feature
serde only.fn to_value_from_yaml_slice<'a, T: Deserialize<'a>>( &'a self, ) -> Result<T, SerdeYamlError>
Available on crate feature
serde only.fn to_value_from_yaml_reader<T: DeserializeOwned>( self, ) -> Result<T, SerdeYamlError>
Available on crate feature
serde only.fn translate_to(&mut self, value: Self) -> Selfwhere
Self: SaturatingSub,
fn transfer_from_to(&self, src: &mut Self, dst: &mut Self)where
Self: SaturatingAdd + SaturatingSub,
fn transpose(&self) -> Self
Available on crate feature
tui only.fn try_convert<T: TryFrom<Self>>(self) -> Result<T, T::Error>where
Self: Sized,
async fn try_join_all( self, ) -> Result<Vec<<Self::Item as TryFuture>::Ok>, <Self::Item as TryFuture>::Error>
Available on crate feature
async only.async fn try_join_all_into<T, E>(self) -> Result<T, E>
Available on crate feature
async only.async fn try_wait<T, E: 'static + Send + Sync>(self) -> Result<T, AnyhowError>
Available on crate feature
async only.fn type_name() -> &'static str
fn unit(&self)
async fn wait_then_unwrap_or_pending<T>(self) -> T
async fn unwrap_or_pending_then_wait<F: Future + Unpin>(&mut self) -> F::Output
fn with<T>(&self, value: T) -> T
fn with_item_pushed<T>(self, item: T) -> Vec<T>where
Self: Is<Vec<T>>,
fn with_str_pushed(self, rhs: &str) -> Stringwhere
Self: Is<String>,
fn write_as_json_to<T: Write>(&self, writer: T) -> Result<(), SerdeJsonError>where
Self: Serialize,
Available on crate feature
serde only.fn write_all_then(&mut self, bytes: &[u8]) -> Result<&mut Self, IoError>where
Self: Write,
async fn write_all_then_async(
&mut self,
bytes: &[u8],
) -> Result<&mut Self, IoError>where
Self: AsyncWriteExt + Unpin,
Available on crate feature
async only.Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.