pub struct Describe<M = Unselected> { /* private fields */ }Expand description
p4 [g-opts] describe [-doptions] [-a -f -I -m -O -s -S] changelist ...
Provides information about changelists, as well as files in the changelists, and the path of the open stream, if a stream is open.
The M type parameter tracks the output mode at compile time. The
default Unselected state offers neither -s nor -a/-d;
Self::short_summary_output transitions to the ShortSummaryMode
state, while Self::display_added_text_content and
Self::diff_options transition to the DetailDiffMode state.
Implementations§
Source§impl Describe<Unselected>
impl Describe<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 describe command.
bin is the path to the Perforce command-line executable.
Sourcepub fn short_summary_output(self) -> Describe<ShortSummaryMode>
pub fn short_summary_output(self) -> Describe<ShortSummaryMode>
§Description
-s
Display a shortened output that excludes the diffs of the files.
Transitions this command to the ShortSummaryMode state.
Sourcepub fn display_added_text_content(self, v: bool) -> Describe<DetailDiffMode>
pub fn display_added_text_content(self, v: bool) -> Describe<DetailDiffMode>
§Description
-a
For text files only (ignores binary files):
- For shelved files, shows the content for “open for add” (pending) files.
- For submitted files, shows the content of added files.
Transitions this command to the DetailDiffMode state with -a
set according to v.
Sourcepub fn diff_options(self, v: impl Into<String>) -> Describe<DetailDiffMode>
pub fn diff_options(self, v: impl Into<String>) -> Describe<DetailDiffMode>
§Description
-doptions
Runs the diff routine with one of a subset of the standard UNIX diff options. See Usage notes for an option listing.
Transitions this command to the DetailDiffMode state with the
diff options set.
Source§impl<M: ExclusiveOption> Describe<M>
impl<M: ExclusiveOption> Describe<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
Sourcepub fn get_force_restricted(&self) -> bool
pub fn get_force_restricted(&self) -> bool
§Description
-f
Force the display of descriptions for restricted changelists. This
option requires admin permission.
Sourcepub fn set_force_restricted(&mut self, v: bool) -> &mut Self
pub fn set_force_restricted(&mut self, v: bool) -> &mut Self
§Description
-f
Force the display of descriptions for restricted changelists. This
option requires admin permission.
Sourcepub fn force_restricted(self, v: bool) -> Self
pub fn force_restricted(self, v: bool) -> Self
§Description
-f
Force the display of descriptions for restricted changelists. This
option requires admin permission.
Sourcepub fn get_use_identity(&self) -> bool
pub fn get_use_identity(&self) -> bool
Sourcepub fn set_use_identity(&mut self, v: bool) -> &mut Self
pub fn set_use_identity(&mut self, v: bool) -> &mut Self
Sourcepub fn use_identity(self, v: bool) -> Self
pub fn use_identity(self, v: bool) -> Self
Sourcepub fn get_limit(&self) -> Option<u64>
pub fn get_limit(&self) -> Option<u64>
§Description
-m max
Limits files to the first max number of files. The following
example alphabetically lists (and diffs) two files affected by
changelist 765 and two files affected by changelist 987:
p4 describe -m 2 765 987
Sourcepub fn set_limit(&mut self, v: u64) -> &mut Self
pub fn set_limit(&mut self, v: u64) -> &mut Self
§Description
-m max
Limits files to the first max number of files. The following
example alphabetically lists (and diffs) two files affected by
changelist 765 and two files affected by changelist 987:
p4 describe -m 2 765 987
Sourcepub fn limit(self, v: u64) -> Self
pub fn limit(self, v: u64) -> Self
§Description
-m max
Limits files to the first max number of files. The following
example alphabetically lists (and diffs) two files affected by
changelist 765 and two files affected by changelist 987:
p4 describe -m 2 765 987
Sourcepub fn get_use_original_number(&self) -> bool
pub fn get_use_original_number(&self) -> bool
§Description
-O
If a changelist was renumbered on submit, and you know only the
original changelist number, use -O and the original changelist
number to describe the changelist.
Sourcepub fn set_use_original_number(&mut self, v: bool) -> &mut Self
pub fn set_use_original_number(&mut self, v: bool) -> &mut Self
§Description
-O
If a changelist was renumbered on submit, and you know only the
original changelist number, use -O and the original changelist
number to describe the changelist.
Sourcepub fn use_original_number(self, v: bool) -> Self
pub fn use_original_number(self, v: bool) -> Self
§Description
-O
If a changelist was renumbered on submit, and you know only the
original changelist number, use -O and the original changelist
number to describe the changelist.
Sourcepub fn get_include_shelved_files(&self) -> bool
pub fn get_include_shelved_files(&self) -> bool
§Description
-S
Lists files that are shelved for the pending changelist and displays diffs of the files against their previous revision.
Sourcepub fn set_include_shelved_files(&mut self, v: bool) -> &mut Self
pub fn set_include_shelved_files(&mut self, v: bool) -> &mut Self
§Description
-S
Lists files that are shelved for the pending changelist and displays diffs of the files against their previous revision.
Sourcepub fn include_shelved_files(self, v: bool) -> Self
pub fn include_shelved_files(self, v: bool) -> Self
§Description
-S
Lists files that are shelved for the pending changelist and displays diffs of the files against their previous revision.
Source§impl Describe<DetailDiffMode>
impl Describe<DetailDiffMode>
Sourcepub fn get_diff_options(&self) -> Option<&str>
pub fn get_diff_options(&self) -> Option<&str>
§Description
-doptions
Runs the diff routine with one of a subset of the standard UNIX diff options. See Usage notes for an option listing.
Sourcepub fn set_diff_options(&mut self, v: impl Into<String>) -> &mut Self
pub fn set_diff_options(&mut self, v: impl Into<String>) -> &mut Self
§Description
-doptions
Runs the diff routine with one of a subset of the standard UNIX diff options. See Usage notes for an option listing.
Sourcepub fn get_display_added_text_content(&self) -> bool
pub fn get_display_added_text_content(&self) -> bool
§Description
-a
For text files only (ignores binary files):
- For shelved files, shows the content for “open for add” (pending) files.
- For submitted files, shows the content of added files.
Sourcepub fn set_display_added_text_content(&mut self, v: bool) -> &mut Self
pub fn set_display_added_text_content(&mut self, v: bool) -> &mut Self
§Description
-a
For text files only (ignores binary files):
- For shelved files, shows the content for “open for add” (pending) files.
- For submitted files, shows the content of added files.
Trait Implementations§
Source§impl<M: ExclusiveOption> ParameterizedSpawn for Describe<M>
impl<M: ExclusiveOption> ParameterizedSpawn for Describe<M>
Source§fn spawn_with<'a>(
&mut self,
changelists: Self::Input<'a>,
) -> Result<Self::Output<'a>, Self::Error>
fn spawn_with<'a>( &mut self, changelists: Self::Input<'a>, ) -> Result<Self::Output<'a>, Self::Error>
Spawns p4 describe for the given changelists as a child process with
piped standard output and error streams; use the returned Child
handle to wait for it or interact with it.