pub struct Source {
    pub adapter_data: Option<Value>,
    pub checksums: Option<Vec<Checksum>>,
    pub name: Option<String>,
    pub origin: Option<String>,
    pub path: Option<String>,
    pub presentation_hint: Option<String>,
    pub source_reference: Option<i64>,
    pub sources: Option<Vec<Source>>,
}
Expand description

A Source is a descriptor for source code. It is returned from the debug adapter as part of a StackFrame and it is used by clients when specifying breakpoints.

Fields

adapter_data: Option<Value>

Optional data that a debug adapter might want to loop through the client. The client should leave the data intact and persist it across sessions. The client should not interpret the data.

checksums: Option<Vec<Checksum>>

The checksums associated with this file.

name: Option<String>

The short name of the source. Every source returned from the debug adapter has a name. When sending a source to the debug adapter this name is optional.

origin: Option<String>

The (optional) origin of this source: possible values ‘internal module’, ‘inlined content from source map’, etc.

path: Option<String>

The path of the source to be shown in the UI. It is only used to locate and load the content of the source if no sourceReference is specified (or its value is 0).

presentation_hint: Option<String>

An optional hint for how to present the source in the UI. A value of ‘deemphasize’ can be used to indicate that the source is not available or that it is skipped on stepping.

source_reference: Option<i64>

If sourceReference > 0 the contents of the source must be retrieved through the SourceRequest (even if a path is specified). A sourceReference is only valid for a session, so it must not be used to persist a source. The value should be less than or equal to 2147483647 (2^31-1).

sources: Option<Vec<Source>>

An optional list of sources that are related to this source. These may be the source that generated this source.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

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

Deserialize this value from the given Serde deserializer. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more