pub struct Admin<T: SubCommand> { /* private fields */ }Expand description
A p4 admin operation wrapping a selected SubCommand.
Implementations§
Source§impl<T: SubCommand> Admin<T>
impl<T: SubCommand> Admin<T>
Sourcepub fn new(
bin: impl Into<PathBuf>,
global_opts: GlobalOpts,
sub_command: T,
) -> Self
pub fn new( bin: impl Into<PathBuf>, global_opts: GlobalOpts, sub_command: T, ) -> Self
Creates a p4 admin command wrapping the given subcommand.
bin is the path to the Perforce command-line executable.
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<C: ExclusiveOption> Admin<CheckPoint<C>>
impl<C: ExclusiveOption> Admin<CheckPoint<C>>
Sourcepub fn get_parallel(&self) -> bool
pub fn get_parallel(&self) -> bool
Sourcepub fn set_parallel(&mut self, parallel: bool) -> &mut Self
pub fn set_parallel(&mut self, parallel: bool) -> &mut Self
Sourcepub fn get_threads(&self) -> Option<&u32>
pub fn get_threads(&self) -> Option<&u32>
Sourcepub fn set_threads(&mut self, threads: u32) -> &mut Self
pub fn set_threads(&mut self, threads: u32) -> &mut Self
Sourcepub fn get_multiple_files(&self) -> bool
pub fn get_multiple_files(&self) -> bool
§Description
-m
Uses multiple files if there are multiple parallel threads because
db.checkpoint.threads is greater than 1 or the -N option is greater
than 1. See Parallel checkpointing, dumping and recovery
in the P4
Server Administration Documentation. See also Checkpoint examples.
Sourcepub fn set_multiple_files(&mut self, multiple_files: bool) -> &mut Self
pub fn set_multiple_files(&mut self, multiple_files: bool) -> &mut Self
§Description
-m
Uses multiple files if there are multiple parallel threads because
db.checkpoint.threads is greater than 1 or the -N option is greater
than 1. See Parallel checkpointing, dumping and recovery
in the P4
Server Administration Documentation. See also Checkpoint examples.
Sourcepub fn multiple_files(self, multiple_files: bool) -> Self
pub fn multiple_files(self, multiple_files: bool) -> Self
§Description
-m
Uses multiple files if there are multiple parallel threads because
db.checkpoint.threads is greater than 1 or the -N option is greater
than 1. See Parallel checkpointing, dumping and recovery
in the P4
Server Administration Documentation. See also Checkpoint examples.
Source§impl Admin<CheckPoint<Unselected>>
impl Admin<CheckPoint<Unselected>>
Sourcepub fn compress_both(self) -> Admin<CheckPoint<Both>>
pub fn compress_both(self) -> Admin<CheckPoint<Both>>
§Description
-z
Save the checkpoint and journal file in compressed format. The .gz
suffix is appended to compressed journals and checkpoint files, which
are in gzip format. If you do not specify -z or -Z, no compression
occurs.
Sourcepub fn compress_checkpoint_only(self) -> Admin<CheckPoint<CheckPointOnly>>
pub fn compress_checkpoint_only(self) -> Admin<CheckPoint<CheckPointOnly>>
§Description
-Z
For p4 admin checkpoint -Z, save the checkpoint in compressed format,
but leave the journal uncompressed for use by replica servers. The
.gz suffix is appended to compressed journals and checkpoint files,
which are in gzip format. If you do not specify -z or -Z, no
compression occurs.
Source§impl Admin<Journal>
impl Admin<Journal>
Sourcepub fn get_gzip(&self) -> bool
pub fn get_gzip(&self) -> bool
§Description
-z
Save the journal file in compressed format. The .gz suffix is
appended to compressed journals and checkpoint files, which are in
gzip format. If you do not specify -z, no compression occurs.
Source§impl Admin<UpdateSpecDepot<Unselected>>
impl Admin<UpdateSpecDepot<Unselected>>
Sourcepub fn all(self) -> Admin<UpdateSpecDepot<All>>
pub fn all(self) -> Admin<UpdateSpecDepot<All>>
Sourcepub fn specified_type(
self,
specified_type: SpecifiedType,
) -> Admin<UpdateSpecDepot<Selected>>
pub fn specified_type( self, specified_type: SpecifiedType, ) -> Admin<UpdateSpecDepot<Selected>>
§Description
-s type
For p4 admin updatespecdepot -s, update the spec depot with forms of
the specified type, where type is one of client, depot, repo,
branch, label, typemap, group, user, job, stream,
triggers, protect, server, license, or jobspec.
Source§impl Admin<UpdateSpecDepot<Selected>>
impl Admin<UpdateSpecDepot<Selected>>
Sourcepub fn get_specified_type(&self) -> &SpecifiedType
pub fn get_specified_type(&self) -> &SpecifiedType
§Description
-s type
For p4 admin updatespecdepot -s, update the spec depot with forms of
the specified type, where type is one of client, depot, repo,
branch, label, typemap, group, user, job, stream,
triggers, protect, server, license, or jobspec.
Sourcepub fn set_specified_type(&mut self, specified_type: SpecifiedType) -> &mut Self
pub fn set_specified_type(&mut self, specified_type: SpecifiedType) -> &mut Self
§Description
-s type
For p4 admin updatespecdepot -s, update the spec depot with forms of
the specified type, where type is one of client, depot, repo,
branch, label, typemap, group, user, job, stream,
triggers, protect, server, license, or jobspec.
Source§impl Admin<ResetPassword<Unselected>>
impl Admin<ResetPassword<Unselected>>
Source§impl Admin<ResetPassword<User>>
impl Admin<ResetPassword<User>>
Source§impl<T: ExclusiveOption> Admin<ResetPassword<T>>
impl<T: ExclusiveOption> Admin<ResetPassword<T>>
Sourcepub fn get_super_user(&self) -> bool
pub fn get_super_user(&self) -> bool
Sourcepub fn set_super_user(&mut self, super_user: bool) -> &mut Self
pub fn set_super_user(&mut self, super_user: bool) -> &mut Self
Sourcepub fn super_user(self, super_user: bool) -> Self
pub fn super_user(self, super_user: bool) -> Self
Source§impl Admin<ReplicaFilterReconcile<Unselected>>
impl Admin<ReplicaFilterReconcile<Unselected>>
Sourcepub fn restrict_only(self) -> Admin<ReplicaFilterReconcile<RestrictOnly>>
pub fn restrict_only(self) -> Admin<ReplicaFilterReconcile<RestrictOnly>>
§Description
–restrict-only
Reconcile the replica database by only removing applicable database records.
Sourcepub fn expand_only(self) -> Admin<ReplicaFilterReconcile<ExpandOnly>>
pub fn expand_only(self) -> Admin<ReplicaFilterReconcile<ExpandOnly>>
§Description
–expand-only
Reconcile the replica database by only adding applicable database records.
Trait Implementations§
Source§impl ParameterizedSpawn for Admin<Stop>
impl ParameterizedSpawn for Admin<Stop>
Source§fn spawn_with<'a>(
&mut self,
(): Self::Input<'a>,
) -> Result<Self::Output<'a>, Self::Error>
fn spawn_with<'a>( &mut self, (): Self::Input<'a>, ) -> Result<Self::Output<'a>, Self::Error>
Spawns p4 admin stop as a child process with piped standard output
and error streams; use the returned Child handle to wait for it or
interact with it.
type Input<'a> = ()
type Output<'a> = Child
type Error = Error
Source§impl ParameterizedSpawn for Admin<Restart>
impl ParameterizedSpawn for Admin<Restart>
Source§fn spawn_with<'a>(
&mut self,
(): Self::Input<'a>,
) -> Result<Self::Output<'a>, Self::Error>
fn spawn_with<'a>( &mut self, (): Self::Input<'a>, ) -> Result<Self::Output<'a>, Self::Error>
Spawns p4 admin restart as a child process with piped standard
output and error streams; use the returned Child handle to wait
for it or interact with it.
type Input<'a> = ()
type Output<'a> = Child
type Error = Error
Source§impl<S: ExclusiveOption> ParameterizedSpawn for Admin<UpdateSpecDepot<S>>
impl<S: ExclusiveOption> ParameterizedSpawn for Admin<UpdateSpecDepot<S>>
Source§fn spawn_with<'a>(
&mut self,
(): Self::Input<'a>,
) -> Result<Self::Output<'a>, Self::Error>
fn spawn_with<'a>( &mut self, (): Self::Input<'a>, ) -> Result<Self::Output<'a>, Self::Error>
Spawns p4 admin updatespecdepot as a child process with piped
standard output and error streams; use the returned Child handle
to wait for it or interact with it.
type Input<'a> = ()
type Output<'a> = Child
type Error = Error
Source§impl<T: ExclusiveOption> ParameterizedSpawn for Admin<ResetPassword<T>>
impl<T: ExclusiveOption> ParameterizedSpawn for Admin<ResetPassword<T>>
Source§fn spawn_with<'a>(
&mut self,
(): Self::Input<'a>,
) -> Result<Self::Output<'a>, Self::Error>
fn spawn_with<'a>( &mut self, (): Self::Input<'a>, ) -> Result<Self::Output<'a>, Self::Error>
Spawns p4 admin resetpassword as a child process with piped standard
output and error streams; use the returned Child handle to wait
for it or interact with it.
type Input<'a> = ()
type Output<'a> = Child
type Error = Error
Source§impl ParameterizedSpawn for Admin<SetLdapUsers>
Available on non-crate feature lt2015_1 only.
impl ParameterizedSpawn for Admin<SetLdapUsers>
lt2015_1 only.Source§fn spawn_with<'a>(
&mut self,
(): Self::Input<'a>,
) -> Result<Self::Output<'a>, Self::Error>
fn spawn_with<'a>( &mut self, (): Self::Input<'a>, ) -> Result<Self::Output<'a>, Self::Error>
Spawns p4 admin setldapusers as a child process with piped standard
output and error streams; use the returned Child handle to wait
for it or interact with it.
type Input<'a> = ()
type Output<'a> = Child
type Error = Error
Source§impl ParameterizedSpawn for Admin<EndJournal>
Available on non-crate feature lt2018_1 only.
impl ParameterizedSpawn for Admin<EndJournal>
lt2018_1 only.Source§fn spawn_with<'a>(
&mut self,
(): Self::Input<'a>,
) -> Result<Self::Output<'a>, Self::Error>
fn spawn_with<'a>( &mut self, (): Self::Input<'a>, ) -> Result<Self::Output<'a>, Self::Error>
Spawns p4 admin endjournal as a child process with piped standard
output and error streams; use the returned Child handle to wait
for it or interact with it.
type Input<'a> = ()
type Output<'a> = Child
type Error = Error
Source§impl ParameterizedSpawn for Admin<SysInfo>
Available on non-crate feature lt2023_1 only.
impl ParameterizedSpawn for Admin<SysInfo>
lt2023_1 only.Source§fn spawn_with<'a>(
&mut self,
(): Self::Input<'a>,
) -> Result<Self::Output<'a>, Self::Error>
fn spawn_with<'a>( &mut self, (): Self::Input<'a>, ) -> Result<Self::Output<'a>, Self::Error>
Spawns p4 admin sysinfo as a child process with piped standard
output and error streams; use the returned Child handle to wait
for it or interact with it.
type Input<'a> = ()
type Output<'a> = Child
type Error = Error
Source§impl ParameterizedSpawn for Admin<ResourceMonitor>
Available on non-crate feature lt2023_1 only.
impl ParameterizedSpawn for Admin<ResourceMonitor>
lt2023_1 only.Source§fn spawn_with<'a>(
&mut self,
(): Self::Input<'a>,
) -> Result<Self::Output<'a>, Self::Error>
fn spawn_with<'a>( &mut self, (): Self::Input<'a>, ) -> Result<Self::Output<'a>, Self::Error>
Spawns p4 admin resource-monitor as a child process with piped
standard output and error streams; use the returned Child handle
to wait for it or interact with it.
type Input<'a> = ()
type Output<'a> = Child
type Error = Error
Source§impl<C: ExclusiveOption> ParameterizedSpawn for Admin<CheckPoint<C>>
impl<C: ExclusiveOption> ParameterizedSpawn for Admin<CheckPoint<C>>
Source§fn spawn_with<'a>(
&mut self,
prefix: Self::Input<'a>,
) -> Result<Self::Output<'a>, Self::Error>
fn spawn_with<'a>( &mut self, prefix: Self::Input<'a>, ) -> Result<Self::Output<'a>, Self::Error>
Spawns p4 admin checkpoint as a child process with piped standard
output and error streams; use the returned Child handle to wait
for it or interact with it.
Pass Some(prefix) to name the checkpoint with the given prefix, or
None to use the default checkpoint name.
type Input<'a> = &'a OsStr
type Output<'a> = Child
type Error = Error
Source§impl ParameterizedSpawn for Admin<Journal>
impl ParameterizedSpawn for Admin<Journal>
Source§fn spawn_with<'a>(
&mut self,
prefix: Self::Input<'a>,
) -> Result<Self::Output<'a>, Self::Error>
fn spawn_with<'a>( &mut self, prefix: Self::Input<'a>, ) -> Result<Self::Output<'a>, Self::Error>
Spawns p4 admin journal as a child process with piped standard
output and error streams; use the returned Child handle to wait
for it or interact with it.
Pass Some(prefix) to name the journal with the given prefix, or
None to use the default journal name.
type Input<'a> = &'a OsStr
type Output<'a> = Child
type Error = Error
Source§impl<M: ExclusiveOption> ParameterizedSpawn for Admin<ReplicaFilterReconcile<M>>
Available on non-crate feature lt2025_2 only.
impl<M: ExclusiveOption> ParameterizedSpawn for Admin<ReplicaFilterReconcile<M>>
lt2025_2 only.Source§fn spawn_with<'a>(
&mut self,
tables: Self::Input<'a>,
) -> Result<Self::Output<'a>, Self::Error>
fn spawn_with<'a>( &mut self, tables: Self::Input<'a>, ) -> Result<Self::Output<'a>, Self::Error>
Spawns p4 admin replica-filter-reconcile for the given tables as a
child process with piped standard output and error streams; use the
returned Child handle to wait for it or interact with it.
Pass an empty slice to reconcile all applicable database tables.