pub struct Client { /* private fields */ }
Implementations§
Source§impl Client
impl Client
pub fn set_token<S: Into<String>>(&mut self, token: S)
pub fn get_token(&self) -> &str
pub async fn new_with_oauth2_token<S: Into<String>, T: Into<String>, U: Into<String>>( protocol: Protocol, host: S, port: T, token: U, timeout_and_retries: Option<TimeoutAndRetries>, ) -> Result<Self, HstpError>
pub async fn get_user_id(&mut self) -> Result<String, HstpError>
pub async fn query_for_entity_array<S: Into<String>>( &mut self, query: S, ) -> Result<QueryEntitiesReturn, HstpError>
pub async fn query_for_entity<S: Into<String>>( &mut self, query: S, ) -> Result<HSMLEntity, HstpError>
pub async fn query_for_value_array<S: Into<String>>( &mut self, query: S, ) -> Result<Vec<Value>, HstpError>
pub async fn query_for_value<S: Into<String>>( &mut self, query: S, ) -> Result<Value, HstpError>
pub async fn query<S: Into<String>>( &mut self, query: S, ) -> Result<Value, HstpError>
pub async fn upsert<V: AsRef<[HSMLEntity]>>( &mut self, entities: V, collision_strategy: CollisionStrategy, ) -> Result<Vec<HSMLEntity>, HstpError>
pub async fn upsert_one( &mut self, entity: &HSMLEntity, collision_strategy: CollisionStrategy, ) -> Result<HSMLEntity, HstpError>
pub async fn upsert_hsml_json<P: AsRef<Path>>( &mut self, path: P, collision_strategy: CollisionStrategy, ) -> Result<Vec<HSMLEntity>, HstpError>
pub async fn create_listener(&mut self) -> Result<Listener, HstpError>
Trait Implementations§
Source§impl PyClassImpl for Client
impl PyClassImpl for Client
Source§const IS_BASETYPE: bool = false
const IS_BASETYPE: bool = false
#[pyclass(subclass)]
Source§const IS_SUBCLASS: bool = false
const IS_SUBCLASS: bool = false
#[pyclass(extends=…)]
Source§const IS_MAPPING: bool = false
const IS_MAPPING: bool = false
#[pyclass(mapping)]
Source§const IS_SEQUENCE: bool = false
const IS_SEQUENCE: bool = false
#[pyclass(sequence)]
Source§type ThreadChecker = SendablePyClass<Client>
type ThreadChecker = SendablePyClass<Client>
This handles following two situations: Read more
Source§type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
Immutable or mutable
Source§type BaseNativeType = PyAny
type BaseNativeType = PyAny
The closest native ancestor. This is
PyAny
by default, and when you declare
#[pyclass(extends=PyDict)]
, it’s PyDict
.fn items_iter() -> PyClassItemsIter
fn lazy_type_object() -> &'static LazyTypeObject<Self>
fn dict_offset() -> Option<isize>
fn weaklist_offset() -> Option<isize>
Source§impl PyTypeInfo for Client
impl PyTypeInfo for Client
Source§type AsRefTarget = PyCell<Client>
type AsRefTarget = PyCell<Client>
Utility type to make Py::as_ref work.
Source§fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
Returns the PyTypeObject instance for this type.
Source§fn type_object(py: Python<'_>) -> &PyType
fn type_object(py: Python<'_>) -> &PyType
Returns the safe abstraction over the type object.
Source§fn is_type_of(object: &PyAny) -> bool
fn is_type_of(object: &PyAny) -> bool
Checks if
object
is an instance of this type or a subclass of this type.Source§fn is_exact_type_of(object: &PyAny) -> bool
fn is_exact_type_of(object: &PyAny) -> bool
Checks if
object
is an instance of this type.Auto Trait Implementations§
impl !Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
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> 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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request