pub struct Projects {
pub client: Client,
}requests only.Fields§
§client: ClientImplementations§
Source§impl Projects
impl Projects
Sourcepub async fn list_categories<'a>(
&'a self,
) -> Result<Vec<ProjectCategoryResponse>, Error>
pub async fn list_categories<'a>( &'a self, ) -> Result<Vec<ProjectCategoryResponse>, Error>
List the active categories available for project submissions.
async fn example_projects_list_categories() -> anyhow::Result<()> {
let client = kittycad::Client::new_from_env();
let result: Vec<kittycad::types::ProjectCategoryResponse> =
client.projects().list_categories().await?;
println!("{:?}", result);
Ok(())
}Sourcepub async fn list_public<'a>(
&'a self,
limit: Option<u32>,
page_token: Option<String>,
) -> Result<PublicProjectResponseResultsPage, Error>
pub async fn list_public<'a>( &'a self, limit: Option<u32>, page_token: Option<String>, ) -> Result<PublicProjectResponseResultsPage, Error>
List publicly visible community projects for the website/gallery.
Parameters:
limit: Option<u32>: Maximum number of items returned by a single callpage_token: Option<String>: Token returned by previous call to retrieve the subsequent page
use futures_util::TryStreamExt;
async fn example_projects_list_public_stream() -> anyhow::Result<()> {
let client = kittycad::Client::new_from_env();
let mut projects = client.projects();
let mut stream = projects.list_public_stream(Some(4 as u32));
loop {
match stream.try_next().await {
Ok(Some(item)) => {
println!("{:?}", item);
}
Ok(None) => {
break;
}
Err(err) => {
return Err(err.into());
}
}
}
Ok(())
}Sourcepub async fn get_public<'a>(
&'a self,
id: Uuid,
) -> Result<PublicProjectResponse, Error>
pub async fn get_public<'a>( &'a self, id: Uuid, ) -> Result<PublicProjectResponse, Error>
Get one publicly visible community project.
Parameters:
id: uuid::Uuid: The identifier. (required)
use std::str::FromStr;
async fn example_projects_get_public() -> anyhow::Result<()> {
let client = kittycad::Client::new_from_env();
let result: kittycad::types::PublicProjectResponse = client
.projects()
.get_public(uuid::Uuid::from_str(
"d9797f8d-9ad6-4e08-90d7-2ec17e13471c",
)?)
.await?;
println!("{:?}", result);
Ok(())
}Sourcepub async fn download_public<'a>(
&'a self,
format: Option<ProjectArchiveFormat>,
id: Uuid,
) -> Result<(), Error>
pub async fn download_public<'a>( &'a self, format: Option<ProjectArchiveFormat>, id: Uuid, ) -> Result<(), Error>
Download a published public project as a tar archive.
Parameters:
format: Option<crate::types::ProjectArchiveFormat>: Archive format to return. Defaults totar.id: uuid::Uuid: The identifier. (required)
use std::str::FromStr;
async fn example_projects_download_public() -> anyhow::Result<()> {
let client = kittycad::Client::new_from_env();
client
.projects()
.download_public(
Some(kittycad::types::ProjectArchiveFormat::Zip),
uuid::Uuid::from_str("d9797f8d-9ad6-4e08-90d7-2ec17e13471c")?,
)
.await?;
Ok(())
}Sourcepub async fn get_public_thumbnail<'a>(&'a self, id: Uuid) -> Result<(), Error>
pub async fn get_public_thumbnail<'a>(&'a self, id: Uuid) -> Result<(), Error>
Fetch the public thumbnail for a published project.
Parameters:
id: uuid::Uuid: The identifier. (required)
use std::str::FromStr;
async fn example_projects_get_public_thumbnail() -> anyhow::Result<()> {
let client = kittycad::Client::new_from_env();
client
.projects()
.get_public_thumbnail(uuid::Uuid::from_str(
"d9797f8d-9ad6-4e08-90d7-2ec17e13471c",
)?)
.await?;
Ok(())
}Sourcepub async fn create_public_vote<'a>(
&'a self,
id: Uuid,
) -> Result<PublicProjectVoteResponse, Error>
pub async fn create_public_vote<'a>( &'a self, id: Uuid, ) -> Result<PublicProjectVoteResponse, Error>
Add the authenticated user’s upvote to a published community project.
Parameters:
id: uuid::Uuid: The identifier. (required)
use std::str::FromStr;
async fn example_projects_create_public_vote() -> anyhow::Result<()> {
let client = kittycad::Client::new_from_env();
let result: kittycad::types::PublicProjectVoteResponse = client
.projects()
.create_public_vote(uuid::Uuid::from_str(
"d9797f8d-9ad6-4e08-90d7-2ec17e13471c",
)?)
.await?;
println!("{:?}", result);
Ok(())
}Sourcepub async fn delete_public_vote<'a>(
&'a self,
id: Uuid,
) -> Result<PublicProjectVoteResponse, Error>
pub async fn delete_public_vote<'a>( &'a self, id: Uuid, ) -> Result<PublicProjectVoteResponse, Error>
Remove the authenticated user’s upvote from a published community project.
Parameters:
id: uuid::Uuid: The identifier. (required)
use std::str::FromStr;
async fn example_projects_delete_public_vote() -> anyhow::Result<()> {
let client = kittycad::Client::new_from_env();
let result: kittycad::types::PublicProjectVoteResponse = client
.projects()
.delete_public_vote(uuid::Uuid::from_str(
"d9797f8d-9ad6-4e08-90d7-2ec17e13471c",
)?)
.await?;
println!("{:?}", result);
Ok(())
}Sourcepub async fn list<'a>(&'a self) -> Result<Vec<ProjectSummaryResponse>, Error>
pub async fn list<'a>(&'a self) -> Result<Vec<ProjectSummaryResponse>, Error>
List the authenticated user’s projects.
async fn example_projects_list() -> anyhow::Result<()> {
let client = kittycad::Client::new_from_env();
let result: Vec<kittycad::types::ProjectSummaryResponse> = client.projects().list().await?;
println!("{:?}", result);
Ok(())
}Sourcepub async fn create<'a>(
&'a self,
attachments: Vec<Attachment>,
) -> Result<ProjectResponse, Error>
pub async fn create<'a>( &'a self, attachments: Vec<Attachment>, ) -> Result<ProjectResponse, Error>
Create a draft project for the authenticated user.
async fn example_projects_create() -> anyhow::Result<()> {
let client = kittycad::Client::new_from_env();
let result: kittycad::types::ProjectResponse = client
.projects()
.create(vec![kittycad::types::multipart::Attachment {
name: "thing".to_string(),
filepath: Some("myfile.json".into()),
content_type: Some("application/json".to_string()),
data: std::fs::read("myfile.json").unwrap(),
}])
.await?;
println!("{:?}", result);
Ok(())
}Sourcepub async fn get<'a>(&'a self, id: Uuid) -> Result<ProjectResponse, Error>
pub async fn get<'a>(&'a self, id: Uuid) -> Result<ProjectResponse, Error>
Get one of the authenticated user’s projects.
Parameters:
id: uuid::Uuid: The identifier. (required)
use std::str::FromStr;
async fn example_projects_get() -> anyhow::Result<()> {
let client = kittycad::Client::new_from_env();
let result: kittycad::types::ProjectResponse = client
.projects()
.get(uuid::Uuid::from_str(
"d9797f8d-9ad6-4e08-90d7-2ec17e13471c",
)?)
.await?;
println!("{:?}", result);
Ok(())
}Sourcepub async fn update<'a>(
&'a self,
attachments: Vec<Attachment>,
id: Uuid,
) -> Result<ProjectResponse, Error>
pub async fn update<'a>( &'a self, attachments: Vec<Attachment>, id: Uuid, ) -> Result<ProjectResponse, Error>
Replace one of the authenticated user’s projects.
Parameters:
id: uuid::Uuid: The identifier. (required)
use std::str::FromStr;
async fn example_projects_update() -> anyhow::Result<()> {
let client = kittycad::Client::new_from_env();
let result: kittycad::types::ProjectResponse = client
.projects()
.update(
vec![kittycad::types::multipart::Attachment {
name: "thing".to_string(),
filepath: Some("myfile.json".into()),
content_type: Some("application/json".to_string()),
data: std::fs::read("myfile.json").unwrap(),
}],
uuid::Uuid::from_str("d9797f8d-9ad6-4e08-90d7-2ec17e13471c")?,
)
.await?;
println!("{:?}", result);
Ok(())
}Sourcepub async fn delete<'a>(&'a self, id: Uuid) -> Result<(), Error>
pub async fn delete<'a>(&'a self, id: Uuid) -> Result<(), Error>
Delete one of the authenticated user’s projects.
Parameters:
id: uuid::Uuid: The identifier. (required)
use std::str::FromStr;
async fn example_projects_delete() -> anyhow::Result<()> {
let client = kittycad::Client::new_from_env();
client
.projects()
.delete(uuid::Uuid::from_str(
"d9797f8d-9ad6-4e08-90d7-2ec17e13471c",
)?)
.await?;
Ok(())
}Sourcepub async fn download<'a>(
&'a self,
format: Option<ProjectArchiveFormat>,
id: Uuid,
) -> Result<(), Error>
pub async fn download<'a>( &'a self, format: Option<ProjectArchiveFormat>, id: Uuid, ) -> Result<(), Error>
Download one of the authenticated user’s projects as a tar archive.
Parameters:
format: Option<crate::types::ProjectArchiveFormat>: Archive format to return. Defaults totar.id: uuid::Uuid: The identifier. (required)
use std::str::FromStr;
async fn example_projects_download() -> anyhow::Result<()> {
let client = kittycad::Client::new_from_env();
client
.projects()
.download(
Some(kittycad::types::ProjectArchiveFormat::Zip),
uuid::Uuid::from_str("d9797f8d-9ad6-4e08-90d7-2ec17e13471c")?,
)
.await?;
Ok(())
}Sourcepub async fn update_organization<'a>(
&'a self,
id: Uuid,
) -> Result<ProjectResponse, Error>
pub async fn update_organization<'a>( &'a self, id: Uuid, ) -> Result<ProjectResponse, Error>
Move one of the authenticated user’s projects into their active organization library.
This changes only the project’s ownership scope. The project ID, current revision, files, and version history remain unchanged so cloud bindings stay valid across the move.
Parameters:
id: uuid::Uuid: The identifier. (required)
use std::str::FromStr;
async fn example_projects_update_organization() -> anyhow::Result<()> {
let client = kittycad::Client::new_from_env();
let result: kittycad::types::ProjectResponse = client
.projects()
.update_organization(uuid::Uuid::from_str(
"d9797f8d-9ad6-4e08-90d7-2ec17e13471c",
)?)
.await?;
println!("{:?}", result);
Ok(())
}Sourcepub async fn delete_organization<'a>(&'a self, id: Uuid) -> Result<(), Error>
pub async fn delete_organization<'a>(&'a self, id: Uuid) -> Result<(), Error>
Move an organization project back to its creator’s personal library.
Organization administrators may perform this move to revoke organization access. The project ID, current revision, files, and version history remain unchanged.
Parameters:
id: uuid::Uuid: The identifier. (required)
use std::str::FromStr;
async fn example_projects_delete_organization() -> anyhow::Result<()> {
let client = kittycad::Client::new_from_env();
client
.projects()
.delete_organization(uuid::Uuid::from_str(
"d9797f8d-9ad6-4e08-90d7-2ec17e13471c",
)?)
.await?;
Ok(())
}Sourcepub async fn publish<'a>(&'a self, id: Uuid) -> Result<ProjectResponse, Error>
pub async fn publish<'a>(&'a self, id: Uuid) -> Result<ProjectResponse, Error>
Submit one of the authenticated user’s projects for public review.
Parameters:
id: uuid::Uuid: The identifier. (required)
use std::str::FromStr;
async fn example_projects_publish() -> anyhow::Result<()> {
let client = kittycad::Client::new_from_env();
let result: kittycad::types::ProjectResponse = client
.projects()
.publish(uuid::Uuid::from_str(
"d9797f8d-9ad6-4e08-90d7-2ec17e13471c",
)?)
.await?;
println!("{:?}", result);
Ok(())
}List share links for one of the authenticated user’s projects.
Parameters:
id: uuid::Uuid: The identifier. (required)limit: Option<u32>: Maximum number of items returned by a single callpage_token: Option<String>: Token returned by previous call to retrieve the subsequent page
use std::str::FromStr;
async fn example_projects_list_share_links() -> anyhow::Result<()> {
let client = kittycad::Client::new_from_env();
let result: kittycad::types::ProjectShareLinkResponseResultsPage = client
.projects()
.list_share_links(
uuid::Uuid::from_str("d9797f8d-9ad6-4e08-90d7-2ec17e13471c")?,
Some(4 as u32),
Some("some-string".to_string()),
)
.await?;
println!("{:?}", result);
Ok(())
}
/// - OR -
/// Get a stream of results.
///
/// This allows you to paginate through all the items.
use futures_util::TryStreamExt;
async fn example_projects_list_share_links_stream() -> anyhow::Result<()> {
let client = kittycad::Client::new_from_env();
let mut projects = client.projects();
let mut stream = projects.list_share_links_stream(
uuid::Uuid::from_str("d9797f8d-9ad6-4e08-90d7-2ec17e13471c")?,
Some(4 as u32),
);
loop {
match stream.try_next().await {
Ok(Some(item)) => {
println!("{:?}", item);
}
Ok(None) => {
break;
}
Err(err) => {
return Err(err.into());
}
}
}
Ok(())
}Create a share link for one of the authenticated user’s projects.
Parameters:
id: uuid::Uuid: The identifier. (required)
use std::str::FromStr;
async fn example_projects_create_share_link() -> anyhow::Result<()> {
let client = kittycad::Client::new_from_env();
let result: kittycad::types::ProjectShareLinkResponse = client
.projects()
.create_share_link(
uuid::Uuid::from_str("d9797f8d-9ad6-4e08-90d7-2ec17e13471c")?,
&kittycad::types::CreateProjectShareLinkRequest {
access_mode: Some(kittycad::types::KclProjectShareLinkAccessMode::OrganizationOnly),
},
)
.await?;
println!("{:?}", result);
Ok(())
}Delete one share link for one of the authenticated user’s projects.
Parameters:
id: uuid::Uuid: Project identifier. (required)key: &'astr: Share-link key. (required)
use std::str::FromStr;
async fn example_projects_delete_share_link() -> anyhow::Result<()> {
let client = kittycad::Client::new_from_env();
client
.projects()
.delete_share_link(
uuid::Uuid::from_str("d9797f8d-9ad6-4e08-90d7-2ec17e13471c")?,
"some-string",
)
.await?;
Ok(())
}Sourcepub async fn get_thumbnail<'a>(&'a self, id: Uuid) -> Result<(), Error>
pub async fn get_thumbnail<'a>(&'a self, id: Uuid) -> Result<(), Error>
Fetch the authenticated owner’s current project thumbnail.
Parameters:
id: uuid::Uuid: The identifier. (required)
use std::str::FromStr;
async fn example_projects_get_thumbnail() -> anyhow::Result<()> {
let client = kittycad::Client::new_from_env();
client
.projects()
.get_thumbnail(uuid::Uuid::from_str(
"d9797f8d-9ad6-4e08-90d7-2ec17e13471c",
)?)
.await?;
Ok(())
}Sourcepub async fn list_versions<'a>(
&'a self,
id: Uuid,
limit: Option<u32>,
page_token: Option<String>,
) -> Result<ProjectVersionSummaryResponseResultsPage, Error>
pub async fn list_versions<'a>( &'a self, id: Uuid, limit: Option<u32>, page_token: Option<String>, ) -> Result<ProjectVersionSummaryResponseResultsPage, Error>
List a project’s saved versions, newest first.
Requires access to the project. Public visibility or link sharing will not grant access to history.
Parameters:
id: uuid::Uuid: The identifier. (required)limit: Option<u32>: Maximum number of items returned by a single callpage_token: Option<String>: Token returned by previous call to retrieve the subsequent page
use std::str::FromStr;
async fn example_projects_list_versions() -> anyhow::Result<()> {
let client = kittycad::Client::new_from_env();
let result: kittycad::types::ProjectVersionSummaryResponseResultsPage = client
.projects()
.list_versions(
uuid::Uuid::from_str("d9797f8d-9ad6-4e08-90d7-2ec17e13471c")?,
Some(4 as u32),
Some("some-string".to_string()),
)
.await?;
println!("{:?}", result);
Ok(())
}
/// - OR -
/// Get a stream of results.
///
/// This allows you to paginate through all the items.
use futures_util::TryStreamExt;
async fn example_projects_list_versions_stream() -> anyhow::Result<()> {
let client = kittycad::Client::new_from_env();
let mut projects = client.projects();
let mut stream = projects.list_versions_stream(
uuid::Uuid::from_str("d9797f8d-9ad6-4e08-90d7-2ec17e13471c")?,
Some(4 as u32),
);
loop {
match stream.try_next().await {
Ok(Some(item)) => {
println!("{:?}", item);
}
Ok(None) => {
break;
}
Err(err) => {
return Err(err.into());
}
}
}
Ok(())
}Sourcepub async fn create_version<'a>(
&'a self,
attachments: Vec<Attachment>,
id: Uuid,
) -> Result<CreateProjectVersionResponse, Error>
pub async fn create_version<'a>( &'a self, attachments: Vec<Attachment>, id: Uuid, ) -> Result<CreateProjectVersionResponse, Error>
Save an alternate project version without changing the current version.
For a history A -> B -> C with C current, saving D with B as its parent creates a second child of B. C stays current. Publications and share links keep pointing to their existing versions.
Send a multipart request with a JSON body part and file parts. Upload the complete replacement snapshot, including unchanged files. Each uploaded filename must be its relative project path.
Example JSON for the body part (replace the parent placeholder with B’s UUID):
ignorejson { "parent_version_id": "<B_VERSION_ID>", "title": "Alternative design", "description": "Trying another shape", "entrypoint_path": "main.kcl", "deleted_paths": ["obsolete.kcl"] } ignore
parent_version_id and title are required. Description defaults to an empty string, and the entrypoint defaults to main.kcl. When supplying deleted_paths, list all files removed from the chosen parent B, regardless of the files in current C. An empty list declares that no files were removed; omitting the field skips this deletion-intent check.
Save the JSON as save-metadata.json. With D’s files in the working directory, set API_BASE_URL, API_TOKEN, and PROJECT_ID, then generate SAVE_KEY once for this save (for example, using uuidgen):
ignoresh curl --fail-with-body \ --request POST "${API_BASE_URL}/user/projects/${PROJECT_ID}/versions" \ --header "Authorization: Bearer ${API_TOKEN}" \ --header "Idempotency-Key: ${SAVE_KEY}" \ --form 'body=<save-metadata.json;type=application/json' \ --form 'file-0=@project.toml;filename=project.toml' \ --form 'file-1=@main.kcl;filename=main.kcl' \ --form 'file-2=@part.kcl;filename=part.kcl' ignore
The HTTP 200 response contains version_id (D) and current_version_id (C, or the current version when the response is prepared). Read D through GET /user/projects/{id}/versions/{version_id} and download it through GET /user/projects/{id}/versions/{version_id}/download. Downloads default to TAR; use ?format=zip for ZIP.
Idempotency-Key is optional for all clients. Use a unique key for each save to avoid duplicate versions when retrying. Retain the key, metadata, and submitted file contents across app restarts until the save’s outcome is known. Within 24 hours of a successful save, retrying with the same key and contents returns the same version. Changed contents require a new key; reusing an unexpired key with different contents returns HTTP 409 with IdempotencyConflict. Without a key, or after its window expires, resending the request can create another version.
Write access to the project is required, including for retries. A public listing or share link does not grant access to private version history. There is no endpoint to promote an existing alternate version directly to current.
Parameters:
id: uuid::Uuid: The identifier. (required)
use std::str::FromStr;
async fn example_projects_create_version() -> anyhow::Result<()> {
let client = kittycad::Client::new_from_env();
let result: kittycad::types::CreateProjectVersionResponse = client
.projects()
.create_version(
vec![kittycad::types::multipart::Attachment {
name: "thing".to_string(),
filepath: Some("myfile.json".into()),
content_type: Some("application/json".to_string()),
data: std::fs::read("myfile.json").unwrap(),
}],
uuid::Uuid::from_str("d9797f8d-9ad6-4e08-90d7-2ec17e13471c")?,
)
.await?;
println!("{:?}", result);
Ok(())
}Sourcepub async fn get_version<'a>(
&'a self,
id: Uuid,
version_id: Uuid,
) -> Result<ProjectVersionDetailResponse, Error>
pub async fn get_version<'a>( &'a self, id: Uuid, version_id: Uuid, ) -> Result<ProjectVersionDetailResponse, Error>
Get metadata and files for a single saved project version.
Parameters:
id: uuid::Uuid: Project identifier. (required)version_id: uuid::Uuid: Requested version identifier. (required)
use std::str::FromStr;
async fn example_projects_get_version() -> anyhow::Result<()> {
let client = kittycad::Client::new_from_env();
let result: kittycad::types::ProjectVersionDetailResponse = client
.projects()
.get_version(
uuid::Uuid::from_str("d9797f8d-9ad6-4e08-90d7-2ec17e13471c")?,
uuid::Uuid::from_str("d9797f8d-9ad6-4e08-90d7-2ec17e13471c")?,
)
.await?;
println!("{:?}", result);
Ok(())
}Sourcepub async fn download_version<'a>(
&'a self,
format: Option<ProjectArchiveFormat>,
id: Uuid,
version_id: Uuid,
) -> Result<(), Error>
pub async fn download_version<'a>( &'a self, format: Option<ProjectArchiveFormat>, id: Uuid, version_id: Uuid, ) -> Result<(), Error>
Download the files saved in one project version.
Parameters:
format: Option<crate::types::ProjectArchiveFormat>: Archive format to return. Defaults totar.id: uuid::Uuid: Project identifier. (required)version_id: uuid::Uuid: Requested version identifier. (required)
use std::str::FromStr;
async fn example_projects_download_version() -> anyhow::Result<()> {
let client = kittycad::Client::new_from_env();
client
.projects()
.download_version(
Some(kittycad::types::ProjectArchiveFormat::Zip),
uuid::Uuid::from_str("d9797f8d-9ad6-4e08-90d7-2ec17e13471c")?,
uuid::Uuid::from_str("d9797f8d-9ad6-4e08-90d7-2ec17e13471c")?,
)
.await?;
Ok(())
}Sourcepub async fn get_version_thumbnail<'a>(
&'a self,
id: Uuid,
version_id: Uuid,
) -> Result<(), Error>
pub async fn get_version_thumbnail<'a>( &'a self, id: Uuid, version_id: Uuid, ) -> Result<(), Error>
Fetch the thumbnail for a single saved project version.
Parameters:
id: uuid::Uuid: Project identifier. (required)version_id: uuid::Uuid: Requested version identifier. (required)
use std::str::FromStr;
async fn example_projects_get_version_thumbnail() -> anyhow::Result<()> {
let client = kittycad::Client::new_from_env();
client
.projects()
.get_version_thumbnail(
uuid::Uuid::from_str("d9797f8d-9ad6-4e08-90d7-2ec17e13471c")?,
uuid::Uuid::from_str("d9797f8d-9ad6-4e08-90d7-2ec17e13471c")?,
)
.await?;
Ok(())
}Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Projects
impl !UnwindSafe for Projects
impl Freeze for Projects
impl Send for Projects
impl Sync for Projects
impl Unpin for Projects
impl UnsafeUnpin for Projects
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more