pub struct TagsApi<'a> { /* private fields */ }Expand description
Tags API operations.
Implementations§
Source§impl<'a> TagsApi<'a>
impl<'a> TagsApi<'a>
Sourcepub fn new(client: &'a LettaClient) -> Self
pub fn new(client: &'a LettaClient) -> Self
Create a new tags API instance.
Sourcepub async fn list(
&self,
params: Option<ListTagsParams>,
) -> LettaResult<Vec<String>>
pub async fn list( &self, params: Option<ListTagsParams>, ) -> LettaResult<Vec<String>>
List all tags in the database.
§Arguments
params- Optional parameters for filtering and pagination
§Errors
Returns a crate::error::LettaError if the request fails or if the response cannot be parsed.
Sourcepub fn paginated(
&self,
params: Option<PaginationParams>,
) -> PaginatedStream<String>
pub fn paginated( &self, params: Option<PaginationParams>, ) -> PaginatedStream<String>
Get a paginated stream of tags.
This method returns a PaginatedStream that automatically handles pagination
and allows streaming through all tags using async iteration.
§Arguments
params- Optional pagination parameters
§Example
let client = LettaClient::new(ClientConfig::new("http://localhost:8283")?)?;
let mut stream = client.tags().paginated(None);
while let Some(tag) = stream.next().await {
println!("Tag: {}", tag?);
}Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for TagsApi<'a>
impl<'a> !UnwindSafe for TagsApi<'a>
impl<'a> Freeze for TagsApi<'a>
impl<'a> Send for TagsApi<'a>
impl<'a> Sync for TagsApi<'a>
impl<'a> Unpin for TagsApi<'a>
impl<'a> UnsafeUnpin for TagsApi<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more