Struct cloud_pubsub::client::Client
source · [−]pub struct Client(_);Implementations
sourceimpl Client
impl Client
pub async fn from_string(credentials_string: String) -> Result<Self, Error>
pub async fn new(credentials_path: String) -> Result<Self, Error>
pub fn subscribe(&self, name: String) -> Subscription
pub fn set_project(&mut self, project: String)
pub fn project(&self) -> String
pub fn topic(&self, name: String) -> Topic
pub fn is_running(&self) -> bool
pub fn stop(&self)
pub fn spawn_token_renew(&self, interval: Duration)
pub async fn refresh_token(&mut self) -> Result<(), Error>
pub fn hyper_client(&self) -> Arc<Client<HttpsConnector<HttpConnector>, Body>>
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl UnwindSafe for Client
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more