Skip to main content

Describe

Struct Describe 

Source
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>

Source

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.

Source

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.

Source

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.

Source

pub fn diff_options(self, v: impl Into<DiffOptions>) -> 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>

Source

pub fn get_global_opts(&self) -> &GlobalOpts

§Description

g-opts

See Global options.

Source

pub fn set_global_opts(&mut self, v: GlobalOpts) -> &mut Self

§Description

g-opts

See Global options.

Source

pub fn global_opts(self, v: GlobalOpts) -> Self

§Description

g-opts

See Global options.

Source

pub fn get_force_restricted(&self) -> bool

§Description

-f

Force the display of descriptions for restricted changelists. This option requires admin permission.

Source

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.

Source

pub fn force_restricted(self, v: bool) -> Self

§Description

-f

Force the display of descriptions for restricted changelists. This option requires admin permission.

Source

pub fn get_use_identity(&self) -> bool

§Description

-I

Specifies that the changelist number is the Identity field of a changelist.

Source

pub fn set_use_identity(&mut self, v: bool) -> &mut Self

§Description

-I

Specifies that the changelist number is the Identity field of a changelist.

Source

pub fn use_identity(self, v: bool) -> Self

§Description

-I

Specifies that the changelist number is the Identity field of a changelist.

Source

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

Source

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

Source

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

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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>

Source

pub fn get_diff_options(&self) -> Option<&DiffOptions>

§Description

-doptions

Runs the diff routine with one of a subset of the standard UNIX diff options. See Usage notes for an option listing.

Source

pub fn set_diff_options(&mut self, v: impl Into<DiffOptions>) -> &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.

Source

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.
Source

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: Clone> Clone for Describe<M>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<M: Debug> Debug for Describe<M>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<M: Default> Default for Describe<M>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<M: ExclusiveOption, S, I> ParameterizedSpawn<(S,)> for Describe<M>
where S: IntoIterator<Item = I>, I: AsRef<OsStr>,

Source§

fn spawn_with( &mut self, (changelists): (S,), ) -> Result<Self::Output, 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.

Source§

type Output = Child

Source§

type Error = Error

Source§

impl<M: ExclusiveOption> SubCommand for Describe<M>

Source§

fn name(&self) -> &str

Source§

fn inject_local_args(&self, command: &mut Command)

Source§

fn global_opts(&self) -> Option<&GlobalOpts>

Source§

fn inject_args(&self, command: &mut Command)

Source§

fn setup_command<S: AsRef<OsStr>>(&self, bin: S) -> Command

Auto Trait Implementations§

§

impl<M> Freeze for Describe<M>
where M: Freeze,

§

impl<M> RefUnwindSafe for Describe<M>
where M: RefUnwindSafe,

§

impl<M> Send for Describe<M>
where M: Send,

§

impl<M> Sync for Describe<M>
where M: Sync,

§

impl<M> Unpin for Describe<M>
where M: Unpin,

§

impl<M> UnsafeUnpin for Describe<M>
where M: UnsafeUnpin,

§

impl<M> UnwindSafe for Describe<M>
where M: UnwindSafe,

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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, T1> OutputExt1<T1> for T
where T: ParameterizedOutput<T1>,

Source§

fn output( &mut self, a: T1, ) -> Result<Output, <T as ParameterizedOutput<T1>>::Error>

Source§

impl<T, I> ParameterizedOutput<I> for T
where T: ParameterizedSpawn<I, Output = Child, Error = Error>,

Source§

type Error = Error

Source§

fn output_with( &mut self, input: I, ) -> Result<Output, <T as ParameterizedOutput<I>>::Error>

Source§

impl<T, T1> SpawnExt1<T1> for T
where T: ParameterizedSpawn<T1>,

Source§

fn spawn( &mut self, a: T1, ) -> Result<<T as ParameterizedSpawn<T1>>::Output, <T as ParameterizedSpawn<T1>>::Error>

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. 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.