Skip to main content

BufIntegration

Struct BufIntegration 

Source
pub struct BufIntegration { /* private fields */ }
Expand description

Buf.build CLI integration.

Provides optional integration with the buf CLI for enhanced proto workflows. All operations gracefully degrade if buf is not installed.

Implementations§

Source§

impl BufIntegration

Source

pub fn new() -> Self

Create a new BufIntegration with default settings.

Source

pub fn with_path(path: impl Into<PathBuf>) -> Self

Create with a specific buf binary path.

Source

pub fn is_available(&self) -> bool

Check if buf CLI is available.

Source

pub fn get_version(&self) -> BufResult<String>

Get buf CLI version.

Source

pub fn lint(&self, proto_dir: &Path) -> BufResult<BufLintResult>

Lint proto files in a directory.

Returns Ok with lint output, or gracefully degrades if buf not installed.

Source

pub fn breaking_check( &self, new_dir: &Path, old_dir: &Path, ) -> BufResult<BufBreakingResult>

Check for breaking changes between two proto directories.

Source

pub fn generate_buf_yaml() -> String

Generate a buf.yaml configuration file content.

Source

pub fn generate_buf_gen_yaml(languages: &[BufLanguage]) -> String

Generate a buf.gen.yaml for code generation.

Trait Implementations§

Source§

impl Default for BufIntegration

Source§

fn default() -> Self

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

Auto Trait Implementations§

§

impl Forget for BufIntegration

§

impl Freeze for BufIntegration
where *const u8 is !null: Freeze, PhantomData<u8>: Freeze,

§

impl Move for BufIntegration

§

impl RefUnwindSafe for BufIntegration

§

impl Send for BufIntegration
where RawVecInner: Send,

§

impl Sync for BufIntegration
where RawVecInner: Sync,

§

impl Unpin for BufIntegration
where *const u8 is !null: Unpin,

§

impl UnsafeUnpin for BufIntegration

§

impl UnwindSafe for BufIntegration
where RawVecInner: UnwindSafe,

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

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
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 = !

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

fn try_from(value: U) -> Result<T, !>

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.