pub struct TreeBuilder { /* private fields */ }Expand description
Builder for creating a new Tree
Implementations§
Source§impl Builder
impl Builder
Sourcepub fn api(self, api: Url) -> Self
pub fn api(self, api: Url) -> Self
Set the Url for the registry API.
The API should implement the REST interface as defined in the Cargo book
Sourcepub fn allowed_registry(self, registry: Url) -> Self
pub fn allowed_registry(self, registry: Url) -> Self
Add an allowed registry.
Crates in this registry are only allowed to have dependencies which are also in this registry, or in one of the allowed registries.
Add multiple registries my calling this method multiple times.
Sourcepub fn allow_crates_io(self) -> Self
pub fn allow_crates_io(self) -> Self
Add crates.io as an allowed registry.
You will almost always want this, so this exists as a handy shortcut.
Auto Trait Implementations§
impl Freeze for Builder
impl RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl UnwindSafe for Builder
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
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>
Converts
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>
Converts
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