Enum ServiceEndpoint
pub enum ServiceEndpoint {
LiveWs,
GenerateContent,
StreamGenerateContent,
EmbedContent,
CountTokens,
ComputeTokens,
ListModels,
GetModel,
Files,
CachedContents,
TuningJobs,
BatchJobs,
}Expand description
Identifies which Gemini API service to connect to.
Used by AuthProvider::rest_url to construct the correct REST endpoint URL.
Variants§
LiveWs
WebSocket Live/Bidi streaming endpoint.
GenerateContent
POST /models/{model}:generateContent
StreamGenerateContent
POST /models/{model}:streamGenerateContent
EmbedContent
POST /models/{model}:embedContent
CountTokens
POST /models/{model}:countTokens
ComputeTokens
POST /models/{model}:computeTokens
ListModels
GET /models
GetModel
GET /models/{model}
Files
Files CRUD (upload, get, list, delete)
CachedContents
Cached content CRUD
TuningJobs
Tuning jobs CRUD
BatchJobs
Batch jobs CRUD
Implementations§
§impl ServiceEndpoint
impl ServiceEndpoint
pub fn model_method(&self) -> Option<&'static str>
pub fn model_method(&self) -> Option<&'static str>
REST method suffix appended to the model path (e.g., :generateContent).
Returns None for endpoints that don’t use a model suffix.
pub fn requires_model(&self) -> bool
pub fn requires_model(&self) -> bool
Whether this endpoint requires a model ID in the path.
Trait Implementations§
§impl Clone for ServiceEndpoint
impl Clone for ServiceEndpoint
§fn clone(&self) -> ServiceEndpoint
fn clone(&self) -> ServiceEndpoint
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for ServiceEndpoint
impl Debug for ServiceEndpoint
§impl Hash for ServiceEndpoint
impl Hash for ServiceEndpoint
§impl PartialEq for ServiceEndpoint
impl PartialEq for ServiceEndpoint
impl Copy for ServiceEndpoint
impl Eq for ServiceEndpoint
impl StructuralPartialEq for ServiceEndpoint
Auto Trait Implementations§
impl Freeze for ServiceEndpoint
impl RefUnwindSafe for ServiceEndpoint
impl Send for ServiceEndpoint
impl Sync for ServiceEndpoint
impl Unpin for ServiceEndpoint
impl UnwindSafe for ServiceEndpoint
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more