Skip to main content

Changes

Struct Changes 

Source
pub struct Changes<L = Unselected> { /* private fields */ }
Expand description

p4 [g-opts] changes [-i -t -l -L -f] [-c client] [ -e changelist#][-m max] [-r] [-s status] [-u user | --me] [file[RevRange] ...] [--stream | --nostream]

List submitted and pending changelists.

The command p4 changelists is an alias for p4 changes.

The L type parameter tracks the -l / -L long output mode at compile time; see FullDescription, TruncatedDescription, Self::long_output_full, and Self::long_output_truncated.

Implementations§

Source§

impl Changes<Unselected>

Source

pub fn new(bin: impl Into<PathBuf>, global_opts: GlobalOpts) -> Self

Creates a new p4 changes command.

bin is the path to the Perforce command-line executable.

Source

pub fn long_output_full(self) -> Changes<FullDescription>

§Description

-l

List long output, with the full text of each changelist description.

Transitions this command to the FullDescription state.

Source

pub fn long_output_truncated(self) -> Changes<TruncatedDescription>

§Description

-L

List long output, with the full text of each changelist description truncated at 250 characters.

Transitions this command to the TruncatedDescription state.

Source§

impl<L: ExclusiveOption> Changes<L>

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_filter_clients(&self) -> Option<&[String]>

§Description

-c client

List only changes made from the named client workspace. This option can be repeated to filter for multiple clients.

Source

pub fn set_filter_client(&mut self, v: impl Into<String>) -> &mut Self

§Description

-c client

List only changes made from the named client workspace. This option can be repeated to filter for multiple clients.

Source

pub fn filter_client(self, v: impl Into<String>) -> Self

§Description

-c client

List only changes made from the named client workspace. This option can be repeated to filter for multiple clients.

Source

pub fn get_min_change_list(&self) -> Option<&String>

§Description

-e changelist#

Display only changes where the changelist number is equal to, or higher than, the specified changelist number.

Source

pub fn set_min_change_list(&mut self, v: impl Into<String>) -> &mut Self

§Description

-e changelist#

Display only changes where the changelist number is equal to, or higher than, the specified changelist number.

Source

pub fn min_change_list(self, v: impl Into<String>) -> Self

§Description

-e changelist#

Display only changes where the changelist number is equal to, or higher than, the specified changelist number.

Source

pub fn get_include_restricted(&self) -> bool

§Description

-f

View restricted changes (requires admin permission).

Source

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

§Description

-f

View restricted changes (requires admin permission).

Source

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

§Description

-f

View restricted changes (requires admin permission).

Source

pub fn get_include_integrated(&self) -> bool

§Description

-i

Include changelists that affected files that were integrated with the specified files.

Source

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

§Description

-i

Include changelists that affected files that were integrated with the specified files.

Source

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

§Description

-i

Include changelists that affected files that were integrated with the specified files.

Source

pub fn get_limit(&self) -> Option<u64>

§Description

-m max

List only the highest numbered max changes.

Source

pub fn set_limit(&mut self, v: u64) -> &mut Self

§Description

-m max

List only the highest numbered max changes.

Source

pub fn limit(self, v: u64) -> Self

§Description

-m max

List only the highest numbered max changes.

Source

pub fn get_reverse_order(&self) -> bool

§Description

-r

Reverse the order of the list, earliest first instead of most recent first.

Source

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

§Description

-r

Reverse the order of the list, earliest first instead of most recent first.

Source

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

§Description

-r

Reverse the order of the list, earliest first instead of most recent first.

Source

pub fn get_status(&self) -> Option<Status>

§Description

-s status

Limit the list to the changelists with the specified status: pending, submitted, or shelved.

Source

pub fn set_status(&mut self, v: Status) -> &mut Self

§Description

-s status

Limit the list to the changelists with the specified status: pending, submitted, or shelved.

Source

pub fn status(self, v: Status) -> Self

§Description

-s status

Limit the list to the changelists with the specified status: pending, submitted, or shelved.

Source

pub fn get_include_time(&self) -> bool

§Description

-t

Display the time as well as the date of each change.

Source

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

§Description

-t

Display the time as well as the date of each change.

Source

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

§Description

-t

Display the time as well as the date of each change.

Source

pub fn get_filter_users(&self) -> Option<&[User]>

§Description

-u user / --me

List only changes made from the named user, or, with User::Me, the current user (equivalent to -u $P4USER). This option can be repeated to filter for multiple users.

Source

pub fn set_filter_user(&mut self, v: impl Into<String>) -> &mut Self

§Description

-u user

List only changes made from the named user. This option can be repeated to filter for multiple users.

Source

pub fn filter_user(self, v: impl Into<String>) -> Self

§Description

-u user

List only changes made from the named user. This option can be repeated to filter for multiple users.

Source

pub fn set_filter_me(&mut self) -> &mut Self

§Description

--me

Equivalent to -u $P4USER.

Source

pub fn filter_me(self) -> Self

§Description

--me

Equivalent to -u $P4USER.

Source

pub fn get_client_case_insensitive(&self) -> bool

§Description

--client-case-insensitive

Makes the -c client search pattern case-insensitive, even on a case-sensitive server.

Source

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

§Description

--client-case-insensitive

Makes the -c client search pattern case-insensitive, even on a case-sensitive server.

Source

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

§Description

--client-case-insensitive

Makes the -c client search pattern case-insensitive, even on a case-sensitive server.

Source

pub fn get_stream(&self) -> Option<bool>

§Description

--stream / --nostream

With true, display only changes that contain a stream spec (--stream). With false, display only changes that do not contain a stream spec (--nostream).

Source

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

§Description

--stream / --nostream

With true, display only changes that contain a stream spec (--stream). With false, display only changes that do not contain a stream spec (--nostream).

Source

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

§Description

--stream / --nostream

With true, display only changes that contain a stream spec (--stream). With false, display only changes that do not contain a stream spec (--nostream).

Trait Implementations§

Source§

impl<L: Clone> Clone for Changes<L>

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<L: Debug> Debug for Changes<L>

Source§

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

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

impl<L: Default> Default for Changes<L>

Source§

fn default() -> Self

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

impl<L: ExclusiveOption> ParameterizedSpawn for Changes<L>

Source§

fn spawn_with<'a>( &mut self, files: Self::Input<'a>, ) -> Result<Self::Output<'a>, Self::Error>

Spawns p4 changes for the given files as a child process with piped standard output and error streams; use the returned Child handle to wait for it or interact with it.

If files are specified, only changelists that affect those files are listed. Pass an empty slice to list all changelists.

Source§

type Input<'a> = &'a [&'a OsStr]

Source§

type Output<'a> = Child

Source§

type Error = Error

Source§

impl<L: ExclusiveOption> SubCommand for Changes<L>

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<L> Freeze for Changes<L>
where L: Freeze,

§

impl<L> RefUnwindSafe for Changes<L>
where L: RefUnwindSafe,

§

impl<L> Send for Changes<L>
where L: Send,

§

impl<L> Sync for Changes<L>
where L: Sync,

§

impl<L> Unpin for Changes<L>
where L: Unpin,

§

impl<L> UnsafeUnpin for Changes<L>
where L: UnsafeUnpin,

§

impl<L> UnwindSafe for Changes<L>
where L: 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> ParameterizedOutput for T
where T: for<'a> ParameterizedSpawn<Output<'a> = Child, Error = Error>,

Source§

type Input<'a> = <T as ParameterizedSpawn>::Input<'a>

Source§

type Error = Error

Source§

fn output_with<'a>( &mut self, input: <T as ParameterizedOutput>::Input<'a>, ) -> Result<Output, <T as ParameterizedOutput>::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.