pub struct OkuFs {
pub replica_sender: Sender<()>,
/* private fields */
}
Expand description
An instance of an Oku file system.
The OkuFs
struct is the primary interface for interacting with an Oku file system.
Fields§
§replica_sender: Sender<()>
A watcher for when replicas are created, deleted, or imported.
Implementations§
Source§impl OkuFs
impl OkuFs
Sourcepub async fn announce_replica(&self, namespace_id: NamespaceId) -> Result<()>
pub async fn announce_replica(&self, namespace_id: NamespaceId) -> Result<()>
Announces a writable replica to the Mainline DHT.
§Arguments
namespace_id
- The ID of the replica to announce.
Sourcepub async fn announce_home_replica(&self) -> Result<NamespaceId>
pub async fn announce_home_replica(&self) -> Result<NamespaceId>
Announce the home replica
Sourcepub async fn announce_replicas(&self) -> Result<()>
pub async fn announce_replicas(&self) -> Result<()>
Announces all writable replicas to the Mainline DHT.
Source§impl OkuFs
impl OkuFs
Obtain the private key of the node’s authorship credentials.
§Return
The private key of the node’s authorship credentials.
Sourcepub async fn get_oldest_timestamp(&self) -> Result<u64>
pub async fn get_oldest_timestamp(&self) -> Result<u64>
Determines the oldest timestamp of a file entry in any replica stored locally.
§Returns
The oldest timestamp in any local replica, in microseconds from the Unix epoch.
Sourcepub async fn get_newest_timestamp(&self) -> Result<u64>
pub async fn get_newest_timestamp(&self) -> Result<u64>
Determines the latest timestamp of a file entry in any replica stored locally.
§Returns
The latest timestamp in any local replica, in microseconds from the Unix epoch.
Source§impl OkuFs
impl OkuFs
Sourcepub async fn read_directory(
&self,
namespace_id: NamespaceId,
path: PathBuf,
) -> Result<Vec<(Entry, Bytes)>>
pub async fn read_directory( &self, namespace_id: NamespaceId, path: PathBuf, ) -> Result<Vec<(Entry, Bytes)>>
Sourcepub async fn read_directory_from_replica_handle(
&self,
document: Doc,
path: PathBuf,
) -> Result<Vec<(Entry, Bytes)>>
pub async fn read_directory_from_replica_handle( &self, document: Doc, path: PathBuf, ) -> Result<Vec<(Entry, Bytes)>>
Sourcepub async fn move_directory(
&self,
from_namespace_id: NamespaceId,
from_path: PathBuf,
to_namespace_id: NamespaceId,
to_path: PathBuf,
) -> Result<(Vec<Hash>, usize)>
pub async fn move_directory( &self, from_namespace_id: NamespaceId, from_path: PathBuf, to_namespace_id: NamespaceId, to_path: PathBuf, ) -> Result<(Vec<Hash>, usize)>
Moves a directory by copying it to a new location and deleting the original.
§Arguments
-
from_namespace_id
- The ID of the replica containing the directory to move. -
to_namespace_id
- The ID of the replica to move the directory to. -
from_path
- The path of the directory to move. -
to_path
- The path to move the directory to.
§Returns
A tuple containing the list of file hashes for files at their new destinations, and the total number of replica entries deleted during the operation.
Sourcepub async fn delete_directory(
&self,
namespace_id: NamespaceId,
path: PathBuf,
) -> Result<usize>
pub async fn delete_directory( &self, namespace_id: NamespaceId, path: PathBuf, ) -> Result<usize>
Sourcepub async fn get_oldest_timestamp_in_folder(
&self,
namespace_id: NamespaceId,
path: PathBuf,
) -> Result<u64>
pub async fn get_oldest_timestamp_in_folder( &self, namespace_id: NamespaceId, path: PathBuf, ) -> Result<u64>
Determines the oldest timestamp of a file entry in a folder.
§Arguments
-
namespace_id
- The ID of the replica containing the folder. -
path
- The folder whose oldest timestamp is to be determined.
§Returns
The oldest timestamp of any file descending from this folder, in microseconds from the Unix epoch.
Sourcepub async fn get_newest_timestamp_in_folder(
&self,
namespace_id: NamespaceId,
path: PathBuf,
) -> Result<u64>
pub async fn get_newest_timestamp_in_folder( &self, namespace_id: NamespaceId, path: PathBuf, ) -> Result<u64>
Determines the latest timestamp of a file entry in a folder.
§Arguments
-
namespace_id
- The ID of the replica containing the folder. -
path
- The folder whose latest timestamp is to be determined.
§Returns
The latest timestamp of any file descending from this folder, in microseconds from the Unix epoch.
Sourcepub async fn get_folder_size(
&self,
namespace_id: NamespaceId,
path: PathBuf,
) -> Result<u64>
pub async fn get_folder_size( &self, namespace_id: NamespaceId, path: PathBuf, ) -> Result<u64>
Sourcepub async fn fetch_directory_with_ticket(
&self,
ticket: &DocTicket,
path: PathBuf,
) -> Result<Vec<(Entry, Bytes)>>
pub async fn fetch_directory_with_ticket( &self, ticket: &DocTicket, path: PathBuf, ) -> Result<Vec<(Entry, Bytes)>>
Source§impl OkuFs
impl OkuFs
Sourcepub async fn list_files(
&self,
namespace_id: NamespaceId,
path: Option<PathBuf>,
) -> Result<Vec<Entry>>
pub async fn list_files( &self, namespace_id: NamespaceId, path: Option<PathBuf>, ) -> Result<Vec<Entry>>
Sourcepub async fn create_or_modify_file(
&self,
namespace_id: NamespaceId,
path: PathBuf,
data: impl Into<Bytes>,
) -> Result<Hash>
pub async fn create_or_modify_file( &self, namespace_id: NamespaceId, path: PathBuf, data: impl Into<Bytes>, ) -> Result<Hash>
Sourcepub async fn delete_file(
&self,
namespace_id: NamespaceId,
path: PathBuf,
) -> Result<usize>
pub async fn delete_file( &self, namespace_id: NamespaceId, path: PathBuf, ) -> Result<usize>
Sourcepub async fn get_oldest_entry_timestamp(
&self,
namespace_id: NamespaceId,
path: PathBuf,
) -> Result<u64>
pub async fn get_oldest_entry_timestamp( &self, namespace_id: NamespaceId, path: PathBuf, ) -> Result<u64>
Sourcepub async fn read_file_from_replica_handle(
&self,
document: Doc,
path: PathBuf,
) -> Result<Bytes>
pub async fn read_file_from_replica_handle( &self, document: Doc, path: PathBuf, ) -> Result<Bytes>
Sourcepub async fn move_file(
&self,
from_namespace_id: NamespaceId,
from_path: PathBuf,
to_namespace_id: NamespaceId,
to_path: PathBuf,
) -> Result<(Hash, usize)>
pub async fn move_file( &self, from_namespace_id: NamespaceId, from_path: PathBuf, to_namespace_id: NamespaceId, to_path: PathBuf, ) -> Result<(Hash, usize)>
Moves a file by copying it to a new location and deleting the original.
§Arguments
-
from_namespace_id
- The ID of the replica containing the file to move. -
to_namespace_id
- The ID of the replica to move the file to. -
from_path
- The path of the file to move. -
to_path
- The path to move the file to.
§Returns
A tuple containing the hash of the file at the new destination and the number of replica entries deleted during the operation, which should be 1 if the file at the original path was deleted.
Sourcepub async fn fetch_file(
&self,
namespace_id: NamespaceId,
path: PathBuf,
) -> Result<Bytes>
pub async fn fetch_file( &self, namespace_id: NamespaceId, path: PathBuf, ) -> Result<Bytes>
Sourcepub async fn fetch_file_with_ticket(
&self,
ticket: &DocTicket,
path: PathBuf,
) -> Result<Bytes>
pub async fn fetch_file_with_ticket( &self, ticket: &DocTicket, path: PathBuf, ) -> Result<Bytes>
Source§impl OkuFs
impl OkuFs
Retrieve the content authorship ID used by the node.
§Returns
The content authorship ID used by the node.
Sourcepub async fn export_user(&self) -> Option<ExportedUser>
pub async fn export_user(&self) -> Option<ExportedUser>
Exports the local Oku user’s credentials.
§Returns
The local Oku user’s credentials, containing sensitive information.
Sourcepub async fn import_user(&self, exported_user: ExportedUser) -> Result<()>
pub async fn import_user(&self, exported_user: ExportedUser) -> Result<()>
Imports Oku user credentials that were exported from another node.
§Arguments
exported_user
- Oku user credentials, which contain sensitive information.
Sourcepub async fn export_user_toml(&self) -> Result<String>
pub async fn export_user_toml(&self) -> Result<String>
Exports the local Oku user’s credentials in TOML format.
§Returns
The local Oku user’s credentials, containing sensitive information.
Sourcepub async fn import_user_toml(&self, exported_user_toml: String) -> Result<()>
pub async fn import_user_toml(&self, exported_user_toml: String) -> Result<()>
Imports Oku user credentials that were exported from another node.
§Arguments
exported_user
- Oku user credentials, encoded in TOML format. They contain sensitive information.
Sourcepub async fn home_replica(&self) -> Option<NamespaceId>
pub async fn home_replica(&self) -> Option<NamespaceId>
Sourcepub fn set_home_replica(&self, home_replica: Option<NamespaceId>) -> Result<()>
pub fn set_home_replica(&self, home_replica: Option<NamespaceId>) -> Result<()>
Set the home replica of the Oku user.
§Arguments
home_replica
- The ID of the intended new home replica.
Sourcepub async fn posts(&self) -> Option<Vec<OkuPost>>
pub async fn posts(&self) -> Option<Vec<OkuPost>>
Retrieves the OkuNet posts by the local user, if any.
§Returns
A list of the OkuNet posts by the local user.
Sourcepub async fn all_posts_with_tag(&self, tag: String) -> Vec<OkuPost>
pub async fn all_posts_with_tag(&self, tag: String) -> Vec<OkuPost>
Retrieves the set of all tags that appear in posts authored by the local user or an OkuNet user.
§Returns
All tags that appear across all posts on the local machine.
Sourcepub async fn identity(&self) -> Option<OkuIdentity>
pub async fn identity(&self) -> Option<OkuIdentity>
Retrieves the OkuNet identity of the local user.
§Returns
The local user’s OkuNet identity, if they have one.
Sourcepub async fn set_identity(&self, identity: OkuIdentity) -> Result<Hash>
pub async fn set_identity(&self, identity: OkuIdentity) -> Result<Hash>
Sourcepub async fn set_display_name(&self, display_name: String) -> Result<Hash>
pub async fn set_display_name(&self, display_name: String) -> Result<Hash>
Sourcepub async fn toggle_follow(&self, author_id: AuthorId) -> Result<Hash>
pub async fn toggle_follow(&self, author_id: AuthorId) -> Result<Hash>
Sourcepub async fn toggle_block(&self, author_id: AuthorId) -> Result<Hash>
pub async fn toggle_block(&self, author_id: AuthorId) -> Result<Hash>
Sourcepub async fn is_followed(&self, author_id: &AuthorId) -> bool
pub async fn is_followed(&self, author_id: &AuthorId) -> bool
Sourcepub async fn is_blocked(&self, author_id: &AuthorId) -> bool
pub async fn is_blocked(&self, author_id: &AuthorId) -> bool
Sourcepub async fn post_from_entry(&self, entry: &Entry) -> Result<OkuPost>
pub async fn post_from_entry(&self, entry: &Entry) -> Result<OkuPost>
Sourcepub async fn posts_from_user(&self, user: &OkuUser) -> Result<Vec<OkuPost>>
pub async fn posts_from_user(&self, user: &OkuUser) -> Result<Vec<OkuPost>>
Sourcepub async fn create_or_modify_post(
&self,
path: Option<PathBuf>,
url: Url,
title: String,
body: String,
tags: HashSet<String>,
) -> Result<Hash>
pub async fn create_or_modify_post( &self, path: Option<PathBuf>, url: Url, title: String, body: String, tags: HashSet<String>, ) -> Result<Hash>
Create or modify an OkuNet post in the user’s home replica.
§Arguments
-
path
- The path to create, or modify, the post at; a suggested path is generated if none is provided. -
url
- The URL the post is regarding. -
title
- The title of the post. -
body
- The body of the post. -
tags
- A list of tags associated with the post.
§Returns
A hash of the post’s content.
Sourcepub async fn delete_post(&self, path: PathBuf) -> Result<usize>
pub async fn delete_post(&self, path: PathBuf) -> Result<usize>
Sourcepub async fn refresh_users(&self) -> Result<()>
pub async fn refresh_users(&self) -> Result<()>
Refreshes any user data last retrieved longer than REPUBLISH_DELAY
ago according to the system time; the users one is following, and the users they’re following, are recorded locally.
Blocked users are not recorded.
Sourcepub async fn fetch_users(&self) -> Result<()>
pub async fn fetch_users(&self) -> Result<()>
Retrieves user data regardless of when last retrieved; the users one is following, and the users they’re following, are recorded locally. Blocked users are not recorded.
Sourcepub async fn fetch_post(
&self,
author_id: AuthorId,
path: PathBuf,
) -> Result<OkuPost>
pub async fn fetch_post( &self, author_id: AuthorId, path: PathBuf, ) -> Result<OkuPost>
Sourcepub async fn get_or_fetch_post(
&self,
author_id: AuthorId,
path: PathBuf,
) -> Result<OkuPost>
pub async fn get_or_fetch_post( &self, author_id: AuthorId, path: PathBuf, ) -> Result<OkuPost>
Sourcepub async fn fetch_profile(&self, ticket: &DocTicket) -> Result<OkuIdentity>
pub async fn fetch_profile(&self, ticket: &DocTicket) -> Result<OkuIdentity>
Sourcepub async fn fetch_posts(&self, ticket: &DocTicket) -> Result<Vec<OkuPost>>
pub async fn fetch_posts(&self, ticket: &DocTicket) -> Result<Vec<OkuPost>>
Sourcepub async fn get_or_fetch_user(&self, author_id: AuthorId) -> Result<OkuUser>
pub async fn get_or_fetch_user(&self, author_id: AuthorId) -> Result<OkuUser>
Obtain an OkuNet user’s content, identified by their content authorship ID.
If last retrieved longer than REPUBLISH_DELAY
ago according to the system time, a known user’s content will be re-fetched.
§Arguments
author_id
- A content authorship ID.
§Returns
An OkuNet user’s content.
Sourcepub async fn fetch_user(&self, author_id: AuthorId) -> Result<OkuUser>
pub async fn fetch_user(&self, author_id: AuthorId) -> Result<OkuUser>
Source§impl OkuFs
impl OkuFs
Sourcepub async fn create_replica(&self) -> Result<NamespaceId>
pub async fn create_replica(&self) -> Result<NamespaceId>
Sourcepub async fn delete_replica(&self, namespace_id: NamespaceId) -> Result<()>
pub async fn delete_replica(&self, namespace_id: NamespaceId) -> Result<()>
Sourcepub async fn list_replicas(&self) -> Result<Vec<(NamespaceId, CapabilityKind)>>
pub async fn list_replicas(&self) -> Result<Vec<(NamespaceId, CapabilityKind)>>
Sourcepub async fn get_replica_capability(
&self,
namespace_id: NamespaceId,
) -> Result<CapabilityKind>
pub async fn get_replica_capability( &self, namespace_id: NamespaceId, ) -> Result<CapabilityKind>
Sourcepub async fn fetch_replica_by_id(
&self,
namespace_id: NamespaceId,
path: Option<PathBuf>,
) -> Result<()>
pub async fn fetch_replica_by_id( &self, namespace_id: NamespaceId, path: Option<PathBuf>, ) -> Result<()>
Join a swarm to fetch the latest version of a replica and save it to the local machine.
§Arguments
-
namespace_id
- The ID of the replica to fetch. -
path
- An optional path of requested files within the replica.
Sourcepub async fn fetch_replica_by_ticket(
&self,
ticket: &DocTicket,
path: Option<PathBuf>,
) -> Result<Doc>
pub async fn fetch_replica_by_ticket( &self, ticket: &DocTicket, path: Option<PathBuf>, ) -> Result<Doc>
Sourcepub async fn sync_replica(&self, namespace_id: NamespaceId) -> Result<()>
pub async fn sync_replica(&self, namespace_id: NamespaceId) -> Result<()>
Join a swarm to fetch the latest version of a replica and save it to the local machine.
If a version of the replica already exists locally, only the last-fetched paths will be fetched.
§Arguments
namespace_id
- The ID of the replica to fetch.
Sourcepub async fn resolve_namespace_id(
&self,
namespace_id: NamespaceId,
) -> Result<DocTicket>
pub async fn resolve_namespace_id( &self, namespace_id: NamespaceId, ) -> Result<DocTicket>
Sourcepub async fn create_document_ticket(
&self,
namespace_id: NamespaceId,
share_mode: ShareMode,
) -> Result<DocTicket>
pub async fn create_document_ticket( &self, namespace_id: NamespaceId, share_mode: ShareMode, ) -> Result<DocTicket>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for OkuFs
impl !RefUnwindSafe for OkuFs
impl Send for OkuFs
impl Sync for OkuFs
impl Unpin for OkuFs
impl !UnwindSafe for OkuFs
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<T> Conv for T
impl<T> Conv for T
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
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>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
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)
fn as_any(&self) -> &(dyn Any + 'static)
&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)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self
to use its Binary
implementation when Debug
-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self
to use its Display
implementation when
Debug
-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self
to use its LowerExp
implementation when
Debug
-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self
to use its LowerHex
implementation when
Debug
-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self
to use its Octal
implementation when Debug
-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self
to use its Pointer
implementation when
Debug
-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self
to use its UpperExp
implementation when
Debug
-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self
to use its UpperHex
implementation when
Debug
-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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§impl<D> OwoColorize for D
impl<D> OwoColorize for D
§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
§fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
§fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
§fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
§fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
§fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
§fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
§fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
§fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
§fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
§fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
§fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
§fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
§fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
§fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
§fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
§fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
§fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
§fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
§fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
§fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
§fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
§fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
§fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::fg
] or
a color-specific method, such as [OwoColorize::green
], Read more§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::bg
] or
a color-specific method, such as [OwoColorize::on_yellow
], Read more§fn fg_rgb<const R: u8, const G: u8, const B: u8>(
&self,
) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>
fn fg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>
§fn bg_rgb<const R: u8, const G: u8, const B: u8>(
&self,
) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>
fn bg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>
§fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>
fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>
§fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>
fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>
§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self
, then passes self.as_ref()
into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self
, then passes self.as_mut()
into the pipe
function.§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self
, then passes self.deref()
into the pipe function.§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B>
of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B>
of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R>
view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R>
view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target
of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target
of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap()
only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut()
only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow()
only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut()
only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref()
only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut()
only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref()
only in debug builds, and is erased in release
builds.