pub struct ContextSpanned<T> {
pub value: T,
pub origin: Origin,
}Fields§
§value: T§origin: OriginImplementations§
Source§impl<T> ContextSpanned<T>
impl<T> ContextSpanned<T>
pub fn map<U, F>(self, f: F) -> ContextSpanned<U>where
F: FnOnce(T) -> U,
pub fn new_synthetic(value: T, file: PathBuf) -> Self
pub fn maybe_synthetic(val: Option<T>, file: PathBuf) -> Option<Self>
Trait Implementations§
Source§impl<T: Clone> Clone for ContextSpanned<T>
impl<T: Clone> Clone for ContextSpanned<T>
Source§fn clone(&self) -> ContextSpanned<T>
fn clone(&self) -> ContextSpanned<T>
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 moreSource§impl<T: ContextCapabilityClause> ContextCapabilityClause for ContextSpanned<T>
impl<T: ContextCapabilityClause> ContextCapabilityClause for ContextSpanned<T>
fn service(&self) -> Option<ContextSpanned<OneOrMany<&BorrowedName>>>
fn protocol(&self) -> Option<ContextSpanned<OneOrMany<&BorrowedName>>>
fn directory(&self) -> Option<ContextSpanned<OneOrMany<&BorrowedName>>>
fn storage(&self) -> Option<ContextSpanned<OneOrMany<&BorrowedName>>>
fn runner(&self) -> Option<ContextSpanned<OneOrMany<&BorrowedName>>>
fn resolver(&self) -> Option<ContextSpanned<OneOrMany<&BorrowedName>>>
fn dictionary(&self) -> Option<ContextSpanned<OneOrMany<&BorrowedName>>>
fn config(&self) -> Option<ContextSpanned<OneOrMany<&BorrowedName>>>
fn event_stream(&self) -> Option<ContextSpanned<OneOrMany<&BorrowedName>>>
fn origin(&self) -> &Origin
fn file_path(&self) -> PathBuf
fn set_service(&mut self, o: Option<ContextSpanned<OneOrMany<Name>>>)
fn set_protocol(&mut self, o: Option<ContextSpanned<OneOrMany<Name>>>)
fn set_directory(&mut self, o: Option<ContextSpanned<OneOrMany<Name>>>)
fn set_storage(&mut self, o: Option<ContextSpanned<OneOrMany<Name>>>)
fn set_runner(&mut self, o: Option<ContextSpanned<OneOrMany<Name>>>)
fn set_resolver(&mut self, o: Option<ContextSpanned<OneOrMany<Name>>>)
fn set_event_stream(&mut self, o: Option<ContextSpanned<OneOrMany<Name>>>)
fn set_dictionary(&mut self, o: Option<ContextSpanned<OneOrMany<Name>>>)
fn set_config(&mut self, o: Option<ContextSpanned<OneOrMany<Name>>>)
Source§fn are_many_names_allowed(&self) -> bool
fn are_many_names_allowed(&self) -> bool
Returns true if this capability type allows the ::Many variant of OneOrMany.
fn decl_type(&self) -> &'static str
fn supported(&self) -> &[&'static str]
fn capability_type(&self, origin: Option<Origin>) -> Result<&'static str, Error>
Source§fn names(&self) -> Vec<&BorrowedName> ⓘ
fn names(&self) -> Vec<&BorrowedName> ⓘ
Returns the names of the capabilities in this clause.
If
protocol() returns Some(OneOrMany::Many(vec!["a", "b"])), this returns![“a”, “b”].fn set_names(&mut self, names: Vec<Name>)
Source§impl<T: ContextPathClause> ContextPathClause for ContextSpanned<T>
impl<T: ContextPathClause> ContextPathClause for ContextSpanned<T>
Source§impl<T: Debug> Debug for ContextSpanned<T>
impl<T: Debug> Debug for ContextSpanned<T>
Source§impl FromClauseContext for ContextSpanned<ContextUse>
impl FromClauseContext for ContextSpanned<ContextUse>
Source§impl<T: PartialEq> PartialEq for ContextSpanned<T>
impl<T: PartialEq> PartialEq for ContextSpanned<T>
Source§impl<T> Serialize for ContextSpanned<T>where
T: Serialize,
impl<T> Serialize for ContextSpanned<T>where
T: Serialize,
impl<T> StructuralPartialEq for ContextSpanned<T>
Auto Trait Implementations§
impl<T> Freeze for ContextSpanned<T>where
T: Freeze,
impl<T> RefUnwindSafe for ContextSpanned<T>where
T: RefUnwindSafe,
impl<T> Send for ContextSpanned<T>where
T: Send,
impl<T> Sync for ContextSpanned<T>where
T: Sync,
impl<T> Unpin for ContextSpanned<T>where
T: Unpin,
impl<T> UnwindSafe for ContextSpanned<T>where
T: UnwindSafe,
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,
Source§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more