pub struct Clients<M = Unselected> { /* private fields */ }Expand description
p4 [g-opts] clients [-t] [-u user [--user-case-insensitive] | --me] [[-e|-E] filter] [-m max] [-S stream] [-a | -s serverID]
p4 [g-opts] clients -U
List all client workspaces currently known to the system.
The command p4 workspaces is an alias for p4 clients.
The M type parameter tracks the command form at compile time, starting
as Unselected from Clients::new, which spawns the bare p4 clients report. Set any regular option or filter (for example
Self::display_time, Self::filter, or Self::user) to enter
RegularMode, or call Self::unloaded (-U) to enter
UnloadedMode.
Implementations§
Source§impl Clients<Unselected>
impl Clients<Unselected>
Sourcepub fn new(bin: impl Into<PathBuf>, global_opts: GlobalOpts) -> Self
pub fn new(bin: impl Into<PathBuf>, global_opts: GlobalOpts) -> Self
Creates a new p4 clients command with no option selected.
bin is the path to the Perforce command-line executable. The
command spawns the bare p4 clients report as is; set any regular
option or filter to enter RegularMode, or call
Self::unloaded to enter UnloadedMode.
Sourcepub fn unloaded(self) -> Clients<UnloadedMode>
pub fn unloaded(self) -> Clients<UnloadedMode>
§Description
-U
List only client workspaces unloaded with p4 unload.
This is a standalone syntax form (p4 clients -U) that accepts no
other options.
Transitions this command to the UnloadedMode state.
Sourcepub fn display_time(self, v: bool) -> Clients<RegularMode>
pub fn display_time(self, v: bool) -> Clients<RegularMode>
§Description
-t
Display the time as well as the date of the last update to the workspace.
Transitions this command to the RegularMode state.
Sourcepub fn limit(self, v: u64) -> Clients<RegularMode>
pub fn limit(self, v: u64) -> Clients<RegularMode>
§Description
-m max
List only the first max client workspaces.
Transitions this command to the RegularMode state.
Sourcepub fn stream(self, v: impl Into<String>) -> Clients<RegularMode>
pub fn stream(self, v: impl Into<String>) -> Clients<RegularMode>
§Description
-S stream
List client workspaces associated with the specified stream.
Transitions this command to the RegularMode state.
Sourcepub fn filter(
self,
v: impl Into<String>,
case_insensitive: bool,
) -> Clients<RegularMode<Filter, Unselected, Unselected>>
pub fn filter( self, v: impl Into<String>, case_insensitive: bool, ) -> Clients<RegularMode<Filter, Unselected, Unselected>>
§Description
-e filter / -E filter
v is the client workspace name filter pattern; lists only client
workspaces whose name matches it.
When case_insensitive is false (-e), the pattern is matched
using the server’s normal case-sensitivity rules. When
case_insensitive is true (-E), the pattern is matched
case-insensitively, even on a case-sensitive server.
--client-case-insensitive is equivalent to -E.
Transitions this command to the Filter state.
Sourcepub fn user(
self,
v: impl Into<String>,
) -> Clients<RegularMode<Unselected, User, Unselected>>
pub fn user( self, v: impl Into<String>, ) -> Clients<RegularMode<Unselected, User, Unselected>>
§Description
-u user [–user-case-insensitive]
List client workspaces that are owned by v. This can include * wildcards to form a search pattern. If wildcards are used, enclose the search pattern in double quotes (").
For example:
p4 clients -u "O*hara"
Call Clients::case_insensitive on the entered state to add the --user-case-insensitive suboption.
Transitions this command to the User state.
Sourcepub fn filter_me(self) -> Clients<RegularMode<Unselected, Me, Unselected>>
pub fn filter_me(self) -> Clients<RegularMode<Unselected, Me, Unselected>>
Sourcepub fn all(self) -> Clients<RegularMode<Unselected, Unselected, ListAll>>
pub fn all(self) -> Clients<RegularMode<Unselected, Unselected, ListAll>>
Sourcepub fn server_id(
self,
v: impl Into<String>,
) -> Clients<RegularMode<Unselected, Unselected, ListSpecified>>
pub fn server_id( self, v: impl Into<String>, ) -> Clients<RegularMode<Unselected, Unselected, ListSpecified>>
§Description
-s serverID
List only client workspaces bound to the specified serverID. On an
edge server, the -s option defaults to the edge server’s serverID.
Transitions this command to the ListSpecified state.
Source§impl<M> Clients<M>
impl<M> Clients<M>
Sourcepub fn get_global_opts(&self) -> &GlobalOpts
pub fn get_global_opts(&self) -> &GlobalOpts
Sourcepub fn set_global_opts(&mut self, v: GlobalOpts) -> &mut Self
pub fn set_global_opts(&mut self, v: GlobalOpts) -> &mut Self
Sourcepub fn global_opts(self, v: GlobalOpts) -> Self
pub fn global_opts(self, v: GlobalOpts) -> Self
Source§impl<F, U, C> Clients<RegularMode<F, U, C>>
impl<F, U, C> Clients<RegularMode<F, U, C>>
Sourcepub fn get_display_time(&self) -> bool
pub fn get_display_time(&self) -> bool
Sourcepub fn set_display_time(&mut self, v: bool) -> &mut Self
pub fn set_display_time(&mut self, v: bool) -> &mut Self
Sourcepub fn display_time(self, v: bool) -> Self
pub fn display_time(self, v: bool) -> Self
Sourcepub fn get_stream(&self) -> Option<&String>
pub fn get_stream(&self) -> Option<&String>
Sourcepub fn set_stream(&mut self, v: impl Into<String>) -> &mut Self
pub fn set_stream(&mut self, v: impl Into<String>) -> &mut Self
Source§impl<U, C> Clients<RegularMode<Unselected, U, C>>
impl<U, C> Clients<RegularMode<Unselected, U, C>>
Sourcepub fn filter(
self,
v: impl Into<String>,
case_insensitive: bool,
) -> Clients<RegularMode<Filter, U, C>>
pub fn filter( self, v: impl Into<String>, case_insensitive: bool, ) -> Clients<RegularMode<Filter, U, C>>
§Description
-e filter / -E filter
v is the client workspace name filter pattern; lists only client
workspaces whose name matches it.
When case_insensitive is false (-e), the pattern is matched
using the server’s normal case-sensitivity rules. When
case_insensitive is true (-E), the pattern is matched
case-insensitively, even on a case-sensitive server.
--client-case-insensitive is equivalent to -E.
Transitions this command to the Filter state.
Source§impl<F, C> Clients<RegularMode<F, Unselected, C>>
impl<F, C> Clients<RegularMode<F, Unselected, C>>
Sourcepub fn user(self, v: impl Into<String>) -> Clients<RegularMode<F, User, C>>
pub fn user(self, v: impl Into<String>) -> Clients<RegularMode<F, User, C>>
§Description
-u user [–user-case-insensitive]
List client workspaces that are owned by v. This can include * wildcards to form a search pattern. If wildcards are used, enclose the search pattern in double quotes (").
For example:
p4 clients -u "O*hara"
Call Clients::case_insensitive on the entered state to add the --user-case-insensitive suboption.
Transitions this command to the User state.
Source§impl<F, C> Clients<RegularMode<F, User, C>>
impl<F, C> Clients<RegularMode<F, User, C>>
Sourcepub fn case_insensitive(self) -> Clients<RegularMode<F, User, C>>
pub fn case_insensitive(self) -> Clients<RegularMode<F, User, C>>
§Description
–user-case-insensitive
Indicates that the -u user value is a case-insensitive search
pattern, even on a case-sensitive server.
For example:
p4 clients -u "O*hara" --user-case-insensitive
Source§impl<F, U> Clients<RegularMode<F, U, Unselected>>
impl<F, U> Clients<RegularMode<F, U, Unselected>>
Sourcepub fn all(self) -> Clients<RegularMode<F, U, ListAll>>
pub fn all(self) -> Clients<RegularMode<F, U, ListAll>>
Sourcepub fn server_id(
self,
v: impl Into<String>,
) -> Clients<RegularMode<F, U, ListSpecified>>
pub fn server_id( self, v: impl Into<String>, ) -> Clients<RegularMode<F, U, ListSpecified>>
§Description
-s serverID
List only client workspaces bound to the specified serverID. On an
edge server, the -s option defaults to the edge server’s serverID.
Transitions this command to the ListSpecified state.