pub struct Orgs {
pub name: String,
}
Fields§
§name: String
Implementations§
source§impl Orgs
impl Orgs
sourcepub fn create(&self) -> CreateOrgBuilder
pub fn create(&self) -> CreateOrgBuilder
Create a new Organization.
§Example
let client = Client::new(
"https://gitea.example.com",
Auth::Token("your-token")
);
client
.orgs("org-name")
.create()
.full_name("Organization")
.send(&client)
.await
.unwrap();
This will create a new organization with the name “org-name” and the full name “Organization
sourcepub fn get(&self) -> GetOrgBuilder
pub fn get(&self) -> GetOrgBuilder
Get an Organization.
§Example
let client = Client::new(
"https://gitea.example.com",
Auth::Token("your-token")
);
let org = client
.orgs("org-name")
.get()
.send(&client)
.await
.unwrap();
This will get the organization with the name “org-name”.
sourcepub fn delete(&self) -> DeleteOrgBuilder
pub fn delete(&self) -> DeleteOrgBuilder
Delete an Organization. This will delete the organization with the name “org-name”. This action is irreversible.
§Example
let client = Client::new(
"https://gitea.example.com",
Auth::Token("your-token")
);
client
.orgs("org-name")
.delete()
.send(&client)
.await
.unwrap();
This will delete the organization with the name “org-name”.
sourcepub fn edit(&self) -> EditOrgBuilder
pub fn edit(&self) -> EditOrgBuilder
Edit an Organization.
§Example
let client = Client::new(
"https://gitea.example.com",
Auth::Token("your-token")
);
client
.orgs("org-name")
.edit()
.description("New description")
.send(&client)
.await
.unwrap();
This will edit the organization with the name “org-name” to have the description “New description”.
Auto Trait Implementations§
impl Freeze for Orgs
impl RefUnwindSafe for Orgs
impl Send for Orgs
impl Sync for Orgs
impl Unpin for Orgs
impl UnwindSafe for Orgs
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