pub struct Extension<T: ExclusiveOption> { /* private fields */ }Expand description
A p4 extension command with a selected operation.
§Syntax
p4 [g-opts] extension --sample extName
p4 [g-opts] extension --package dir [--sign keyDir]
p4 [g-opts] extension --install extName.p4-extension [--yes]
p4 [g-opts] extension --install certificateFile --cert [--comment]
p4 [g-opts] extension --delete extFQN [--name instName] [--revision=n] [--path FileSpec] [--yes]
p4 [g-opts] extension --delete fingerprint --cert
p4 [g-opts] extension --configure extFQN [--revision=n] [-o | -i]
p4 [g-opts] extension --configure extFQN [--revision=n] [-o | -i] --name instName
p4 [g-opts] extension --run instName [extArguments]
p4 [g-opts] extension --list --type type [--path FileSpec]Manages the installation, versioning, and configuration of extensions.
The type parameter selects the operation, such as Sample, Package,
Install, Delete, Configure,
Run, or List.
Implementations§
Source§impl<T: ExclusiveOption> Extension<T>
impl<T: ExclusiveOption> Extension<T>
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 Extension<Sample>
impl Extension<Sample>
Source§impl Extension<Package>
impl Extension<Package>
Sourcepub fn set_dir(&mut self, v: impl Into<String>) -> &mut Self
pub fn set_dir(&mut self, v: impl Into<String>) -> &mut Self
Sets the directory of extension files to package.
Sourcepub fn dir(self, v: impl Into<String>) -> Self
pub fn dir(self, v: impl Into<String>) -> Self
Sets the directory of extension files to package.
Source§impl Extension<Install<Unselected>>
impl Extension<Install<Unselected>>
Sourcepub fn set_file(&mut self, v: impl Into<String>) -> &mut Self
pub fn set_file(&mut self, v: impl Into<String>) -> &mut Self
Sets the packaged extension or certificate file to install.
Sourcepub fn file(self, v: impl Into<String>) -> Self
pub fn file(self, v: impl Into<String>) -> Self
Sets the packaged extension or certificate file to install.
Sourcepub fn yes(self) -> Extension<Install<InstallExt>>
pub fn yes(self) -> Extension<Install<InstallExt>>
§Description
–yes
To actually perform the install or delete, the --yes option is
required. Without --yes, the p4 extension command merely reports
what it would do without actually performing the install or delete.
-y is equivalent to --yes.
Source§impl Extension<Install<InstallExt>>
impl Extension<Install<InstallExt>>
Sourcepub fn get_yes(&self) -> bool
pub fn get_yes(&self) -> bool
§Description
–yes
To actually perform the install or delete, the --yes option is
required. Without --yes, the p4 extension command merely reports
what it would do without actually performing the install or delete.
-y is equivalent to --yes.
Sourcepub fn set_yes(&mut self, v: bool) -> &mut Self
pub fn set_yes(&mut self, v: bool) -> &mut Self
§Description
–yes
To actually perform the install or delete, the --yes option is
required. Without --yes, the p4 extension command merely reports
what it would do without actually performing the install or delete.
-y is equivalent to --yes.
Sourcepub fn yes(self, v: bool) -> Self
pub fn yes(self, v: bool) -> Self
§Description
–yes
To actually perform the install or delete, the --yes option is
required. Without --yes, the p4 extension command merely reports
what it would do without actually performing the install or delete.
-y is equivalent to --yes.
Sourcepub fn get_allow_unsigned(&self) -> bool
pub fn get_allow_unsigned(&self) -> bool
§Description
–allow-unsigned
(Optional) If included in the commands to install (or delete) an extension, it is the same as if the server.extensions.allow.unsigned configurable were set to 1 so that the extension does not need to be signed.
Sourcepub fn set_allow_unsigned(&mut self, v: bool) -> &mut Self
pub fn set_allow_unsigned(&mut self, v: bool) -> &mut Self
§Description
–allow-unsigned
(Optional) If included in the commands to install (or delete) an extension, it is the same as if the server.extensions.allow.unsigned configurable were set to 1 so that the extension does not need to be signed.
Sourcepub fn allow_unsigned(self, v: bool) -> Self
pub fn allow_unsigned(self, v: bool) -> Self
§Description
–allow-unsigned
(Optional) If included in the commands to install (or delete) an extension, it is the same as if the server.extensions.allow.unsigned configurable were set to 1 so that the extension does not need to be signed.
Source§impl Extension<Install<InstallCert>>
impl Extension<Install<InstallCert>>
Sourcepub fn get_comment(&self) -> Option<&String>
pub fn get_comment(&self) -> Option<&String>
§Description
–comment
Can be supplied in --install or --delete. For example,
p4 extension --install path/certificate.txt --cert --comment "We trust ACTools".
Sourcepub fn set_comment(&mut self, v: impl Into<String>) -> &mut Self
pub fn set_comment(&mut self, v: impl Into<String>) -> &mut Self
§Description
–comment
Can be supplied in --install or --delete. For example,
p4 extension --install path/certificate.txt --cert --comment "We trust ACTools".
Source§impl Extension<Delete<Unselected>>
impl Extension<Delete<Unselected>>
Sourcepub fn get_fqn(&self) -> &str
pub fn get_fqn(&self) -> &str
Returns the fully-qualified name (or certificate fingerprint) to delete.
Sourcepub fn set_fqn(&mut self, v: impl Into<String>) -> &mut Self
pub fn set_fqn(&mut self, v: impl Into<String>) -> &mut Self
Sets the fully-qualified name (or certificate fingerprint) to delete.
Sourcepub fn fqn(self, v: impl Into<String>) -> Self
pub fn fqn(self, v: impl Into<String>) -> Self
Sets the fully-qualified name (or certificate fingerprint) to delete.
Sourcepub fn yes(self) -> Extension<Delete<DeleteExt>>
pub fn yes(self) -> Extension<Delete<DeleteExt>>
§Description
–yes
To actually perform the install or delete, the --yes option is
required. Without --yes, the p4 extension command merely reports
what it would do without actually performing the install or delete.
-y is equivalent to --yes.
Sourcepub fn revision(self, v: impl Into<String>) -> Extension<Delete<DeleteExt>>
pub fn revision(self, v: impl Into<String>) -> Extension<Delete<DeleteExt>>
§Description
–revision=n
To remove one specific revision and its instances, include the
--revision option.
Source§impl Extension<Delete<DeleteExt>>
impl Extension<Delete<DeleteExt>>
Sourcepub fn get_yes(&self) -> bool
pub fn get_yes(&self) -> bool
§Description
–yes
To actually perform the install or delete, the --yes option is
required. Without --yes, the p4 extension command merely reports
what it would do without actually performing the install or delete.
-y is equivalent to --yes.
Sourcepub fn set_yes(&mut self, v: bool) -> &mut Self
pub fn set_yes(&mut self, v: bool) -> &mut Self
§Description
–yes
To actually perform the install or delete, the --yes option is
required. Without --yes, the p4 extension command merely reports
what it would do without actually performing the install or delete.
-y is equivalent to --yes.
Sourcepub fn yes(self, v: bool) -> Self
pub fn yes(self, v: bool) -> Self
§Description
–yes
To actually perform the install or delete, the --yes option is
required. Without --yes, the p4 extension command merely reports
what it would do without actually performing the install or delete.
-y is equivalent to --yes.
Sourcepub fn get_revision(&self) -> Option<&String>
pub fn get_revision(&self) -> Option<&String>
§Description
–revision=n
To remove one specific revision and its instances, include the
--revision option.
Sourcepub fn set_revision(&mut self, v: impl Into<String>) -> &mut Self
pub fn set_revision(&mut self, v: impl Into<String>) -> &mut Self
§Description
–revision=n
To remove one specific revision and its instances, include the
--revision option.
Sourcepub fn revision(self, v: impl Into<String>) -> Self
pub fn revision(self, v: impl Into<String>) -> Self
§Description
–revision=n
To remove one specific revision and its instances, include the
--revision option.
Sourcepub fn get_path(&self) -> Option<&String>
pub fn get_path(&self) -> Option<&String>
§Description
–path FileSpec
To delete file-based instances registered under the specified path,
use the --path option.
Sourcepub fn set_path(&mut self, v: impl Into<String>) -> &mut Self
pub fn set_path(&mut self, v: impl Into<String>) -> &mut Self
§Description
–path FileSpec
To delete file-based instances registered under the specified path,
use the --path option.
Sourcepub fn path(self, v: impl Into<String>) -> Self
pub fn path(self, v: impl Into<String>) -> Self
§Description
–path FileSpec
To delete file-based instances registered under the specified path,
use the --path option.
Sourcepub fn get_allow_unsigned(&self) -> bool
pub fn get_allow_unsigned(&self) -> bool
§Description
–allow-unsigned
(Optional) If included in the commands to install (or delete) an extension, it is the same as if the server.extensions.allow.unsigned configurable were set to 1 so that the extension does not need to be signed.
Sourcepub fn set_allow_unsigned(&mut self, v: bool) -> &mut Self
pub fn set_allow_unsigned(&mut self, v: bool) -> &mut Self
§Description
–allow-unsigned
(Optional) If included in the commands to install (or delete) an extension, it is the same as if the server.extensions.allow.unsigned configurable were set to 1 so that the extension does not need to be signed.
Sourcepub fn allow_unsigned(self, v: bool) -> Self
pub fn allow_unsigned(self, v: bool) -> Self
§Description
–allow-unsigned
(Optional) If included in the commands to install (or delete) an extension, it is the same as if the server.extensions.allow.unsigned configurable were set to 1 so that the extension does not need to be signed.
Source§impl Extension<Configure<Unselected>>
impl Extension<Configure<Unselected>>
Source§impl<M: ExclusiveOption> Extension<Configure<M>>
impl<M: ExclusiveOption> Extension<Configure<M>>
Sourcepub fn set_fqn(&mut self, v: impl Into<String>) -> &mut Self
pub fn set_fqn(&mut self, v: impl Into<String>) -> &mut Self
Sets the fully-qualified name of the extension to configure.
Sourcepub fn fqn(self, v: impl Into<String>) -> Self
pub fn fqn(self, v: impl Into<String>) -> Self
Sets the fully-qualified name of the extension to configure.
Sourcepub fn get_revision(&self) -> Option<&String>
pub fn get_revision(&self) -> Option<&String>
§Description
–revision=n
Which depot version of the Extension to configure. The default is the head revision. This option applies to the --configure option. This flag applies to the --configure option when used with or without the --name option.
Sourcepub fn set_revision(&mut self, v: impl Into<String>) -> &mut Self
pub fn set_revision(&mut self, v: impl Into<String>) -> &mut Self
§Description
–revision=n
Which depot version of the Extension to configure. The default is the head revision. This option applies to the --configure option. This flag applies to the --configure option when used with or without the --name option.
Sourcepub fn revision(self, v: impl Into<String>) -> Self
pub fn revision(self, v: impl Into<String>) -> Self
§Description
–revision=n
Which depot version of the Extension to configure. The default is the head revision. This option applies to the --configure option. This flag applies to the --configure option when used with or without the --name option.
Source§impl Extension<Run>
impl Extension<Run>
Source§impl Extension<List>
impl Extension<List>
Sourcepub fn get_ty(&self) -> Option<Type>
pub fn get_ty(&self) -> Option<Type>
§Description
–type type
Must be supplied with --list. Possible type values: extensions, global, instance, certs, configs (both global and instance). For example, p4 extension --list --type certs.
Sourcepub fn set_ty(&mut self, v: Type) -> &mut Self
pub fn set_ty(&mut self, v: Type) -> &mut Self
§Description
–type type
Must be supplied with --list. Possible type values: extensions, global, instance, certs, configs (both global and instance). For example, p4 extension --list --type certs.
Sourcepub fn ty(self, v: Type) -> Self
pub fn ty(self, v: Type) -> Self
§Description
–type type
Must be supplied with --list. Possible type values: extensions, global, instance, certs, configs (both global and instance). For example, p4 extension --list --type certs.
Sourcepub fn get_path(&self) -> Option<&String>
pub fn get_path(&self) -> Option<&String>
§Description
–path FileSpec
Filters output to instance configurations that are path-based and whose path argument matches the given filespec.
Trait Implementations§
Source§impl<T: ExclusiveOption> ParameterizedSpawn<()> for Extension<T>
impl<T: ExclusiveOption> ParameterizedSpawn<()> for Extension<T>
Source§fn spawn_with(&mut self, (): ()) -> Result<Self::Output, Self::Error>
fn spawn_with(&mut self, (): ()) -> Result<Self::Output, Self::Error>
Spawns the selected p4 extension operation 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 Output = Child
type Error = Error
Source§impl<S, I> ParameterizedSpawn<(S,)> for Extension<Run>
Available on non-crate feature lt2020_1 only.
impl<S, I> ParameterizedSpawn<(S,)> for Extension<Run>
lt2020_1 only.Source§fn spawn_with(&mut self, (arguments): (S,)) -> Result<Self::Output, Self::Error>
fn spawn_with(&mut self, (arguments): (S,)) -> Result<Self::Output, Self::Error>
Spawns p4 extension --run instName with the given extra arguments
passed through to the extension, with piped standard output and error
streams; use the returned Child handle to wait for it or interact
with it.