BronziteClient

Struct BronziteClient 

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

A client for communicating with the Bronzite daemon.

Implementations§

Source§

impl BronziteClient

Source

pub fn connect() -> Result<BronziteClient, Error>

Connect to the Bronzite daemon using the default socket path.

Source

pub fn connect_for_workspace( workspace_root: &Path, ) -> Result<BronziteClient, Error>

Connect to the Bronzite daemon for a specific workspace.

Source

pub fn connect_to(socket_path: PathBuf) -> Result<BronziteClient, Error>

Connect to the Bronzite daemon at a specific socket path.

Source

pub fn query( &mut self, crate_name: &str, query: Query, ) -> Result<QueryData, Error>

Send a query to the daemon and wait for a response.

Source

pub fn ping(&mut self) -> Result<bool, Error>

Check if the daemon is alive.

Source

pub fn shutdown(&mut self) -> Result<(), Error>

Request the daemon to shut down.

Source

pub fn list_items(&mut self, crate_name: &str) -> Result<Vec<ItemInfo>, Error>

List all items in a crate.

Source

pub fn get_trait_impls( &mut self, crate_name: &str, type_path: &str, ) -> Result<Vec<TraitImplDetails>, Error>

Get all trait implementations for a type.

Source

pub fn get_inherent_impls( &mut self, crate_name: &str, type_path: &str, ) -> Result<Vec<InherentImplDetails>, Error>

Get inherent impls for a type (impl Foo { … }).

Source

pub fn check_impl( &mut self, crate_name: &str, type_path: &str, trait_path: &str, ) -> Result<(bool, Option<TraitImplDetails>), Error>

Check if a type implements a trait.

Source

pub fn get_fields( &mut self, crate_name: &str, type_path: &str, ) -> Result<Vec<FieldInfo>, Error>

Get all fields of a struct.

Source

pub fn get_type( &mut self, crate_name: &str, type_path: &str, ) -> Result<TypeDetails, Error>

Get detailed information about a type.

Source

pub fn get_traits(&mut self, crate_name: &str) -> Result<Vec<TraitInfo>, Error>

Get all traits defined in a crate.

Source

pub fn get_trait( &mut self, crate_name: &str, trait_path: &str, ) -> Result<TraitDetails, Error>

Get detailed information about a trait.

Source

pub fn find_types( &mut self, crate_name: &str, pattern: &str, ) -> Result<Vec<TypeSummary>, Error>

Find types matching a pattern.

Source

pub fn resolve_alias( &mut self, crate_name: &str, path: &str, ) -> Result<(String, String, Vec<String>), Error>

Resolve a type alias to its underlying type.

Source

pub fn get_implementors( &mut self, crate_name: &str, trait_path: &str, ) -> Result<Vec<TypeSummary>, Error>

Get all types that implement a specific trait.

Source

pub fn get_layout( &mut self, crate_name: &str, type_path: &str, ) -> Result<LayoutInfo, Error>

Get memory layout information for a type.

Trait Implementations§

Source§

impl Debug for BronziteClient

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

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, 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.