Struct strong::StrongBuf [−][src]
Strongly typed String
Implementations
impl<Ctx: Validator> StrongBuf<Ctx>
[src]
pub fn validate(s: String) -> Result<Self, Ctx::Err>
[src]
Constructs from String
.
pub unsafe fn no_validate(s: String) -> Self
[src]
Constructs from String
without validation.
Safety
This function allows us to create invalid StrongBuf
.
pub fn into_string(self) -> String
[src]
Converts to String
.
pub fn as_strong(&self) -> &Strong<Ctx>
[src]
impl<Ctx: Validator> StrongBuf<Ctx>
[src]
pub unsafe fn from_utf8_unchecked(bytes: Vec<u8>) -> Self
[src]
Constructs from Vec<u8>
without validation.
Safety
This function allows us to create invalid StrongBuf
.
pub fn into_boxed_strong(self) -> Box<Strong<Ctx>>
[src]
Methods from Deref<Target = Strong<Ctx>>
pub fn valid(&self) -> Result<&Self, Ctx::Err>
[src]
Re-validates self
pub fn to_strong_buf(&self) -> StrongBuf<Ctx>
[src]
Converts to StrongBuf
.
Trait Implementations
impl<'expr, Ctx: Validator> AsExpression<Nullable<SqlStrong<Ctx>>> for &'expr StrongBuf<Ctx>
[src]
type Expression = Bound<Nullable<SqlStrong<Ctx>>, Self>
The expression being returned
fn as_expression(self) -> Self::Expression
[src]
impl<Ctx: Validator> AsExpression<Nullable<SqlStrong<Ctx>>> for StrongBuf<Ctx>
[src]
type Expression = Bound<Nullable<SqlStrong<Ctx>>, Self>
The expression being returned
fn as_expression(self) -> Self::Expression
[src]
impl<'expr, Ctx: Validator> AsExpression<SqlStrong<Ctx>> for &'expr StrongBuf<Ctx>
[src]
type Expression = Bound<SqlStrong<Ctx>, Self>
The expression being returned
fn as_expression(self) -> Self::Expression
[src]
impl<Ctx: Validator> AsExpression<SqlStrong<Ctx>> for StrongBuf<Ctx>
[src]
type Expression = Bound<SqlStrong<Ctx>, Self>
The expression being returned
fn as_expression(self) -> Self::Expression
[src]
impl<Ctx> AsRef<Strong<Ctx>> for StrongBuf<Ctx> where
Ctx: Validator,
[src]
Ctx: Validator,
impl<Ctx> Borrow<Strong<Ctx>> for StrongBuf<Ctx> where
Ctx: Validator,
[src]
Ctx: Validator,
impl<Ctx> Clone for StrongBuf<Ctx> where
Ctx: Validator,
[src]
Ctx: Validator,
fn clone(&self) -> Self
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<Ctx> Debug for StrongBuf<Ctx> where
Ctx: Validator + DebugTransparent,
[src]
Ctx: Validator + DebugTransparent,
impl<T> Default for StrongBuf<Name<T>>
[src]
impl<Ctx> Deref for StrongBuf<Ctx> where
Ctx: Validator,
[src]
Ctx: Validator,
type Target = Strong<Ctx>
The resulting type after dereferencing.
fn deref(&self) -> &Strong<Ctx>
[src]
impl<'de, Ctx> Deserialize<'de> for StrongBuf<Ctx> where
Ctx: Validator,
Ctx::Err: Display,
[src]
Ctx: Validator,
Ctx::Err: Display,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
impl<Ctx> Display for StrongBuf<Ctx> where
Ctx: Validator + DisplayTransparent,
[src]
Ctx: Validator + DisplayTransparent,
impl<Ctx> Eq for StrongBuf<Ctx> where
Ctx: Validator + PartialEqTransparent + EqTransparent,
[src]
Ctx: Validator + PartialEqTransparent + EqTransparent,
impl<Ctx> From<Box<Strong<Ctx>, Global>> for StrongBuf<Ctx> where
Ctx: Validator,
[src]
Ctx: Validator,
impl<__S, Ctx> FromInputValue<__S> for StrongBuf<Ctx> where
Ctx: JuniperType,
__S: ScalarValue,
[src]
Ctx: JuniperType,
__S: ScalarValue,
fn from_input_value(v: &InputValue<__S>) -> Option<Self>
[src]
pub fn from_implicit_null() -> Self
[src]
impl<'a, Ctx, DB> FromSql<SqlStrong<Ctx>, DB> for StrongBuf<Ctx> where
Ctx: Validator,
Ctx::Err: Error + Send + Sync + 'static,
DB: Backend<RawValue = [u8]>,
String: FromSql<Text, DB>,
[src]
Ctx: Validator,
Ctx::Err: Error + Send + Sync + 'static,
DB: Backend<RawValue = [u8]>,
String: FromSql<Text, DB>,
impl<Ctx: Validator, __ST, __DB> FromSqlRow<__ST, __DB> for StrongBuf<Ctx> where
__DB: Backend,
Self: FromSql<__ST, __DB>,
[src]
__DB: Backend,
Self: FromSql<__ST, __DB>,
fn build_from_row<R: Row<__DB>>(row: &mut R) -> Result<Self>
[src]
pub const FIELDS_NEEDED: usize
[src]
impl<Ctx> FromStr for StrongBuf<Ctx> where
Ctx: Validator,
[src]
Ctx: Validator,
type Err = Ctx::Err
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Self, Self::Err>
[src]
impl<__S, Ctx> GraphQLType<__S> for StrongBuf<Ctx> where
Ctx: JuniperType + 'static,
__S: ScalarValue,
[src]
Ctx: JuniperType + 'static,
__S: ScalarValue,
fn name(_: &Self::TypeInfo) -> Option<&'static str>
[src]
fn meta<'r>(
info: &Self::TypeInfo,
registry: &mut Registry<'r, __S>
) -> MetaType<'r, __S> where
__S: 'r,
[src]
info: &Self::TypeInfo,
registry: &mut Registry<'r, __S>
) -> MetaType<'r, __S> where
__S: 'r,
impl<__S, Ctx> GraphQLValue<__S> for StrongBuf<Ctx> where
Ctx: JuniperType + 'static,
__S: ScalarValue,
[src]
Ctx: JuniperType + 'static,
__S: ScalarValue,
type Context = ()
Context type for this GraphQLValue
. Read more
type TypeInfo = ()
Type that may carry additional schema information for this GraphQLValue
. Read more
fn type_name<'__i>(&self, info: &'__i Self::TypeInfo) -> Option<&'__i str>
[src]
fn resolve(
&self,
info: &(),
selection: Option<&[Selection<'_, __S>]>,
executor: &Executor<'_, '_, Self::Context, __S>
) -> ExecutionResult<__S>
[src]
&self,
info: &(),
selection: Option<&[Selection<'_, __S>]>,
executor: &Executor<'_, '_, Self::Context, __S>
) -> ExecutionResult<__S>
pub fn resolve_field(
&self,
_info: &Self::TypeInfo,
_field_name: &str,
_arguments: &Arguments<'_, S>,
_executor: &Executor<'_, '_, Self::Context, S>
) -> Result<Value<S>, FieldError<S>>
[src]
&self,
_info: &Self::TypeInfo,
_field_name: &str,
_arguments: &Arguments<'_, S>,
_executor: &Executor<'_, '_, Self::Context, S>
) -> Result<Value<S>, FieldError<S>>
pub fn resolve_into_type(
&self,
info: &Self::TypeInfo,
type_name: &str,
selection_set: Option<&[Selection<'_, S>]>,
executor: &Executor<'_, '_, Self::Context, S>
) -> Result<Value<S>, FieldError<S>>
[src]
&self,
info: &Self::TypeInfo,
type_name: &str,
selection_set: Option<&[Selection<'_, S>]>,
executor: &Executor<'_, '_, Self::Context, S>
) -> Result<Value<S>, FieldError<S>>
pub fn concrete_type_name(
&self,
context: &Self::Context,
info: &Self::TypeInfo
) -> String
[src]
&self,
context: &Self::Context,
info: &Self::TypeInfo
) -> String
impl<__S, Ctx> GraphQLValueAsync<__S> for StrongBuf<Ctx> where
Ctx: JuniperType + 'static,
Self: Sync,
Self::TypeInfo: Sync,
Self::Context: Sync,
__S: ScalarValue + Send + Sync,
[src]
Ctx: JuniperType + 'static,
Self: Sync,
Self::TypeInfo: Sync,
Self::Context: Sync,
__S: ScalarValue + Send + Sync,
fn resolve_async<'a>(
&'a self,
info: &'a Self::TypeInfo,
selection_set: Option<&'a [Selection<'_, __S>]>,
executor: &'a Executor<'_, '_, Self::Context, __S>
) -> BoxFuture<'a, ExecutionResult<__S>>
[src]
&'a self,
info: &'a Self::TypeInfo,
selection_set: Option<&'a [Selection<'_, __S>]>,
executor: &'a Executor<'_, '_, Self::Context, __S>
) -> BoxFuture<'a, ExecutionResult<__S>>
pub fn resolve_field_async(
&'a self,
_info: &'a Self::TypeInfo,
_field_name: &'a str,
_arguments: &'a Arguments<'_, S>,
_executor: &'a Executor<'_, '_, Self::Context, S>
) -> Pin<Box<dyn Future<Output = Result<Value<S>, FieldError<S>>> + 'a + Send, Global>>
[src]
&'a self,
_info: &'a Self::TypeInfo,
_field_name: &'a str,
_arguments: &'a Arguments<'_, S>,
_executor: &'a Executor<'_, '_, Self::Context, S>
) -> Pin<Box<dyn Future<Output = Result<Value<S>, FieldError<S>>> + 'a + Send, Global>>
pub fn resolve_into_type_async(
&'a self,
info: &'a Self::TypeInfo,
type_name: &str,
selection_set: Option<&'a [Selection<'a, S>]>,
executor: &'a Executor<'a, 'a, Self::Context, S>
) -> Pin<Box<dyn Future<Output = Result<Value<S>, FieldError<S>>> + 'a + Send, Global>>
[src]
&'a self,
info: &'a Self::TypeInfo,
type_name: &str,
selection_set: Option<&'a [Selection<'a, S>]>,
executor: &'a Executor<'a, 'a, Self::Context, S>
) -> Pin<Box<dyn Future<Output = Result<Value<S>, FieldError<S>>> + 'a + Send, Global>>
impl<Ctx: HashTransparent> Hash for StrongBuf<Ctx> where
Ctx: Validator,
[src]
Ctx: Validator,
fn hash<H: Hasher>(&self, h: &mut H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<__S, Ctx> IsInputType<__S> for StrongBuf<Ctx> where
Ctx: JuniperType + 'static,
__S: ScalarValue,
[src]
Ctx: JuniperType + 'static,
__S: ScalarValue,
impl<__S, Ctx> IsOutputType<__S> for StrongBuf<Ctx> where
Ctx: JuniperType,
__S: ScalarValue,
[src]
Ctx: JuniperType,
__S: ScalarValue,
impl<Ctx> Ord for StrongBuf<Ctx> where
Ctx: Validator + PartialEqTransparent + EqTransparent + PartialOrdTransparent + OrdTransparent,
[src]
Ctx: Validator + PartialEqTransparent + EqTransparent + PartialOrdTransparent + OrdTransparent,
fn cmp(&self, other: &StrongBuf<Ctx>) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl<__S, Ctx> ParseScalarValue<__S> for StrongBuf<Ctx> where
Ctx: JuniperType,
__S: ScalarValue,
[src]
Ctx: JuniperType,
__S: ScalarValue,
fn from_str(value: ScalarToken<'_>) -> ParseScalarResult<'_, __S>
[src]
impl<'a, 'b, Ctx> PartialEq<&'a Strong<Ctx>> for StrongBuf<Ctx> where
Ctx: Validator + PartialEqTransparent,
[src]
Ctx: Validator + PartialEqTransparent,
fn eq(&self, other: &&'a Strong<Ctx>) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl<'a, 'b, Ctx> PartialEq<Cow<'a, Strong<Ctx>>> for StrongBuf<Ctx> where
Ctx: Validator + PartialEqTransparent,
[src]
Ctx: Validator + PartialEqTransparent,
fn eq(&self, other: &Cow<'a, Strong<Ctx>>) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl<'a, 'b, Ctx> PartialEq<Strong<Ctx>> for StrongBuf<Ctx> where
Ctx: Validator + PartialEqTransparent,
[src]
Ctx: Validator + PartialEqTransparent,
fn eq(&self, other: &Strong<Ctx>) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl<Ctx> PartialEq<StrongBuf<Ctx>> for StrongBuf<Ctx> where
Ctx: Validator + PartialEqTransparent,
[src]
Ctx: Validator + PartialEqTransparent,
fn eq(&self, other: &StrongBuf<Ctx>) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl<'a, 'b, Ctx> PartialEq<StrongBuf<Ctx>> for Strong<Ctx> where
Ctx: Validator + PartialEqTransparent,
[src]
Ctx: Validator + PartialEqTransparent,
fn eq(&self, other: &StrongBuf<Ctx>) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl<'a, 'b, Ctx> PartialEq<StrongBuf<Ctx>> for &'a Strong<Ctx> where
Ctx: Validator + PartialEqTransparent,
[src]
Ctx: Validator + PartialEqTransparent,
fn eq(&self, other: &StrongBuf<Ctx>) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl<'a, 'b, Ctx> PartialOrd<&'a Strong<Ctx>> for StrongBuf<Ctx> where
Ctx: Validator + PartialEqTransparent + PartialOrdTransparent,
[src]
Ctx: Validator + PartialEqTransparent + PartialOrdTransparent,
fn partial_cmp(&self, other: &&'a Strong<Ctx>) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl<'a, 'b, Ctx> PartialOrd<Cow<'a, Strong<Ctx>>> for StrongBuf<Ctx> where
Ctx: Validator + PartialEqTransparent + PartialOrdTransparent,
[src]
Ctx: Validator + PartialEqTransparent + PartialOrdTransparent,
fn partial_cmp(&self, other: &Cow<'a, Strong<Ctx>>) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl<'a, 'b, Ctx> PartialOrd<Strong<Ctx>> for StrongBuf<Ctx> where
Ctx: Validator + PartialEqTransparent + PartialOrdTransparent,
[src]
Ctx: Validator + PartialEqTransparent + PartialOrdTransparent,
fn partial_cmp(&self, other: &Strong<Ctx>) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl<Ctx> PartialOrd<StrongBuf<Ctx>> for StrongBuf<Ctx> where
Ctx: Validator + PartialEqTransparent + PartialOrdTransparent,
[src]
Ctx: Validator + PartialEqTransparent + PartialOrdTransparent,
fn partial_cmp(&self, other: &StrongBuf<Ctx>) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl<'a, 'b, Ctx> PartialOrd<StrongBuf<Ctx>> for Strong<Ctx> where
Ctx: Validator + PartialEqTransparent + PartialOrdTransparent,
[src]
Ctx: Validator + PartialEqTransparent + PartialOrdTransparent,
fn partial_cmp(&self, other: &StrongBuf<Ctx>) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl<'a, 'b, Ctx> PartialOrd<StrongBuf<Ctx>> for &'a Strong<Ctx> where
Ctx: Validator + PartialEqTransparent + PartialOrdTransparent,
[src]
Ctx: Validator + PartialEqTransparent + PartialOrdTransparent,
fn partial_cmp(&self, other: &StrongBuf<Ctx>) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl<Ctx: Validator, __ST, __DB> Queryable<__ST, __DB> for StrongBuf<Ctx> where
__DB: Backend,
Self: FromSql<__ST, __DB>,
[src]
__DB: Backend,
Self: FromSql<__ST, __DB>,
type Row = Self
The Rust type you'd like to map from. Read more
fn build(row: Self::Row) -> Self
[src]
impl<Ctx> Serialize for StrongBuf<Ctx> where
Ctx: Validator,
[src]
Ctx: Validator,
impl<__S, Ctx> ToInputValue<__S> for StrongBuf<Ctx> where
Ctx: JuniperType,
__S: ScalarValue,
[src]
Ctx: JuniperType,
__S: ScalarValue,
fn to_input_value(&self) -> InputValue<__S>
[src]
impl<Ctx: Validator, __DB> ToSql<Nullable<SqlStrong<Ctx>>, __DB> for StrongBuf<Ctx> where
__DB: Backend,
Self: ToSql<SqlStrong<Ctx>, __DB>,
[src]
__DB: Backend,
Self: ToSql<SqlStrong<Ctx>, __DB>,
impl<Ctx, DB> ToSql<SqlStrong<Ctx>, DB> for StrongBuf<Ctx> where
Ctx: Validator + DebugTransparent,
DB: Backend,
[src]
Ctx: Validator + DebugTransparent,
DB: Backend,
impl<Ctx> TryFrom<String> for StrongBuf<Ctx> where
Ctx: Validator,
[src]
Ctx: Validator,
Auto Trait Implementations
impl<Ctx> RefUnwindSafe for StrongBuf<Ctx> where
Ctx: RefUnwindSafe,
Ctx: RefUnwindSafe,
impl<Ctx> Send for StrongBuf<Ctx> where
Ctx: Send,
Ctx: Send,
impl<Ctx> Sync for StrongBuf<Ctx> where
Ctx: Sync,
Ctx: Sync,
impl<Ctx> Unpin for StrongBuf<Ctx> where
Ctx: Unpin,
Ctx: Unpin,
impl<Ctx> UnwindSafe for StrongBuf<Ctx> where
Ctx: UnwindSafe,
Ctx: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
pub fn equivalent(&self, key: &K) -> bool
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> IntoSql for T
[src]
pub fn into_sql<T>(self) -> Self::Expression where
Self: AsExpression<T>,
[src]
Self: AsExpression<T>,
pub fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression where
&'a Self: AsExpression<T>,
[src]
&'a Self: AsExpression<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,