Thalweg · API reference ← Main docs

Bundle

Struct Bundle 

Source
pub struct Bundle {
    pub descriptor_set: Vec<u8>,
    pub messages: MessageManifest,
    pub proto_files: Vec<RenderedProto>,
    pub single_proto: Option<String>,
    pub single_proto_compilable: bool,
    pub package_cycle: Option<Vec<String>>,
    pub file_count: usize,
    pub include_root_count: usize,
    pub dropped_duplicates: usize,
    pub divergent_first_wins: Vec<String>,
    pub name: String,
}
Expand description

The in-memory result of bundling, returned regardless of what was written.

Fields§

§descriptor_set: Vec<u8>

The combined FileDescriptorSet bytes (the authoritative .pb).

§messages: MessageManifest

Fully-qualified message types + flagged roots.

§proto_files: Vec<RenderedProto>

One rendered proto3 file per package (+ a _wkt.proto base if central).

§single_proto: Option<String>

The whole set rendered as one .proto text file, if emitted.

§single_proto_compilable: bool

Whether single_proto is a valid compilable file (true, single-package) or a combined multi-package view (false, use the .pb to compile).

§package_cycle: Option<Vec<String>>

If the packages are mutually recursive, the cycle (A -> B -> A): the per-package .proto files then cannot recompile standalone (proto forbids circular imports) — use the .pb. None ⇒ the render recompiles cleanly.

§file_count: usize

Distinct .proto files discovered (after dedup).

§include_root_count: usize

Number of include roots resolved from the source.

§dropped_duplicates: usize

Duplicate copies collapsed during reconcile.

§divergent_first_wins: Vec<String>

Import paths whose duplicate copies had divergent content but were resolved by OnConflict::FirstWins (first kept, rest dropped). Empty under the default Error. Non-empty means potential schema drift was overridden.

§name: String

Output basename used for written files.

Trait Implementations§

Source§

impl Debug for Bundle

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Bundle

§

impl RefUnwindSafe for Bundle

§

impl Send for Bundle

§

impl Sync for Bundle

§

impl Unpin for Bundle

§

impl UnwindSafe for Bundle

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> 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> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.