[−][src]Struct oceanpkg::drop::name::query::QueryName
A drop name that may or may not be scoped.
Fields
scope: Option<&'a Name>
The scope scope if the query is scoped to a specific owner.
If this scope is None
, then drops are checked against the main trusted
set of packages. It is not yet decided as to what goes there.
name: &'a Name
The name of the drop itself.
Methods
impl<'a> QueryName<'a>
[src]
pub fn new<S, N>(scope: S, name: N) -> Self where
S: Into<Option<&'a Name>>,
N: Into<&'a Name>,
[src]
S: Into<Option<&'a Name>>,
N: Into<&'a Name>,
Creates a new instance from scope
and name
.
pub fn parse<Q>(query: Q) -> Result<Self, ParseError> where
Q: TryInto<Self, Error = ParseError>,
[src]
Q: TryInto<Self, Error = ParseError>,
Attempts to create a new instance by parsing query
.
pub fn into_owned(self) -> OwnedQueryName
[src]
Copies the data referred to by self
and takes ownership of it.
pub fn to_scoped(&self) -> Option<&ScopedName<'a>>
[src]
Converts self
to a scoped name if it is one.
pub fn to_name(&self) -> Option<&'a Name>
[src]
Converts self
to a simple name if it has no scope.
pub fn as_names(&self) -> &[&'a Name]
[src]
Converts self
into a slice of Name
s.
Trait Implementations
impl<'a> AsRef<QueryName<'a>> for ScopedName<'a>
[src]
impl<'a> From<&'a Name> for QueryName<'a>
[src]
impl<'a, N: Into<&'a Name>> From<[N; 2]> for QueryName<'a>
[src]
impl<'a, S, N> From<(S, N)> for QueryName<'a> where
S: Into<Option<&'a Name>>,
N: Into<&'a Name>,
[src]
S: Into<Option<&'a Name>>,
N: Into<&'a Name>,
impl<'a> From<ScopedName<'a>> for QueryName<'a>
[src]
fn from(n: ScopedName<'a>) -> Self
[src]
impl<'_> From<QueryName<'_>> for OwnedQueryName
[src]
impl<'a> Clone for QueryName<'a>
[src]
impl<'a> Copy for QueryName<'a>
[src]
impl<'a> Eq for QueryName<'a>
[src]
impl<'a> Ord for QueryName<'a>
[src]
fn cmp(&self, other: &QueryName<'a>) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
1.21.0[src]
fn clamp(self, min: Self, max: Self) -> Self
[src]
impl<'a> PartialEq<QueryName<'a>> for QueryName<'a>
[src]
impl<'_> PartialEq<Name> for QueryName<'_>
[src]
impl<'_, '_> PartialEq<&'_ Name> for QueryName<'_>
[src]
impl<'_> PartialEq<QueryName<'_>> for Name
[src]
impl<'_, '_> PartialEq<QueryName<'_>> for &'_ Name
[src]
impl<'_> PartialEq<str> for QueryName<'_>
[src]
impl<'_, '_> PartialEq<&'_ str> for QueryName<'_>
[src]
impl<'_> PartialEq<QueryName<'_>> for str
[src]
impl<'_, '_> PartialEq<QueryName<'_>> for &'_ str
[src]
impl<'a> PartialOrd<QueryName<'a>> for QueryName<'a>
[src]
fn partial_cmp(&self, other: &QueryName<'a>) -> Option<Ordering>
[src]
fn lt(&self, other: &QueryName<'a>) -> bool
[src]
fn le(&self, other: &QueryName<'a>) -> bool
[src]
fn gt(&self, other: &QueryName<'a>) -> bool
[src]
fn ge(&self, other: &QueryName<'a>) -> bool
[src]
impl<'a> Debug for QueryName<'a>
[src]
impl<'_> Display for QueryName<'_>
[src]
impl<'a> TryFrom<&'a str> for QueryName<'a>
[src]
type Error = ParseError
The type returned in the event of a conversion error.
fn try_from(s: &'a str) -> Result<Self, Self::Error>
[src]
impl<'a> TryFrom<&'a [u8]> for QueryName<'a>
[src]
type Error = ParseError
The type returned in the event of a conversion error.
fn try_from(bytes: &'a [u8]) -> Result<Self, Self::Error>
[src]
impl<'a> TryFrom<&'a OsStr> for QueryName<'a>
[src]
type Error = ParseError
The type returned in the event of a conversion error.
fn try_from(s: &'a OsStr) -> Result<Self, Self::Error>
[src]
impl<'a> Hash for QueryName<'a>
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<'a> StructuralPartialEq for QueryName<'a>
[src]
impl<'a> StructuralEq for QueryName<'a>
[src]
impl<'_> Serialize for QueryName<'_>
[src]
impl<'de: 'a, 'a> Deserialize<'de> for QueryName<'a>
[src]
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
Auto Trait Implementations
impl<'a> Send for QueryName<'a>
impl<'a> Sync for QueryName<'a>
impl<'a> Unpin for QueryName<'a>
impl<'a> UnwindSafe for QueryName<'a>
impl<'a> RefUnwindSafe for QueryName<'a>
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
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 = !
The type returned in the event of a conversion error.
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.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,