Struct bsp_types::BuildTarget
source · [−]pub struct BuildTarget {
pub id: BuildTargetIdentifier,
pub display_name: Option<String>,
pub base_directory: Option<String>,
pub tags: Vec<BuildTargetTag>,
pub capabilities: BuildTargetCapabilities,
pub language_ids: Vec<Language>,
pub dependencies: Vec<BuildTargetIdentifier>,
}Expand description
Build target contains metadata about an artifact (for example library, test, or binary artifact)
Fields
id: BuildTargetIdentifierThe target’s unique identifier
display_name: Option<String>A human readable name for this target. May be presented in the user interface. Should be unique if possible. The id.uri is used if None.
base_directory: Option<String>The directory where this target belongs to. Multiple build targets are allowed to map to the same base directory, and a build target is not required to have a base directory. A base directory does not determine the sources of a target, see “buildTarget/sources”.
Free-form string tags to categorize or label this build target. For example, can be used by the client to:
- customize how the target should be translated into the client’s project model.
- group together different but related targets in the user interface.
- display icons or colors in the user interface.
Pre-defined tags are listed in
BuildTargetTagbut clients and servers are free to define new tags for custom purposes.
capabilities: BuildTargetCapabilitiesThe capabilities of this build target.
language_ids: Vec<Language>The set of languages that this target contains. The ID string for each language is defined in the LSP.
dependencies: Vec<BuildTargetIdentifier>The direct upstream build target dependencies of this build target
Implementations
sourceimpl BuildTarget
impl BuildTarget
pub fn new(
id: BuildTargetIdentifier,
display_name: Option<String>,
base_directory: Option<String>,
tags: Vec<BuildTargetTag>,
capabilities: BuildTargetCapabilities,
language_ids: Vec<Language>,
dependencies: Vec<BuildTargetIdentifier>
) -> Self
pub fn new_simple(
id: BuildTargetIdentifier,
tags: Vec<BuildTargetTag>,
capabilities: BuildTargetCapabilities,
language_ids: Vec<Language>,
dependencies: Vec<BuildTargetIdentifier>
) -> Self
Trait Implementations
sourceimpl Debug for BuildTarget
impl Debug for BuildTarget
sourceimpl<'de> Deserialize<'de> for BuildTarget
impl<'de> Deserialize<'de> for BuildTarget
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl From<BuildTarget> for WorkspaceBuildTargetsResult
impl From<BuildTarget> for WorkspaceBuildTargetsResult
sourcefn from(target: BuildTarget) -> Self
fn from(target: BuildTarget) -> Self
Converts to this type from the input type.
sourceimpl Serialize for BuildTarget
impl Serialize for BuildTarget
Auto Trait Implementations
impl RefUnwindSafe for BuildTarget
impl Send for BuildTarget
impl Sync for BuildTarget
impl Unpin for BuildTarget
impl UnwindSafe for BuildTarget
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more